Skip to main content
POST
Cancel a workspace run

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-ankra-organisation-id
string

PAT organisation override.

Path Parameters

workspace_id
string<uuid>
required

The workspace.

run_id
string<uuid>
required

The run.

Response

The run

One command run in a workspace.

apply
boolean
required
argv_preview
string
required

The command line with secret-shaped arguments masked, at most 200 characters.

base_ref
string
required
base_sha
string
required
bundle_object_key
string | null
required
created_at
string<date-time>
required
cwd_prefix
string
required
env_names
string[]
required

The names of the forwarded environment variables, never their values.

error_message
string | null
required

Why the run ended without an exit code, when the platform could tell: a command that ran the workspace's main container out of memory (it was OOMKilled, which ends every run in it) carries a message naming the container's memory limit and pointing at resources.memory in the repository's workspace profile, and a run ended by the kubelet evicting the workspace pod (an emptyDir volume past its size limit, the node short of memory or disk) carries a message saying so and quoting the kubelet's reason. Null for every other run, which says nothing about how it ended.

exit_code
integer | null
required

The command's exit code, or with started false why it never started (197: resend the full history, 75: the sync failed, 78: the workspace profile's setup failed, 130: cancelled first).

finished_at
string<date-time> | null
required

When the run ended; null while it has not.

head_sha
string
required
run_id
string<uuid>
required
snapshot_sha
string
required
started
boolean | null
required

Whether the command itself started; null when the record alone cannot tell (a cancelled or lost run).

state
enum<string>
required
Available options:
accepted,
running,
finished,
not_started,
cancelled,
lost
user_id
string<uuid>
required
workspace_id
string<uuid>
required