Retrieve an operation
/operations/{operation_id}Retrieves the status and progress of an asynchronous operation. Poll this endpoint until the operation reaches a terminal status: succeeded, partially_succeeded, failed, or canceled.
Autonomous mode: the API credential secret, sent as a bearer token. Credential secrets are identified by a fixed prefix.
In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/operations/string"{ "data": { "attempt": { "number": 0, "status": "running" }, "cancellation_requested": true, "created_at": "2019-08-24T14:15:22Z", "error": {}, "expires_at": "2019-08-24T14:15:22Z", "finished_at": "2019-08-24T14:15:22Z", "id": "string", "items_url": "string", "object": "operation", "progress": { "done": 0, "failed": 0, "total": 0 }, "result_url": "string", "started_at": "2019-08-24T14:15:22Z", "status": "queued", "type": "string" }}Create a batch operation POST
Creates an asynchronous batch operation. All items in the batch are processed with the same operation `type`, which also determines the structure of each item's `payload`. The operation is accepted with a `Location` header pointing to it and processed asynchronously. Poll the retrieve operation to track its progress. In addition to `operations.manage`, the credential must have the permission required by the selected operation type. Repeating the request with the same `Idempotency-Key` returns the same operation instead of creating a new one. The request is rejected with `operation_type_unknown` for an unsupported type, `duplicate_item_key` when item keys are not unique, `too_many_items` when the batch exceeds the maximum number of items for the type, and `operation_backlog_exceeded` when the account has too many unfinished operations.
Cancel an operation PATCH
Requests cancellation of an operation. Set `cancellation_requested` to `true` and optionally provide a `reason`. Cancellation is cooperative: a queued operation is canceled immediately, while a running operation stops between items. Items that have already been processed are not reverted. Setting `cancellation_requested` to `false` has no effect; a cancellation request cannot be withdrawn. Operations that have already reached a terminal status return `operation_not_cancelable`.