List waitpoint tokens
Returns a paginated list of waitpoint tokens for the current environment. Results are ordered by creation date, newest first. Use cursor-based pagination with page[after] and page[before] to navigate pages.
secretKeyAuthorizationBearer <token>Use a named environment API key. It starts with tr_dev_sk_, tr_prod_sk_, tr_stg_sk_, etc.
Create a named API key in the API Keys section of your Trigger.dev project dashboard. Choose the narrowest access preset that supports your integration.
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_sk_1234" });page[size]?integerNumber of tokens to return per page (1–100).
1 <= value <= 100page[after]?stringReturn tokens after this cursor (from pagination.next in a previous response).
page[before]?stringReturn tokens before this cursor (from pagination.previous in a previous response).
filter[status]?stringComma-separated list of statuses to filter by. Allowed values: WAITING, COMPLETED, TIMED_OUT.
filter[idempotencyKey]?stringFilter by idempotency key.
filter[createdAt][period]?stringShorthand time period to filter by creation date (e.g. 1h, 24h, 7d). Cannot be combined with filter[createdAt][from] or filter[createdAt][to].
filter[createdAt][from]?stringFilter tokens created at or after this ISO 8601 timestamp.
date-timefilter[createdAt][to]?stringFilter tokens created at or before this ISO 8601 timestamp.
date-timeSuccessful request
application/json- response
data*array<>An array of waitpoint token objects.
pagination*import { wait } from "@trigger.dev/sdk";// Iterate over all tokens (auto-paginated)for await (const token of wait.listTokens()) { console.log(token.id, token.status);}// Filter by status and tagsfor await (const token of wait.listTokens({ status: ["WAITING"], tags: ["user:1234567"],})) { console.log(token.id);}{ "data": [ { "id": "waitpoint_abc123", "url": "https://api.trigger.dev/api/v1/waitpoints/tokens/waitpoint_abc123/callback/abc123hash", "status": "WAITING", "idempotencyKey": "string", "idempotencyKeyExpiresAt": "2019-08-24T14:15:22Z", "timeoutAt": "2019-08-24T14:15:22Z", "completedAt": "2019-08-24T14:15:22Z", "output": "string", "outputType": "string", "outputIsError": true, "tags": [ "string" ], "createdAt": "2019-08-24T14:15:22Z" } ], "pagination": { "next": "waitpoint_abc123", "previous": "waitpoint_xyz789" }}Was this page helpful?
Last updated
Edit on GitHub