agent-tasks

Get a task by repo

Changed on

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

Returns a task by ID scoped to an owner/repo path

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

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/repos/{owner}/{repo}/tasks/{task_id}

Request

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

Path parameters

ownerstring required

The account owner of the repository. The name is not case sensitive.

repostring required

The name of the repository. The name is not case sensitive.

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