Skip to navigation

Cancel a job

View as Markdown

Cancels a job. Only the creating credential can cancel it. A job that ended gives 409 job_not_cancellable.

Authentication

AuthorizationBearer

An API key (crk_), an exchanged token (crt_) or a JWT of a trusted issuer. The credential needs the scope of the capability. Read the description of each route.

Path parameters

idstringRequired

The job id: job_ and a ULID.

Response headers

x-request-idstringOptional

The id of the request: req_ and a ULID. Every answer has it.

server-timingstringOptional
The time of the admission.
x-ratelimit-limit-requestsstringOptional
The size of the request bucket, per minute.
x-ratelimit-remaining-requestsstringOptional
The requests that remain.
x-ratelimit-reset-requestsstringOptional
The time until the request bucket is full.
x-ratelimit-limit-unitsstringOptional
The size of the units bucket, per minute. Absent when no limit applies.
x-ratelimit-remaining-unitsstringOptional
The units that remain.
x-ratelimit-reset-unitsstringOptional
The time until the units bucket is full.

Response

The cancelled job.
object"job"
idstring

job_ and a ULID.

capabilitystring
The capability of the job.
statusenum
The status of the job.
deadline"asap"

Only asap at this time.

created_atdatetime
When the API accepted the job.
completed_atdatetime or null
When the job ended. Null while the job runs.
outputany
The output of a succeeded job, or null. The shape depends on the capability. The stored output is at most 1048576 bytes.
errorobject or null
Why a job did not succeed.
usageobject or null
The metered use of a job.
run_idstringOptional
The Run run id. Agent jobs only.
required_actionobject or nullOptional

Machine jobs only. What the job waits for while its status is needs_input, else null. The other jobs do not have this field.

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error