Skip to content

Results are limited to the current section : Cloud Services

Cancel Batches

PATCH
/api/v1/batches/cancel

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.

ConsumedBatchBulkCancelRequest

Request to cancel a collection of batches.

object
batch_ids
Batch Ids

List of batch IDs to cancel. If provided, all other filters are ignored.

Array<string>
project_id
Project Id

Filter by project ID.

Array<string>
user_id
User Id

Filter by user ID.

Array<string>
device_type
Device Type

Filter by device type.

Array<string>
status

Filter by batch status (only PENDING and RUNNING allowed).

Array<string>
Allowed values: PENDING RUNNING DONE CANCELED CANCELING TIMED_OUT ERROR PAUSED
open
Open

Filter by whether the batch is still open.

boolean
start_date
Start Date

Filter batches created on or after this date.

string format: date-time
queue_priority

Filter by queue priority.

Array<string>
Allowed values: CRITICAL HIGH MEDIUM LOW FREE
tags
Tags

Filter by tag.

Array<string>
cancel_all
Cancel All

Cancel all batches. Cannot be combined with other filters.

boolean

Successful Response

NonPaginatedResponse[ProducedBatchBulkCancelResponse]
object
data
ProducedBatchBulkCancelResponse

Response to a request for cancelling a bunch of batches.

object
batches
required
Batches

Batches that were successfully canceled.

Array<object>
ProducedBatchWithoutJobsResponse

Response for a batch request that not includes its jobs.

This schema defines all the fields that can be publicly shared by the API.

object
id
required
Id

Unique identifier for the batch.

string format: uuid
parent_id
required
Parent Id

ID of the parent batch if created from a retry.

string format: uuid
status
required

Current batch status.

string
Allowed values: PENDING RUNNING DONE CANCELED CANCELING TIMED_OUT ERROR PAUSED
complete
required
Complete

Deprecated. Use open instead. Indicates whether the batch is still accepting additional jobs. False means the batch is open; True means it is closed.

boolean
open
required
Open

Whether the batch is open and accepting additional jobs.

boolean
priority
required
Priority

Deprecated. Priority of the batch.

integer
device_type
required
Device Type

Target device type for the batch.

string
user_id
required
User Id

ID of the user who created the batch.

string
project_id
required
Project Id

ID of the project this batch belongs to.

string format: uuid
created_at
required
Created At

Timestamp when the batch was created.

string format: date-time
updated_at
required
Updated At

Timestamp of the last batch update.

string format: date-time
sequence_builder
required
Sequence Builder

Serialized Pulser sequence shared by all jobs.

string
jobs_count
required
Jobs Count

Total number of jobs in the batch.

integer
jobs_count_per_status
required
Jobs Count Per Status

Number of jobs grouped by status.

object
tags
required
Tags

User-defined labels for organizing batches.

Array<string>
unique items
configuration
required
Configuration

Deprecated. Use backend_configuration. Extra configuration for job execution.

object
backend_configuration
required
Backend Configuration

Serialized emulator backend configuration.

string
webhook
required
Webhook

URL where job results are sent via webhook.

string
start_datetime
required
Start Datetime

Timestamp when processing started on hardware.

string format: date-time
end_datetime
required
End Datetime

Timestamp when processing finished, errored, or was canceled.

string format: date-time
queue_priority
required

Priority queue on which the batch is scheduled.

string
Allowed values: CRITICAL HIGH MEDIUM LOW FREE
Example
{
"id": "00000000-0000-0000-0000-000000000002",
"status": "CANCELED",
"complete": true,
"open": false,
"priority": 0,
"device_type": "FRESNEL",
"user_id": "user-123",
"project_id": "00000000-0000-0000-0000-000000000001",
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:40:00Z",
"sequence_builder": "<serialized Pulser sequence>",
"jobs_count": 1,
"jobs_count_per_status": {
"CANCELED": 1
},
"tags": [],
"end_datetime": "2025-01-15T10:40:00Z",
"queue_priority": "MEDIUM"
}
errors
required
Errors

Batch IDs that could not be canceled, with error details.

object
key
additional properties
string
Example
{
"batches": [
{
"id": "00000000-0000-0000-0000-000000000002",
"status": "CANCELED",
"complete": true,
"open": false,
"priority": 0,
"device_type": "FRESNEL",
"user_id": "user-123",
"project_id": "00000000-0000-0000-0000-000000000001",
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:40:00Z",
"sequence_builder": "<serialized Pulser sequence>",
"jobs_count": 2,
"jobs_count_per_status": {
"CANCELED": 2
},
"tags": [
"experiment-1"
],
"end_datetime": "2025-01-15T10:40:00Z",
"queue_priority": "MEDIUM"
}
],
"errors": {}
}

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string