Skip to main content
POST
Cancel a task

Authorizations

Authorization
string
header
required

A team API key, sk_offstage_…, created in the console. Everything it touches belongs to its team.

Path Parameters

taskId
string
required

A task id, task_….

Response

The task, now cancelled.

A task. Fields that do not apply yet (boxId, slot, startedAt, endedAt, runtimeSeconds) are absent, not null.

id
string
required

task_….

Pattern: ^task_
spec
object
required

The task as submitted, with defaults filled in.

state
enum<string>
required

queued → claimed → running → succeeded | failed | timed_out, or cancelled from any state before those. The last four are terminal.

Available options:
queued,
claimed,
running,
succeeded,
failed,
timed_out,
cancelled
createdAt
integer
required

A time, in Unix milliseconds.

Required range: x >= 0
attempts
integer
required

How many slots claimed it and never started it.

Required range: x >= 0
requeued
boolean
required

True once a slot claimed it and never started it, so it went back to queued.

costUsd
number
required

What its running time costs: accrued so far while it runs, final once it ends. 0 for work the fleet lost.

createdBy
object
required

Who started the work: {keyName} for an API key, {email} for a console user.

exitCode
integer | null
required

The command's exit status once the Mac reports it; null before then, and when there was none (timed out, cancelled, lost).

droppedLogLines
integer
required

Log lines dropped from the front to keep the last 500.

Required range: x >= 0
failureReason
enum<string> | null
required

Why it ended failed or timed_out; null in every other state.

Available options:
exit,
setup,
timeout,
no-capacity,
box-lost,
plane-restart,
never-started
events
object[]
required

The whole story, in order. The log keeps its last 500 lines; when lines were dropped, the first log event says how many.

boxId
string

The Mac that holds or ran it. Absent until a slot claims it.

Pattern: ^box_
slot
integer

The slot on that Mac. Absent until claimed.

Required range: x >= 1
startedAt
integer

When the command started. Absent until then.

Required range: x >= 0
endedAt
integer

When it ended. Absent until then (and for a queued task that was cancelled).

Required range: x >= 0
runtimeSeconds
integer

Whole seconds from start to end. Absent until it ends.

Required range: x >= 0
github
object

Only on a runner task: the GitHub Actions job it was made for.

replayUrl
string

Where to watch it, live while it runs and as a replay after: the console's /r/{id} page. Present for a gui task that records.