Skip to content

Results are limited to the current section: Cloud services

Product news

Cancel Batches

PATCH
/api/v1/batches/cancel
curl --request PATCH \
--url https://example.com/api/v1/batches/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "batch_ids": [ "00000000-0000-0000-0000-000000000002" ] }'

Cancel a group of batches owned by the authenticated user, matching the given criteria.

If batch_ids is provided, all other filters are ignored and only the specified batches are canceled. To cancel all batches, use cancel_all alone without any other filters.

Returns: A list of canceled batches and any batches that could not be canceled with their error explained.

Media typeapplication/json
ConsumedBatchBulkCancelRequest

Request to cancel a collection of batches.

object
batch_ids
Any of:
Array<string>
project_id
Any of:
Array<string>
user_id
Any of:
Array<string>
device_type
Any of:
Array<string>
status
Any of:
Array<string>
Allowed values: PENDING RUNNING DONE CANCELED CANCELING TIMED_OUT ERROR PAUSED
open
Any of:
boolean
start_date
Any of:
string format: date-time
queue_priority
Any of:
Array<string>
Allowed values: CRITICAL HIGH MEDIUM LOW FREE
tags
Any of:
Array<string>
cancel_all
Any of:
boolean

Successful Response

Media typeapplication/json
NonPaginatedResponse[ProducedBatchBulkCancelResponse]
object
data
Any of:
Examplegenerated
{
"data": "example"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}