Skip to main content
GET
/
api
/
v1
/
deployments
TypeScript
const response = await fetch(
  "https://api.trigger.dev/api/v1/deployments",
  {
    method: "GET",
    headers: {
      "Authorization": `Bearer ${secretKey}`,
    },
  }
);
const { data, pagination } = await response.json();
{
  "data": [
    {
      "id": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "shortCode": "<string>",
      "version": "<string>",
      "runtime": "<string>",
      "runtimeVersion": "<string>",
      "status": "PENDING",
      "deployedAt": "2023-11-07T05:31:56Z",
      "git": {},
      "error": {}
    }
  ],
  "pagination": {
    "next": "<string>"
  }
}

Authorizations

Authorization
string
header
required

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";

configure({ accessToken: "tr_dev_1234" });

Query Parameters

page[after]
string

The deployment ID to start the search from, to get the next page.

page[size]
integer
default:20

The number of deployments to return (default 20, min 5, max 100).

Required range: 5 <= x <= 100
status
enum<string>

Filter deployments by status.

Available options:
PENDING,
BUILDING,
DEPLOYING,
DEPLOYED,
FAILED,
CANCELED,
TIMED_OUT
period
string

Filter deployments created within this period (e.g. 1d, 7d, 3h).

from
string

Filter deployments created on or after this date (ISO 8601).

to
string

Filter deployments created on or before this date (ISO 8601). Only applied when from is also provided.

Response

Successful request

data
object[]
pagination
object