GET
/
api
/
v3
/
runs
/
{runId}

Authorizations

Authorization
string
headerrequired

Use your project-specific Secret API key. Will start with tr_dev_, tr_prod, tr_stg, etc.

You can find your Secret API key in the API Keys section of your Trigger.dev project dashboard.

Our TypeScript SDK will default to using the value of the TRIGGER_SECRET_KEY environment variable if it is set. If you are using the SDK in a different environment, you can set the key using the configure function.

import { configure } from "@trigger.dev/sdk/v3";

configure({ secretKey: "tr_dev_1234" });

Path Parameters

runId
string
required

The ID of an run, starts with run_. The run ID will be returned when you trigger a run on a task.

Response

200 - application/json
id
string
required

The unique ID of the run, prefixed with run_

status
enum<string>
required

The status of the run

Available options:
DELAYED,
WAITING_FOR_DEPLOY,
QUEUED,
EXECUTING,
REATTEMPTING,
FROZEN,
COMPLETED,
CANCELED,
FAILED,
CRASHED,
INTERRUPTED,
SYSTEM_FAILURE
taskIdentifier
string
required

The identifier of the task that was run

version
string

The version of the worker that executed the run

idempotencyKey
string

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

createdAt
string
required
updatedAt
string
required
isTest
boolean

Whether the run is a test run or not

startedAt
string

The time the run started

finishedAt
string

The time the run finished

delayedUntil
string

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

ttl

The time-to-live for this run. If the run is not executed within this time, it will be removed from the queue and never execute. You can use a string in this format: 1h, 1m, 1h42m or a number of seconds (min. 1).

expiredAt
string

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

tags
string[]

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

metadata
object

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

costInCents
number

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

baseCostInCents
number

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

durationMs
number

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

depth
integer

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

batchId
string

The ID of the batch that this run belongs to

triggerFunction
enum<string>

The name of the function that triggered the run

Available options:
trigger,
triggerAndWait,
batchTrigger,
batchTriggerAndWait
payload
object

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

payloadPresignedUrl
string

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.

output
object

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

outputPresignedUrl
string

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.

relatedRuns
object
schedule
object

The schedule that triggered the run. Will be omitted if the run was not triggered by a schedule

attempts
object[]
required