v1

latestOpenAPI 3.1.0Apache 2.0raw.githubusercontent.com2026-05-044743166.6 KB
run

Retrieve a run

Retrieve information about a run, including its status, payload, output, and attempts. If you authenticate with a Public API key, we will omit the payload and output fields for security reasons.

get/api/v3/runs/{runId}

Response

Successful request

idstring required

The unique ID of the run, prefixed with run_

status'PENDING_VERSION' | 'DELAYED' | 'QUEUED' | 'EXECUTING' | 'REATTEMPTING' | 'FROZEN' | 'COMPLETED' | 'CANCELED' | 'FAILED' | 'CRASHED' | 'INTERRUPTED' | 'SYSTEM_FAILURE' required

The status of the run

taskIdentifierstring required

The identifier of the task that was run

versionstring

The version of the worker that executed the run

idempotencyKeystring

The idempotency key used to prevent creating duplicate runs, if provided

createdAtstring date-time required
updatedAtstring date-time required
isTestboolean

Whether the run is a test run or not

startedAtstring date-time

The time the run started

finishedAtstring date-time

The time the run finished

delayedUntilstring date-time

If the run was triggered with a delay, this will be the time the run will be enqueued to execute

expiredAtstring date-time

If the run had a TTL and that time has passed, when the run "expired".

tagsstring[]

Tags can be attached to a run to make it easy to find runs (in the dashboard or using SDK functions like runs.list)

metadataobject

The metadata of the run. See Metadata for more information.

costInCentsnumber

The compute cost of the run (so far) in cents. This cost does not apply to DEV runs.

baseCostInCentsnumber

The invocation cost of the run in cents. This cost does not apply to DEV runs.

durationMsnumber

The duration of compute (so far) in milliseconds. This does not include waits.

depthinteger

The depth of the run in the task run hierarchy. The root run has a depth of 0.

batchIdstring

The ID of the batch that this run belongs to

triggerFunction'trigger' | 'triggerAndWait' | 'batchTrigger' | 'batchTriggerAndWait'

The name of the function that triggered the run

payloadobject

The payload that was sent to the task. Will be omitted if the request was made with a Public API key

payloadPresignedUrlstring

The presigned URL to download the payload. Will only be included if the payload is too large to be included in the response. Expires in 5 minutes.

outputobject

The output of the run. Will be omitted if the request was made with a Public API key

outputPresignedUrlstring

The presigned URL to download the output. Will only be included if the output is too large to be included in the response. Expires in 5 minutes.

Example response

{
  "id": "run_1234",
  "taskIdentifier": "my-task",
  "idempotencyKey": "idempotency_key_1234",
  "tags": [
    "user_5df987al13",
    "org_c6b7dycmxw"
  ],
  "metadata": {
    "foo": "bar"
  },
  "costInCents": 0.00292,
  "baseCostInCents": 0.0025,
  "durationMs": 491,
  "batchId": "batch_1234",
  "payload": {
    "foo": "bar"
  },
  "payloadPresignedUrl": "https://r2.cloudflarestorage.com/packets/yubjwjsfkxnylobaqvqz/dev/run_p4omhh45hgxxnq1re6ovy/payload.json?X-Amz-Expires=300&X-Amz-Date=20240625T154526Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=10b064e58a0680db5b5e077be2be3b2a%2F20240625%2Fauto%2Fs3%2Faws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=88604cb993ffc151b4d73f2439da431d9928488e4b3dcfa4a7c8f1819",
  "output": {
    "foo": "bar"
  },
  "outputPresignedUrl": "https://r2.cloudflarestorage.com/packets/yubjwjsfkxnylobaqvqz/dev/run_p4omhh45hgxxnq1re6ovy/payload.json?X-Amz-Expires=300&X-Amz-Date=20240625T154526Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=10b064e58a0680db5b5e077be2be3b2a%2F20240625%2Fauto%2Fs3%2Faws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=88604cb993ffc151b4d73f2439da431d9928488e4b3dcfa4a7c8f1819",
  "relatedRuns": {
    "root": {
      "id": "run_1234",
      "taskIdentifier": "my-task",
      "idempotencyKey": "idempotency_key_1234",
      "tags": [
        "user_5df987al13",
        "org_c6b7dycmxw"
      ],
      "metadata": {
        "foo": "bar"
      },
      "costInCents": 0.00292,
      "baseCostInCents": 0.0025,
      "durationMs": 491,
      "batchId": "batch_1234"
    },
    "parent": {
      "id": "run_1234",
      "taskIdentifier": "my-task",
      "idempotencyKey": "idempotency_key_1234",
      "tags": [
        "user_5df987al13",
        "org_c6b7dycmxw"
      ],
      "metadata": {
        "foo": "bar"
      },
      "costInCents": 0.00292,
      "baseCostInCents": 0.0025,
      "durationMs": 491,
      "batchId": "batch_1234"
    },
    "children": [
      {
        "id": "run_1234",
        "taskIdentifier": "my-task",
        "idempotencyKey": "idempotency_key_1234",
        "tags": [
          "user_5df987al13",
          "org_c6b7dycmxw"
        ],
        "metadata": {
          "foo": "bar"
        },
        "costInCents": 0.00292,
        "baseCostInCents": 0.0025,
        "durationMs": 491,
        "batchId": "batch_1234"
      }
    ]
  },
  "schedule": {
    "id": "sched_1234",
    "externalId": "user_1234",
    "deduplicationKey": "dedup_key_1234",
    "generator": {
      "expression": "0 0 * * *",
      "description": "Every day at midnight"
    }
  },
  "attempts": [
    {
      "id": "attempt_1234",
      "error": {
        "message": "Something went wrong",
        "name": "Error",
        "stackTrace": "Error: Something went wrong"
      }
    }
  ]
}