Cancel Batches
PATCH
/api/v1/batches/cancel
const url = 'https://example.com/api/v1/batches/cancel';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"batch_ids":["00000000-0000-0000-0000-000000000002"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
ConsumedBatchBulkCancelRequest
Request to cancel a collection of batches.
object
batch_ids
Any of:
Array<string>
null
project_id
Any of:
Array<string>
null
user_id
Any of:
Array<string>
null
device_type
Any of:
Array<string>
null
status
Any of:
Array<string>
null
queue_priority
Any of:
Array<string>
null
tags
Any of:
Array<string>
null
Responses
Section titled “Responses”Successful Response
Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}