Skip to content

Cancel run

PUT
/api/v1/runs/{run_id}/cancellation

Request cancellation of this creator’s queued or assigned run. Send an empty body; no query parameters or idempotency key are required. Repeating the PUT preserves the original intent and returns its current status. Assigned work records intent until termination is confirmed.

run_id
required
string format: uuid

Accepted run identity.

Durable cancellation intent and current confirmation status.

Media typeapplication/json
object
cancelled_at

Set only after confirmed termination (or cancellation before assignment).

string | null format: date-time
reason

The retained actor may be an connector administrator for queued-only cutover.

string | null
requested_at
required
string format: date-time
requested_by_user_id
required
string format: uuid
run_id
required
string format: uuid
scope
required

Creator cancellation covers pending and running work. Connector context-cutover cancellation is queued-only and retains the actual actor and reason.

string
Allowed values: pending_and_running queued_only
state
required

Public execution state. Delegated preparation and collection are running.

string
Allowed values: queued running succeeded failed cancelled
status
required

A request does not confirm termination. Completion can win a cancellation race.

string
Allowed values: requested confirmed completed
Cache-Control
string

No-store

x-request-id
string

Always present. A fresh server-generated UUID for this request; incoming IDs are ignored. On errors, this equals the response body’s request_id.

The request has query parameters or a nonempty body. Code bad_request.

Media typeapplication/json

The common JSON body for errors returned by the HTTP application.

object
code
required

Stable machine-readable error code.

string
details
One of:
null
message
required

Safe explanation without internal errors or submitted input values.

string
request_id
required

Matches the response’s x-request-id header.

string
Cache-Control
string

No-store

x-request-id
string

Always present. A fresh server-generated UUID for this request; incoming IDs are ignored. On errors, this equals the response body’s request_id.

An active user credential is required. Code unauthenticated.

Media typeapplication/json

The common JSON body for errors returned by the HTTP application.

object
code
required

Stable machine-readable error code.

string
details
One of:
null
message
required

Safe explanation without internal errors or submitted input values.

string
request_id
required

Matches the response’s x-request-id header.

string
Cache-Control
string

No-store

WWW-Authenticate
string

Bearer

x-request-id
string

Always present. A fresh server-generated UUID for this request; incoming IDs are ignored. On errors, this equals the response body’s request_id.

The credential does not permit this operation (insufficient_scope).

Media typeapplication/json

The common JSON body for errors returned by the HTTP application.

object
code
required

Stable machine-readable error code.

string
details
One of:
null
message
required

Safe explanation without internal errors or submitted input values.

string
request_id
required

Matches the response’s x-request-id header.

string
Cache-Control
string

No-store

x-request-id
string

Always present. A fresh server-generated UUID for this request; incoming IDs are ignored. On errors, this equals the response body’s request_id.

Run identity is invalid, absent, or belongs to another creator. Code not_found.

Media typeapplication/json

The common JSON body for errors returned by the HTTP application.

object
code
required

Stable machine-readable error code.

string
details
One of:
null
message
required

Safe explanation without internal errors or submitted input values.

string
request_id
required

Matches the response’s x-request-id header.

string
Cache-Control
string

No-store

x-request-id
string

Always present. A fresh server-generated UUID for this request; incoming IDs are ignored. On errors, this equals the response body’s request_id.

The run completed before the request or its backend does not support cancellation.

Media typeapplication/json

The common JSON body for errors returned by the HTTP application.

object
code
required

Stable machine-readable error code.

string
details
One of:
null
message
required

Safe explanation without internal errors or submitted input values.

string
request_id
required

Matches the response’s x-request-id header.

string
Cache-Control
string

No-store

x-request-id
string

Always present. A fresh server-generated UUID for this request; incoming IDs are ignored. On errors, this equals the response body’s request_id.

413: the request body exceeds the configured size limit.

Media typeapplication/json

The common JSON body for errors returned by the HTTP application.

object
code
required

Stable machine-readable error code.

string
details
One of:
null
message
required

Safe explanation without internal errors or submitted input values.

string
request_id
required

Matches the response’s x-request-id header.

string
Cache-Control
string

No-store

x-request-id
string

Always present. A fresh server-generated UUID for this request; incoming IDs are ignored. On errors, this equals the response body’s request_id.

Authentication/cancellation is unavailable, or its commit acknowledgement is uncertain. Code cancellation_uncertain requires retrying the same PUT.

Media typeapplication/json

The common JSON body for errors returned by the HTTP application.

object
code
required

Stable machine-readable error code.

string
details
One of:
null
message
required

Safe explanation without internal errors or submitted input values.

string
request_id
required

Matches the response’s x-request-id header.

string
Cache-Control
string

No-store

x-request-id
string

Always present. A fresh server-generated UUID for this request; incoming IDs are ignored. On errors, this equals the response body’s request_id.

An HTTP request failed; inspect the stable error code and request ID.

Media typeapplication/json

The common JSON body for errors returned by the HTTP application.

object
code
required

Stable machine-readable error code.

string
details
One of:
null
message
required

Safe explanation without internal errors or submitted input values.

string
request_id
required

Matches the response’s x-request-id header.

string
Cache-Control
string

No-store

x-request-id
string

Always present. A fresh server-generated UUID for this request; incoming IDs are ignored. On errors, this equals the response body’s request_id.

Documentation 205dcb3116ea · public sources 8c70356d340f · built .Download documentation identity.