GET/agents/automations/{automation_id}/tasks

List tasks for an automation

Returns a list of tasks triggered by the specified automation.

User-owned automation history is available only to its creator, while repository-owned automation history is available to anyone with read access to the repository. Deleted and unlisted tasks are excluded. Tasks produced by private-session agents are excluded unless the caller created the task, is a task collaborator, or the task is shared.

Fine-grained access tokens for "List tasks for an automation"

This endpoint works with the following fine-grained token types:

The fine-grained token must have one of the following permission sets for each repository accessed by this request:

  • "Agent tasks" repository permissions (read)
  • "Contents" repository permissions (read)

The required permission set depends on each repository's Automation permission configuration.

GitHub App installation access tokens are not supported for this endpoint.

7 parameters
automation_idstringrequired
The unique identifier of the automation.
per_pageintegeroptional
The number of results per page (max 100).
Default:30
pageintegeroptional
The page number of the results to fetch.
Default:1
sortstringoptional
The field to sort results by. Can be `updated_at` or `created_at`.
Allowed:updated_atcreated_atDefault:updated_at
directionstringoptional
The direction to sort results. Can be `asc` or `desc`.
Allowed:ascdescDefault:desc
statestringoptional
Comma-separated list of task states to filter by. Can be any combination of: `queued`, `in_progress`, `completed`, `failed`, `idle`, `waiting_for_user`, `timed_out`, `cancelled`.
is_archivedbooleanoptional
Filter by archived status. When `true`, returns only archived tasks. When `false` or omitted, returns only non-archived tasks. Defaults to `false`.
Default:false

4 status codes
200Tasks retrieved successfully
tasksarray<object>required
Tasks created by the automation.
401Authentication required
messagestringrequired
Summary message (e.g. "Validation Failed", "Not Found")
errorsarray<object>optional
List of validation errors (present only for 422 responses)
documentation_urlstringrequired
URL to relevant API documentation
404Not found
messagestringrequired
Summary message (e.g. "Validation Failed", "Not Found")
errorsarray<object>optional
List of validation errors (present only for 422 responses)
documentation_urlstringrequired
URL to relevant API documentation
422Validation Failed
messagestringrequired
Summary message (e.g. "Validation Failed", "Not Found")
errorsarray<object>optional
List of validation errors (present only for 422 responses)
documentation_urlstringrequired
URL to relevant API documentation

Error handling

A 401 is returned: Authentication required. A 404 is returned: Not found. A 422 is returned: Validation Failed.