Read one ad operation with GET /api/v1/ads/accounts/{accountId}/operations/{operationId}. Requires an API key with the ads_read scope or a signed-in workspace member.
Request
Returns status, step, sanitized input and result references, issues, attempts, and the next action. Cross-workspace or cross-account IDs return 404. No provider call happens during the request.
| Parameter | In | Type | Required |
|---|---|---|---|
accountId |
path | UUID | Yes |
operationId |
path | UUID | Yes |
workspaceId |
query | UUID | Yes |
Response
- HTTP 200:
AdOperationwithid,accountId,kind,status,step,input,result,issues,attempts,canRetry,nextAction,createdAt,updatedAt,startedAt,completedAt.kind:boost.create,campaign.create,campaign.activate,campaign.pause,campaign.archive,ad_group.status,ad_group.create,ad.status,ad.attach,creative.create,campaign.duplicate,budget.updatestatus:queued,preflight,creating,recording,reviewing,activating,succeeded,partial,failed,unresolved,cancelledstep:queued,preflight,create,record,review,activate,finish
The OpenAPI document has each field’s type.
Examples
const operation = await workspace.ads.operation(accountId, operationId);operation = workspace.ads.get_operation(account_id, operation_id)curl "https://pubnio.com/api/v1/ads/accounts/$ACCOUNT_ID/operations/$OPERATION_ID?workspaceId=$WORKSPACE_ID" \
-H "Authorization: Bearer $PUBNIO_API_KEY"pnio ads get-operation "$ACCOUNT_ID" "$OPERATION_ID"async () => {
const accountId = "<accountId>";
const operationId = "<operationId>";
const response = await codemode.request({
method: "GET",
path: `/api/v1/ads/accounts/${accountId}/operations/${operationId}`,
query: { workspaceId: codemode.workspaceId },
});
return response.data;
};Errors
It declares no problem of its own.
It declares the problems every Ads operation and most operations declare.
Idempotency
None needed: a read is safe to retry.
Limits
- Field lengths and ranges are in the OpenAPI document.