← All tags

Agent-Tasks API Reference

Endpoints to manage and interact with agent tasks.

5 endpoints tagged agent-tasks, each listing its parameters and possible responses. Search or scroll the index below to jump to a specific endpoint.

No endpoints match your search.

List tasks for repository

GET /agents/repos/{owner}/{repo}/tasks

Returns a list of tasks for a specific repository

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100).
pagequerynoThe page number of the results to fetch.
sortquerynoThe field to sort results by. Can be updated_at or created_at.
directionquerynoThe direction to sort results. Can be asc or desc.
statequerynoComma-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_archivedquerynoFilter by archived status. When true, returns only archived tasks. When false or omitted, returns only non-archived tasks. Defaults to false.
sincequerynoOnly show tasks updated at or after this time (ISO 8601 timestamp)
creator_idquerynoFilter tasks by creator user ID. Accepts one or more user IDs.

Responses

StatusDescriptionHas JSON body
200Tasks retrieved successfullyyes
400Bad requestyes
401Authentication requiredyes
403Insufficient permissionsyes
404Resource not foundyes
422Validation Failedyes

Start a task

POST /agents/repos/{owner}/{repo}/tasks

Starts a new Copilot cloud agent task for a repository.

Parameters

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

Responses

StatusDescriptionHas JSON body
201Task created successfullyyes
400Problems parsing JSONyes
401Authentication requiredyes
403Insufficient permissionsyes
422Validation Failedyes

Get a task by repo

GET /agents/repos/{owner}/{repo}/tasks/{task_id}

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

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository. The name is not case sensitive.
task_idpathyesThe unique identifier of the task.

Responses

StatusDescriptionHas JSON body
200Task retrieved successfullyyes
400Bad requestyes
401Authentication requiredyes
403Insufficient permissionsyes
404Resource not foundyes
422Validation Failedyes

List tasks

GET /agents/tasks

Returns a list of tasks for the authenticated user

Parameters

NameInRequiredDescription
per_pagequerynoThe number of results per page (max 100).
pagequerynoThe page number of the results to fetch.
sortquerynoThe field to sort results by. Can be updated_at or created_at.
directionquerynoThe direction to sort results. Can be asc or desc.
statequerynoComma-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_archivedquerynoFilter by archived status. When true, returns only archived tasks. When false or omitted, returns only non-archived tasks. Defaults to false.
sincequerynoOnly show tasks updated at or after this time (ISO 8601 timestamp)

Responses

StatusDescriptionHas JSON body
200Tasks retrieved successfullyyes
400Bad requestyes
401Authentication requiredyes
403Insufficient permissionsyes
422Validation Failedyes

Get a task by ID

GET /agents/tasks/{task_id}

Returns a task by ID with its associated sessions

Parameters

NameInRequiredDescription
task_idpathyesThe unique identifier of the task.

Responses

StatusDescriptionHas JSON body
200Task retrieved successfullyyes
400Problems parsing requestyes
401Authentication requiredyes
403Insufficient permissionsyes
404Resource not foundyes
422Validation Failedyes