Skip to main content
GET
/
task-runs
List task runs
curl --request GET \
  --url https://api.deck.co/v2/task-runs \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "<string>",
      "object": "<string>",
      "status": "<string>",
      "result": "<string>",
      "task_id": "<string>",
      "credential_id": "<string>",
      "session_id": "<string>",
      "workflow_id": "<string>",
      "agent_id": "<string>",
      "source_id": "<string>",
      "runtime_ms": 123,
      "input": "<unknown>",
      "output": "<unknown>",
      "storage": [
        {
          "id": "<string>",
          "object": "<string>",
          "file_name": "<string>",
          "file_type": "<string>",
          "file_size": 123,
          "created_at": "2023-11-07T05:31:56Z"
        }
      ],
      "errors": [
        {
          "type": "<string>",
          "code": "<string>",
          "message": "<string>",
          "field": "<string>"
        }
      ],
      "interaction": "<unknown>",
      "canceled_at": "2023-11-07T05:31:56Z",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "has_more": true,
  "next_cursor": "<string>",
  "request_id": "<string>"
}

Authorizations

Authorization
string
header
required

Secret key (sk_live_...)

Query Parameters

Limit

Maximum number of items to return (1-100, default 20)

starting_after
string

Cursor for forward pagination. Pass the ID of the last item from the previous page.

ending_before
string

Cursor for backward pagination. Pass the ID of the first item from the previous page.

status
string[]

Filter by status: queued, running, cancelling, interaction_required, review_required, completed, canceled, failed

source_id
string[]

Filter by source ID

outcome
string[]

Filter by run result: success, failure, unknown. Maps to the result field on the task run object.

agent_id
string

Unique identifier for the agent (prefixed with agt_).

credential_id
string

Unique identifier for the credential (prefixed with cred_).

task_id
string

Unique identifier for the task (prefixed with task_).

workflow_id
string

Filter by workflow ID.

created_after
string<date-time>

Return runs created after this timestamp (ISO 8601).

created_before
string<date-time>

Return runs created before this timestamp (ISO 8601).

Response

OK

data
object[]

Array of resource objects for the current page.

has_more
boolean

true if there are more results beyond this page.

next_cursor
null | string

Opaque cursor string to pass as the cursor query parameter on the next request. null when there are no more pages.

request_id
null | string

Unique identifier for the API request.