runs

List runs in a specific environment. You can filter the runs by status, created at, task identifier, version, and more. Without a filter[createdAt] value, only runs created in the last 7 days are returned. This endpoint is for browsing, reporting, and bulk operations, not for coordinating runs, so don't call it before every trigger or poll it in a loop. See runs.list() best practices.

get/api/v1/runs

Request

Query parameters

sizeinteger

Number of runs per page. Maximum is 100.

afterstring

The ID of the run to start the page after. This will set the direction of the pagination to forward.

beforestring

The ID of the run to start the page before. This will set the direction of the pagination to backward.

Use this parameter to paginate the results. You can specify the number of runs per page, and the ID of the run to start the page after or before.

For object fields like page, you should use the "form" encoding style. For example, to get the next page of runs, you can use page[after]=run_1234.

statusstring[]
taskIdentifierstring[]

The identifier of the task that was run

versionstring[]

The version of the worker that executed the run

bulkActionstring

The bulk action ID to filter the runs by

schedulestring

The schedule ID to filter the runs by

isTestboolean

Whether the run is a test run or not

tagstring[]

The tags that are attached to the run

errorstring

An error group ID (starts with error_). Lists the runs behind that error group.

Use this parameter to filter the runs. You can filter by created at, status, task identifier, and version.

For array fields, you can provide multiple values to filter by using a comma-separated list. For example, to get QUEUED and EXECUTING runs, you can use filter[status]=QUEUED,EXECUTING.

For object fields, you should use the "form" encoding style. For example, to filter by the period, you can use filter[createdAt][period]=1d.

{
  "createdAt": {
    "period": "1d"
  },
  "bulkAction": "bulk_1234",
  "schedule": "schedule_1234",
  "error": "error_8f3b2a1c9d4e5f60"
}

Response

Successful request

Example response

{
  "data": [
    {
      "id": "run_1234",
      "taskIdentifier": "my-task",
      "env": {
        "id": "cl1234",
        "name": "dev",
        "user": "Anna"
      },
      "idempotencyKey": "idempotency_key_1234",
      "tags": [
        "user_5df987al13",
        "org_c6b7dycmxw"
      ],
      "costInCents": 0.00292,
      "baseCostInCents": 0.0025,
      "durationMs": 491
    }
  ],
  "pagination": {
    "next": "run_1234",
    "previous": "run_5678"
  }
}

Changes

    • breaking

      removed the enum value WAITING_FOR_DEPLOY from the property status/items/ of the query request parameter filter

    • warning

      added the new PENDING_VERSION enum value to the // response property for the response status

    • info

      added the enum value PENDING_VERSION to the property status/items/ of the query request parameter filter

    • info

      removed the WAITING_FOR_DEPLOY enum value from the // response property for the response status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status