Cancel Job
PATCH
/api/v2/jobs/{job_id}/cancel
const url = 'https://example.com/api/v2/jobs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/cancel';const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
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/v2/jobs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/cancel \ --header 'Authorization: Bearer <token>'Cancel a specific job. Only the job owner can perform this operation.
The job must be in a cancelable state (PENDING or RUNNING). If the job is already running on hardware, cancellation may not take effect immediately.
Returns: The canceled job with its updated status.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”job_id
required
Job Id
string format: uuid
Responses
Section titled “ Responses ”Successful Response
Media typeapplication/json
NonPaginatedResponse[ProducedPartialJobResponse]
object
data
Any of:
ProducedPartialJobResponse
Response to a request for a job.
This schema defines all the fields that can be publicly shared by the API and do not require significant computational resources. For example, 'logs_links' or 'results link'.
object
id
required
Id
Unique identifier for the job.
string format: uuid
status
required
JobStatus
Current job status.
string
batch_id
required
Batch Id
ID of the batch this job belongs to.
string format: uuid
project_id
required
Project Id
ID of the project this job belongs to.
string format: uuid
created_at
required
Created At
Timestamp when the job was created.
string format: date-time
updated_at
required
Updated At
Timestamp of the last job update.
string format: date-time
errors
required
Any of:
Array<string>
null
creation_order
required
Creation Order
Position in the creation order within the batch.
integer
null
Example
{ "data": { "batch_id": "00000000-0000-0000-0000-000000000002", "created_at": "2025-01-15T10:30:00Z", "creation_order": 1, "end_timestamp": "2025-01-15T10:35:00Z", "id": "00000000-0000-0000-0000-000000000003", "progress": 100, "project_id": "00000000-0000-0000-0000-000000000001", "runs": 100, "start_timestamp": "2025-01-15T10:31:00Z", "status": "DONE", "updated_at": "2025-01-15T10:35:00Z", "variables": { "omega": 5 } }}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" } ]}