Cancel a batch
Use this method to request cancellation for a batch with the pending or processing status.
When you invoke this method, the platform performs the following steps:
- Cancels the items in the
queuedstatus. - Finishes the analysis for the items in the
processingstatus.
The batch status changes to canceling immediately, and to canceled after every item reaches ready, failed, or canceled. You are not billed for canceled or failed items.
Authentication
Your API key.
You can find your API key on the API Keys page.
Path parameters
Response
The platform accepted the cancellation request. Items already in the processing status continue until processing finishes. The batch status is canceling until every item reaches ready, failed, or canceled, then becomes canceled. The response shows the batch state at the time of the request. To confirm the batch is fully canceled, use the GET method of the /analyze/batches/{batch_id} endpoint.
The status of a batch. For the meaning of each value, see the Batch statuses section on the The batch object page.
The date and time, in the RFC 3339 format, when the batch expires (the created_at field value plus 24 hours). Unfinished items at expiration are canceled. Items that finished before then remain retrievable for 30 days after creation, when the batch and its results are deleted.
The number of items in the queued status.
The number of items in the processing status.
The number of items that were canceled, either because the batch was canceled while the item was in the queued status, or because the batch expired before the item finished processing.
The date and time, in the RFC 3339 format, when the batch status became completed. Present only when the status is completed.
The date and time, in the RFC 3339 format, when the batch status became canceled. Present only when the status is canceled.
The date and time, in the RFC 3339 format, when the batch status became expired. Present only when the status is expired.
The delivery status of each webhook endpoint for the batch completion notification. Present only after the platform sends the webhook notifications. To register webhooks, see the Webhooks page.