task-runs

Get a task run

Get a single task run by id, with its state projected from the execution.

A succeeded run also carries what it produced, read from the backend: its outputs by name, so a task returning one value reads as {"o0": ...}. Null where the run produced nothing, has not succeeded, or its outputs could not be read just now.

The state is synced from the backend periodically, so it can lag the run by up to 2 minutes: a run that has already finished may still read as RUNNING for that long. When polling for completion, allow for this delay.

404: no task run of this id the caller's organization owns — the same answer whether it never existed or belongs to another organization.

get/task-runs/{taskRunId}

Request

  • Base URL: https://api.cloud.wherobots.com
  • URL: https://api.cloud.wherobots.com/task-runs/{taskRunId}
  • Auth: one of:
    • HTTP bearer
    • API key in header X-API-Key

Path parameters

taskRunIdstring required

The id of the task run.

Response

Successful Response

taskRunIdstring required
taskNamestring required

Current mutable Task display metadata, not historical identity.

taskIdstring nullable
taskTriggerIdstring nullable
type'uniontask' | 'scripttask'

Concrete task polymorphic identities.

runSource'manual' | 'schedule' | 'backfill'

Origin of a run, independent of its backend.

batchTimestring date-time nullable
windowStartstring date-time nullable
windowEndstring date-time nullable
failureClass'QUOTA_REJECTED' | 'CONFIG_REJECTED' | 'USER_CODE' | 'PLATFORM' | 'TIMEOUT'

Terminal dispatch and execution failure categories.

runAsIdstring nullable
requestedByIdstring nullable
state'PENDING' | 'SUBMITTED' | 'RUNNING' | 'SUCCEEDED' | 'FAILED' | 'TIMED_OUT' | 'CANCELLING' | 'CANCELLED' | 'UNKNOWN' | 'SKIPPED' | 'MISSED' required
regionstring required
submittedAtstring date-time required
startedAtstring date-time nullable
endedAtstring date-time nullable
durationSecondsinteger nullable

How long the backend executed the run, from its start to its end (or to now, while running). 0 if it never started there. A cached run executes nothing, so this is the moment it took to return the stored result, not how long the result took to produce.

executionRequestobject nullable

Durable admitted Job Run payload when available, otherwise the captured prelaunch request. URI does not pin historical object bytes.

namestring nullable
inputsobject
cachedboolean

Whether the run returned a result stored by an earlier run of the same task with the same inputs, instead of executing. Only a run that succeeded stores its result; one that failed or was cancelled is never reused. False until the run has ended.

resultsobject nullable
errorMessagestring nullable

Why the run did not succeed. A run that could not be started says so and gives the task run ID to quote to support.

Changes

No recorded changes to this operation across all 1 revision of this API.