agent-tasks

Get a task by ID

Changed on

[!NOTE] This endpoint is in public preview and is subject to change.

Returns a task by ID with its associated sessions

Fine-grained access tokens for "Get a task by ID"

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

The fine-grained token must have the following permission set:

  • "Agent tasks" repository permissions (read)

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

get/agents/tasks/{task_id}

Request

  • Base URL: https://api.github.com
  • URL: https://api.github.com/agents/tasks/{task_id}
  • Auth: none declared

Path parameters

task_idstring required

The unique identifier of the task.

Response

Task retrieved successfully

idstring required

Unique task identifier

urlstring

API URL for this task

html_urlstring

Web URL for this task

namestring

Human-readable name derived from the task prompt

creator_type'user' | 'organization'

Type of the task creator

state'queued' | 'in_progress' | 'completed' | 'failed' | 'idle' | 'waiting_for_user' | 'timed_out' | 'cancelled' required

Current state of the task, derived from its most recent session

session_countinteger

Number of sessions in this task

archived_atstring date-time nullable

Timestamp when the task was archived, null if not archived

updated_atstring date-time

Timestamp of the most recent update

created_atstring date-time required

Timestamp when the task was created

Changes

  • 2022-11-2837bb7bcfab4bRevision changes
    • info

      added subschema #1 subschema #2 to the response body allOf list for the response status

    • info

      removed subschema #1 subschema #2 from the response body allOf list for the response status

  • 2022-11-283cef241cbe89Revision changes
    • info

      endpoint added