diff --git a/content/copilot/reference/ai-models/model-comparison.md b/content/copilot/reference/ai-models/model-comparison.md index a28dbc89fdd7..a9d5cd85e4ad 100644 --- a/content/copilot/reference/ai-models/model-comparison.md +++ b/content/copilot/reference/ai-models/model-comparison.md @@ -91,7 +91,7 @@ These models are designed for tasks that require step-by-step reasoning, complex | {% data variables.copilot.copilot_gpt_5_mini %} | Delivers deep reasoning and debugging with faster responses and lower resource usage than GPT-5. Ideal for interactive sessions and step-by-step code analysis. | | {% data variables.copilot.copilot_gpt_54 %} | Great at complex reasoning, code analysis, and technical decision-making. | | {% data variables.copilot.copilot_claude_sonnet_46 %} | Improves on Sonnet 4.5 with more reliable completions and smarter reasoning under pressure. | -| {% data variables.copilot.copilot_claude_opus_46 %} | Anthropic’s most powerful model. Improves on {% data variables.copilot.copilot_claude_opus_45 %}. | +| {% data variables.copilot.copilot_claude_opus_47 %} | Anthropic’s most powerful model. Improves on {% data variables.copilot.copilot_claude_opus_46 %}. | | {% data variables.copilot.copilot_gemini_31_pro %} | Advanced reasoning across long contexts and scientific or technical analysis. | | {% data variables.copilot.copilot_goldeneye %} | Complex problem-solving challenges and sophisticated reasoning. | diff --git a/content/copilot/reference/ai-models/model-hosting.md b/content/copilot/reference/ai-models/model-hosting.md index 57628a8be32f..ed9d8835654c 100644 --- a/content/copilot/reference/ai-models/model-hosting.md +++ b/content/copilot/reference/ai-models/model-hosting.md @@ -45,6 +45,8 @@ These models are deployed on {% data variables.product.github %} managed Azure O ## Anthropic models +{% data reusables.copilot.opus-47-promo-period %} + Used for: * {% data variables.copilot.copilot_claude_haiku_45 %} @@ -52,6 +54,7 @@ Used for: * {% data variables.copilot.copilot_claude_opus_45 %} * {% data variables.copilot.copilot_claude_opus_46 %} * {% data variables.copilot.copilot_claude_opus_46_fast %} +* {% data variables.copilot.copilot_claude_opus_47 %} * {% data variables.copilot.copilot_claude_sonnet_40 %} * {% data variables.copilot.copilot_claude_sonnet_46 %} diff --git a/content/copilot/reference/ai-models/supported-models.md b/content/copilot/reference/ai-models/supported-models.md index 95d4b288cb29..8f219f0ebc54 100644 --- a/content/copilot/reference/ai-models/supported-models.md +++ b/content/copilot/reference/ai-models/supported-models.md @@ -91,6 +91,8 @@ The following table shows which AI models are available in each {% data variable > * {% data variables.copilot.copilot_claude_sonnet_46 %} > * {% data variables.copilot.copilot_gpt_54_mini %} +{% data reusables.copilot.opus-47-promo-period %} + Each model has a premium request multiplier, based on its complexity and resource usage. If you are on a paid {% data variables.product.prodname_copilot_short %} plan, your premium request allowance is deducted according to this multiplier. For more information about premium requests, see [AUTOTITLE](/copilot/managing-copilot/monitoring-usage-and-entitlements/about-premium-requests). diff --git a/content/rest/agent-tasks/agent-tasks.md b/content/rest/agent-tasks/agent-tasks.md deleted file mode 100644 index 939ea0c99842..000000000000 --- a/content/rest/agent-tasks/agent-tasks.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Agent tasks -shortTitle: Agent tasks -intro: Use the REST API to start and manage {% data variables.copilot.copilot_cloud_agent %} tasks. -versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖 - fpt: '*' - ghec: '*' -autogenerated: rest -allowTitleToDifferFromFilename: true ---- - - diff --git a/content/rest/agent-tasks/index.md b/content/rest/agent-tasks/index.md deleted file mode 100644 index 26ca85b0990f..000000000000 --- a/content/rest/agent-tasks/index.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Agent tasks -autogenerated: rest -allowTitleToDifferFromFilename: true -children: - - /agent-tasks -versions: - fpt: '*' - ghec: '*' ---- - diff --git a/content/rest/index.md b/content/rest/index.md index 275694de8bd8..5c3e8f7048f2 100644 --- a/content/rest/index.md +++ b/content/rest/index.md @@ -51,7 +51,6 @@ children: - /guides - /actions - /activity - - /agent-tasks - /announcement-banners - /apps - /billing diff --git a/data/reusables/copilot/copilot-cloud-agent-non-auto-models.md b/data/reusables/copilot/copilot-cloud-agent-non-auto-models.md index ecccd4824da5..a2334571aa66 100644 --- a/data/reusables/copilot/copilot-cloud-agent-non-auto-models.md +++ b/data/reusables/copilot/copilot-cloud-agent-non-auto-models.md @@ -1,3 +1,4 @@ * {% data variables.copilot.copilot_claude_opus_45 %} * {% data variables.copilot.copilot_claude_opus_46 %} +* {% data variables.copilot.copilot_claude_opus_47 %} * {% data variables.copilot.copilot_gpt_52_codex %} diff --git a/data/reusables/copilot/opus-47-promo-period.md b/data/reusables/copilot/opus-47-promo-period.md new file mode 100644 index 000000000000..e078202a37b1 --- /dev/null +++ b/data/reusables/copilot/opus-47-promo-period.md @@ -0,0 +1 @@ +> [!IMPORTANT] {% data variables.copilot.copilot_claude_opus_47 %} is available at a promotional multiplier of 7.5x until April 30, 2026. diff --git a/data/tables/copilot/model-comparison.yml b/data/tables/copilot/model-comparison.yml index 95b165fbc3b6..72f8bdeaec47 100644 --- a/data/tables/copilot/model-comparison.yml +++ b/data/tables/copilot/model-comparison.yml @@ -63,6 +63,11 @@ excels_at: Complex problem-solving challenges, sophisticated reasoning further_reading: 'Not available' +- name: Claude Opus 4.7 + task_area: Deep reasoning and debugging + excels_at: Complex problem-solving challenges, sophisticated reasoning + further_reading: 'Not available' + - name: Claude Sonnet 4.0 task_area: Deep reasoning and debugging excels_at: Performance and practicality, perfectly balanced for coding workflows diff --git a/data/tables/copilot/model-multipliers.yml b/data/tables/copilot/model-multipliers.yml index dc47bfbaf939..0c833be0d54d 100644 --- a/data/tables/copilot/model-multipliers.yml +++ b/data/tables/copilot/model-multipliers.yml @@ -25,6 +25,10 @@ multiplier_paid: 30 multiplier_free: Not applicable +- name: Claude Opus 4.7 + multiplier_paid: 7.5 + multiplier_free: Not applicable + - name: Claude Sonnet 4 multiplier_paid: 1 multiplier_free: Not applicable diff --git a/data/tables/copilot/model-release-status.yml b/data/tables/copilot/model-release-status.yml index 450e6e1c0c8f..9777d57224b8 100644 --- a/data/tables/copilot/model-release-status.yml +++ b/data/tables/copilot/model-release-status.yml @@ -96,6 +96,13 @@ ask_mode: true edit_mode: true +- name: 'Claude Opus 4.7' + provider: 'Anthropic' + release_status: 'GA' + agent_mode: true + ask_mode: true + edit_mode: true + - name: 'Claude Sonnet 4' provider: 'Anthropic' release_status: 'GA' diff --git a/data/tables/copilot/model-supported-clients.yml b/data/tables/copilot/model-supported-clients.yml index 5ad33b6c75da..bf16d623fbd9 100644 --- a/data/tables/copilot/model-supported-clients.yml +++ b/data/tables/copilot/model-supported-clients.yml @@ -50,6 +50,15 @@ xcode: false jetbrains: false +- name: Claude Opus 4.7 + dotcom: true + cli: true + vscode: true + vs: true + eclipse: true + xcode: true + jetbrains: true + - name: Claude Sonnet 4 dotcom: true cli: true diff --git a/data/tables/copilot/model-supported-plans.yml b/data/tables/copilot/model-supported-plans.yml index c10b582e81d5..4f40eb6ebb1a 100644 --- a/data/tables/copilot/model-supported-plans.yml +++ b/data/tables/copilot/model-supported-plans.yml @@ -45,6 +45,14 @@ business: false enterprise: true +- name: Claude Opus 4.7 + free: false + student: false + pro: false + pro_plus: true + business: true + enterprise: true + - name: Claude Sonnet 4 free: false student: false diff --git a/data/variables/copilot.yml b/data/variables/copilot.yml index 6b1717990d2f..169918dd50fc 100644 --- a/data/variables/copilot.yml +++ b/data/variables/copilot.yml @@ -146,6 +146,7 @@ copilot_claude_opus_41: 'Claude Opus 4.1' copilot_claude_opus_45: 'Claude Opus 4.5' copilot_claude_opus_46: 'Claude Opus 4.6' copilot_claude_opus_46_fast: 'Claude Opus 4.6 (fast mode) (preview)' +copilot_claude_opus_47: 'Claude Opus 4.7' copilot_claude_sonnet: 'Claude Sonnet' copilot_claude_sonnet_35: 'Claude Sonnet 3.5' copilot_claude_sonnet_37: 'Claude Sonnet 3.7' diff --git a/src/events/components/events.ts b/src/events/components/events.ts index 6a1260095ca4..31548c3bf87e 100644 --- a/src/events/components/events.ts +++ b/src/events/components/events.ts @@ -120,6 +120,7 @@ export function sendEvent({ page_document_type: getMetaContent('page-document-type'), page_type: getMetaContent('page-type'), content_type: getMetaContent('page-content-type'), + docs_team_metrics: getMetaContent('docs-team-metrics') || undefined, status: Number(getMetaContent('status') || 0), is_logged_in: isLoggedIn(), octo_client_id: getOctoClientId(), diff --git a/src/events/lib/schema.ts b/src/events/lib/schema.ts index 51ef8f419bc3..538ba0ef2966 100644 --- a/src/events/lib/schema.ts +++ b/src/events/lib/schema.ts @@ -106,6 +106,11 @@ const context = { description: 'Optional content type from the content frontmatter (EDI content models).', enum: contentTypesEnum, }, + docs_team_metrics: { + type: 'string', + description: + 'Optional comma-separated list of docsTeamMetrics frontmatter values for internal analytics filtering.', + }, status: { type: 'number', description: 'The HTTP response status code of the main page HTML.', diff --git a/src/events/types.ts b/src/events/types.ts index 006d244ada23..41a323daaf88 100644 --- a/src/events/types.ts +++ b/src/events/types.ts @@ -37,6 +37,7 @@ export type EventProps = { page_document_type: string page_type: string content_type: string + docs_team_metrics?: string status: number is_logged_in: boolean dotcom_user: string diff --git a/src/frame/components/DefaultLayout.tsx b/src/frame/components/DefaultLayout.tsx index 84a715e992f9..abff184d2be5 100644 --- a/src/frame/components/DefaultLayout.tsx +++ b/src/frame/components/DefaultLayout.tsx @@ -162,6 +162,9 @@ export const DefaultLayout = (props: Props) => { )} {page.contentType && } {page.documentType && } + {page.docsTeamMetrics && page.docsTeamMetrics.length > 0 && ( + + )} {status && } {/* OpenGraph data */} diff --git a/src/frame/components/context/MainContext.tsx b/src/frame/components/context/MainContext.tsx index fa629f85db7f..b837c2cf47ef 100644 --- a/src/frame/components/context/MainContext.tsx +++ b/src/frame/components/context/MainContext.tsx @@ -125,6 +125,7 @@ export type MainContextT = { hidden: boolean noEarlyAccessBanner: boolean applicableVersions: string[] + docsTeamMetrics?: string[] } | null relativePath?: string sidebarTree?: ProductTreeNode | null @@ -227,6 +228,7 @@ export const getMainContext = async (req: any, res: any): Promise applicableVersions: req.context.page?.permalinks.map((obj: any) => obj.pageVersion) || [], hidden: req.context.page.hidden || false, noEarlyAccessBanner: req.context.page.noEarlyAccessBanner || false, + docsTeamMetrics: req.context.page.docsTeamMetrics || undefined, }) || null diff --git a/src/redirects/lib/static/redirect-exceptions.txt b/src/redirects/lib/static/redirect-exceptions.txt index 9f7a56931291..7bf99b7f62f6 100644 --- a/src/redirects/lib/static/redirect-exceptions.txt +++ b/src/redirects/lib/static/redirect-exceptions.txt @@ -48,3 +48,8 @@ - /github-ae@latest/admin/overview/about-data-residency - /github-ae@latest/admin/overview/deploying-github-ae - /github-ae@latest/admin/overview/initializing-github-ae + +# Agent tasks REST API was rolled back before launch +/rest +- /rest/agent-tasks +- /rest/agent-tasks/agent-tasks diff --git a/src/rest/data/fpt-2022-11-28/agent-tasks.json b/src/rest/data/fpt-2022-11-28/agent-tasks.json deleted file mode 100644 index 1dab325724e0..000000000000 --- a/src/rest/data/fpt-2022-11-28/agent-tasks.json +++ /dev/null @@ -1,1994 +0,0 @@ -{ - "agent-tasks": [ - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/agents/repos/{owner}/{repo}/tasks", - "title": "List tasks for repository", - "category": "agent-tasks", - "subcategory": "agent-tasks", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

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

" - }, - { - "name": "repo", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

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

" - }, - { - "name": "per_page", - "in": "query", - "schema": { - "type": "integer", - "default": 30, - "minimum": 1, - "maximum": 100 - }, - "description": "

The number of results per page (max 100).

" - }, - { - "name": "page", - "in": "query", - "schema": { - "type": "integer", - "default": 1, - "minimum": 1 - }, - "description": "

The page number of the results to fetch.

" - }, - { - "name": "sort", - "in": "query", - "schema": { - "type": "string", - "default": "updated_at", - "enum": [ - "updated_at", - "created_at" - ] - }, - "description": "

The field to sort results by. Can be updated_at or created_at.

" - }, - { - "name": "direction", - "in": "query", - "schema": { - "type": "string", - "default": "desc", - "enum": [ - "asc", - "desc" - ] - }, - "description": "

The direction to sort results. Can be asc or desc.

" - }, - { - "name": "state", - "in": "query", - "schema": { - "type": "string" - }, - "description": "

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.

" - }, - { - "name": "is_archived", - "in": "query", - "schema": { - "type": "boolean", - "default": false - }, - "description": "

Filter by archived status. When true, returns only archived tasks. When false or omitted, returns only non-archived tasks. Defaults to false.

" - }, - { - "name": "since", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - }, - "description": "

Only show tasks updated at or after this time (ISO 8601 timestamp)

" - }, - { - "name": "creator_id", - "in": "query", - "schema": { - "type": "integer" - }, - "description": "

Filter tasks by creator user ID

" - } - ], - "bodyParameters": [], - "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change.

\n
\n

Returns a list of tasks for a specific repository

", - "codeExamples": [ - { - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "owner": "OWNER", - "repo": "REPO" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Tasks retrieved successfully

", - "example": { - "tasks": [ - { - "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "url": "https://api.github.com/agents/repos/octocat/hello-world/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "html_url": "https://github.com/octocat/hello-world/copilot/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "creator": { - "id": 1 - }, - "creator_type": "user", - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "state": "completed", - "session_count": 1, - "artifacts": [ - { - "provider": "github", - "type": "pull", - "data": { - "id": 42 - } - } - ], - "archived_at": null, - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T01:00:00Z" - } - ] - }, - "schema": { - "type": "object", - "required": [ - "tasks" - ], - "properties": { - "tasks": { - "type": "array", - "items": { - "type": "object", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique task identifier" - }, - "url": { - "type": "string", - "description": "API URL for this task" - }, - "html_url": { - "type": "string", - "description": "Web URL for this task" - }, - "name": { - "type": "string", - "description": "Human-readable name derived from the task prompt" - }, - "creator": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - } - ], - "description": "The entity who created this task" - }, - "creator_type": { - "type": "string", - "description": "Type of the task creator", - "enum": [ - "user", - "organization" - ] - }, - "user_collaborators": { - "type": "array", - "items": { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "description": "User objects of collaborators on this task", - "deprecated": true - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this task belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "state": { - "type": "string", - "description": "Current state of the task, derived from its most recent session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "session_count": { - "type": "integer", - "format": "int32", - "description": "Number of sessions in this task" - }, - "artifacts": { - "type": "array", - "items": { - "type": "object", - "description": "A resource generated by the task", - "required": [ - "provider", - "type", - "data" - ], - "properties": { - "provider": { - "type": "string", - "enum": [ - "github" - ], - "description": "Provider namespace" - }, - "type": { - "type": "string", - "enum": [ - "pull", - "branch" - ], - "description": "Type of artifact. Available Values: `pull`, `branch`.\n" - }, - "data": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub resource (pull request, issue, etc.)", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "GitHub resource ID" - }, - "global_id": { - "type": "string", - "description": "GraphQL global ID" - } - } - }, - { - "type": "object", - "description": "A Git branch reference", - "required": [ - "head_ref", - "base_ref" - ], - "properties": { - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - } - } - } - ], - "description": "Resource data (shape depends on type)" - } - } - }, - "description": "Resources created by this task (PRs, branches, etc.)" - }, - "archived_at": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Timestamp when the task was archived, null if not archived" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp of the most recent update" - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the task was created" - } - } - }, - "description": "List of tasks" - }, - "total_active_count": { - "type": "integer", - "format": "int32", - "description": "Total count of active (non-archived) tasks" - }, - "total_archived_count": { - "type": "integer", - "format": "int32", - "description": "Total count of archived tasks" - } - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Tasks retrieved successfully

" - }, - { - "httpStatusCode": "400", - "description": "

Bad request

" - }, - { - "httpStatusCode": "401", - "description": "

Authentication required

" - }, - { - "httpStatusCode": "403", - "description": "

Insufficient permissions

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "422", - "description": "

Validation Failed

" - } - ], - "previews": [] - }, - { - "serverUrl": "https://api.github.com", - "verb": "post", - "requestPath": "/agents/repos/{owner}/{repo}/tasks", - "title": "Create a task", - "category": "agent-tasks", - "subcategory": "agent-tasks", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

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

" - }, - { - "name": "repo", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

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

" - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "prompt", - "description": "

The user's prompt for the agent

", - "isRequired": true - }, - { - "type": "string", - "name": "model", - "description": "

The model to use for this task. The allowed models may change over time and depend on the user's GitHub Copilot plan and organization policies. Currently supported values: claude-sonnet-4.6, claude-opus-4.6, gpt-5.2-codex, gpt-5.3-codex, gpt-5.4, claude-sonnet-4.5, claude-opus-4.5

" - }, - { - "type": "boolean", - "name": "create_pull_request", - "description": "

Whether to create a PR.

", - "default": false - }, - { - "type": "string", - "name": "base_ref", - "description": "

Base ref for new branch/PR

" - } - ], - "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change.

\n
\n

Creates a new task for a repository.

", - "codeExamples": [ - { - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "prompt": "Fix the login button on the homepage", - "base_ref": "main" - }, - "parameters": { - "owner": "OWNER", - "repo": "REPO" - } - }, - "response": { - "statusCode": "201", - "contentType": "application/json", - "description": "

Task created successfully

", - "example": { - "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "url": "https://api.github.com/agents/repos/octocat/hello-world/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "html_url": "https://github.com/octocat/hello-world/copilot/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "creator": { - "id": 1 - }, - "creator_type": "user", - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "state": "queued", - "session_count": 1, - "artifacts": [], - "archived_at": null, - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T00:00:00Z" - }, - "schema": { - "type": "object", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique task identifier" - }, - "url": { - "type": "string", - "description": "API URL for this task" - }, - "html_url": { - "type": "string", - "description": "Web URL for this task" - }, - "name": { - "type": "string", - "description": "Human-readable name derived from the task prompt" - }, - "creator": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - } - ], - "description": "The entity who created this task" - }, - "creator_type": { - "type": "string", - "description": "Type of the task creator", - "enum": [ - "user", - "organization" - ] - }, - "user_collaborators": { - "type": "array", - "items": { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "description": "User objects of collaborators on this task", - "deprecated": true - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this task belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "state": { - "type": "string", - "description": "Current state of the task, derived from its most recent session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "session_count": { - "type": "integer", - "format": "int32", - "description": "Number of sessions in this task" - }, - "artifacts": { - "type": "array", - "items": { - "type": "object", - "description": "A resource generated by the task", - "required": [ - "provider", - "type", - "data" - ], - "properties": { - "provider": { - "type": "string", - "enum": [ - "github" - ], - "description": "Provider namespace" - }, - "type": { - "type": "string", - "enum": [ - "pull", - "branch" - ], - "description": "Type of artifact. Available Values: `pull`, `branch`.\n" - }, - "data": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub resource (pull request, issue, etc.)", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "GitHub resource ID" - }, - "global_id": { - "type": "string", - "description": "GraphQL global ID" - } - } - }, - { - "type": "object", - "description": "A Git branch reference", - "required": [ - "head_ref", - "base_ref" - ], - "properties": { - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - } - } - } - ], - "description": "Resource data (shape depends on type)" - } - } - }, - "description": "Resources created by this task (PRs, branches, etc.)" - }, - "archived_at": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Timestamp when the task was archived, null if not archived" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp of the most recent update" - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the task was created" - } - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "201", - "description": "

Task created successfully

" - }, - { - "httpStatusCode": "400", - "description": "

Problems parsing JSON

" - }, - { - "httpStatusCode": "401", - "description": "

Authentication required

" - }, - { - "httpStatusCode": "403", - "description": "

Insufficient permissions

" - }, - { - "httpStatusCode": "422", - "description": "

Validation Failed

" - } - ], - "previews": [] - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/agents/repos/{owner}/{repo}/tasks/{task_id}", - "title": "Get a task by repo", - "category": "agent-tasks", - "subcategory": "agent-tasks", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

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

" - }, - { - "name": "repo", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

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

" - }, - { - "name": "task_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

The unique identifier of the task.

" - } - ], - "bodyParameters": [], - "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change.

\n
\n

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

", - "codeExamples": [ - { - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "owner": "OWNER", - "repo": "REPO", - "task_id": "TASK_ID" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Task retrieved successfully

", - "example": { - "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "url": "https://api.github.com/agents/repos/octocat/hello-world/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "html_url": "https://github.com/octocat/hello-world/copilot/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "creator": { - "id": 1 - }, - "creator_type": "user", - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "state": "completed", - "session_count": 1, - "artifacts": [ - { - "provider": "github", - "type": "pull", - "data": { - "id": 42 - } - } - ], - "archived_at": null, - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T01:00:00Z", - "sessions": [ - { - "id": "s1a2b3c4-d5e6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "user": { - "id": 1 - }, - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "task_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "state": "completed", - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T01:00:00Z", - "completed_at": "2025-01-01T01:00:00Z", - "prompt": "Fix the login button on the homepage", - "head_ref": "copilot/fix-1", - "base_ref": "main", - "model": "claude-sonnet-4.6" - } - ] - }, - "schema": { - "allOf": [ - { - "type": "object", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique task identifier" - }, - "url": { - "type": "string", - "description": "API URL for this task" - }, - "html_url": { - "type": "string", - "description": "Web URL for this task" - }, - "name": { - "type": "string", - "description": "Human-readable name derived from the task prompt" - }, - "creator": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - } - ], - "description": "The entity who created this task" - }, - "creator_type": { - "type": "string", - "description": "Type of the task creator", - "enum": [ - "user", - "organization" - ] - }, - "user_collaborators": { - "type": "array", - "items": { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "description": "User objects of collaborators on this task", - "deprecated": true - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this task belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "state": { - "type": "string", - "description": "Current state of the task, derived from its most recent session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "session_count": { - "type": "integer", - "format": "int32", - "description": "Number of sessions in this task" - }, - "artifacts": { - "type": "array", - "items": { - "type": "object", - "description": "A resource generated by the task", - "required": [ - "provider", - "type", - "data" - ], - "properties": { - "provider": { - "type": "string", - "enum": [ - "github" - ], - "description": "Provider namespace" - }, - "type": { - "type": "string", - "enum": [ - "pull", - "branch" - ], - "description": "Type of artifact. Available Values: `pull`, `branch`.\n" - }, - "data": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub resource (pull request, issue, etc.)", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "GitHub resource ID" - }, - "global_id": { - "type": "string", - "description": "GraphQL global ID" - } - } - }, - { - "type": "object", - "description": "A Git branch reference", - "required": [ - "head_ref", - "base_ref" - ], - "properties": { - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - } - } - } - ], - "description": "Resource data (shape depends on type)" - } - } - }, - "description": "Resources created by this task (PRs, branches, etc.)" - }, - "archived_at": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Timestamp when the task was archived, null if not archived" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp of the most recent update" - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the task was created" - } - } - }, - { - "type": "object", - "properties": { - "sessions": { - "type": "array", - "items": { - "type": "object", - "description": "Full session details within a task", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Session ID" - }, - "name": { - "type": "string", - "description": "Session name" - }, - "user": { - "description": "The user who created this session", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this session belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "task_id": { - "type": "string", - "description": "Task ID this session belongs to" - }, - "state": { - "type": "string", - "description": "Current state of a session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Creation timestamp" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Last update timestamp" - }, - "completed_at": { - "type": "string", - "format": "date-time", - "description": "Completion timestamp" - }, - "prompt": { - "type": "string", - "description": "Content of the triggering event" - }, - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - }, - "model": { - "type": "string", - "description": "Model used for this session" - }, - "error": { - "type": "object", - "description": "Error details for a failed session", - "properties": { - "message": { - "type": "string", - "description": "Error message" - } - } - } - } - }, - "description": "Sessions associated with this task" - } - } - } - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Task retrieved successfully

" - }, - { - "httpStatusCode": "400", - "description": "

Bad request

" - }, - { - "httpStatusCode": "401", - "description": "

Authentication required

" - }, - { - "httpStatusCode": "403", - "description": "

Insufficient permissions

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "422", - "description": "

Validation Failed

" - } - ], - "previews": [] - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/agents/tasks", - "title": "List tasks", - "category": "agent-tasks", - "subcategory": "agent-tasks", - "parameters": [ - { - "name": "per_page", - "in": "query", - "schema": { - "type": "integer", - "default": 30, - "minimum": 1, - "maximum": 100 - }, - "description": "

The number of results per page (max 100).

" - }, - { - "name": "page", - "in": "query", - "schema": { - "type": "integer", - "default": 1, - "minimum": 1 - }, - "description": "

The page number of the results to fetch.

" - }, - { - "name": "sort", - "in": "query", - "schema": { - "type": "string", - "default": "updated_at", - "enum": [ - "updated_at", - "created_at" - ] - }, - "description": "

The field to sort results by. Can be updated_at or created_at.

" - }, - { - "name": "direction", - "in": "query", - "schema": { - "type": "string", - "default": "desc", - "enum": [ - "asc", - "desc" - ] - }, - "description": "

The direction to sort results. Can be asc or desc.

" - }, - { - "name": "state", - "in": "query", - "schema": { - "type": "string" - }, - "description": "

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.

" - }, - { - "name": "is_archived", - "in": "query", - "schema": { - "type": "boolean", - "default": false - }, - "description": "

Filter by archived status. When true, returns only archived tasks. When false or omitted, returns only non-archived tasks. Defaults to false.

" - }, - { - "name": "since", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - }, - "description": "

Only show tasks updated at or after this time (ISO 8601 timestamp)

" - } - ], - "bodyParameters": [], - "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change.

\n
\n

Returns a list of tasks for the authenticated user

", - "codeExamples": [ - { - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json" - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Tasks retrieved successfully

", - "example": { - "tasks": [ - { - "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "creator": { - "id": 1 - }, - "creator_type": "user", - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "state": "completed", - "session_count": 1, - "artifacts": [ - { - "provider": "github", - "type": "pull", - "data": { - "id": 42 - } - } - ], - "archived_at": null, - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T01:00:00Z" - } - ] - }, - "schema": { - "type": "object", - "required": [ - "tasks" - ], - "properties": { - "tasks": { - "type": "array", - "items": { - "type": "object", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique task identifier" - }, - "url": { - "type": "string", - "description": "API URL for this task" - }, - "html_url": { - "type": "string", - "description": "Web URL for this task" - }, - "name": { - "type": "string", - "description": "Human-readable name derived from the task prompt" - }, - "creator": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - } - ], - "description": "The entity who created this task" - }, - "creator_type": { - "type": "string", - "description": "Type of the task creator", - "enum": [ - "user", - "organization" - ] - }, - "user_collaborators": { - "type": "array", - "items": { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "description": "User objects of collaborators on this task", - "deprecated": true - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this task belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "state": { - "type": "string", - "description": "Current state of the task, derived from its most recent session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "session_count": { - "type": "integer", - "format": "int32", - "description": "Number of sessions in this task" - }, - "artifacts": { - "type": "array", - "items": { - "type": "object", - "description": "A resource generated by the task", - "required": [ - "provider", - "type", - "data" - ], - "properties": { - "provider": { - "type": "string", - "enum": [ - "github" - ], - "description": "Provider namespace" - }, - "type": { - "type": "string", - "enum": [ - "pull", - "branch" - ], - "description": "Type of artifact. Available Values: `pull`, `branch`.\n" - }, - "data": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub resource (pull request, issue, etc.)", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "GitHub resource ID" - }, - "global_id": { - "type": "string", - "description": "GraphQL global ID" - } - } - }, - { - "type": "object", - "description": "A Git branch reference", - "required": [ - "head_ref", - "base_ref" - ], - "properties": { - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - } - } - } - ], - "description": "Resource data (shape depends on type)" - } - } - }, - "description": "Resources created by this task (PRs, branches, etc.)" - }, - "archived_at": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Timestamp when the task was archived, null if not archived" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp of the most recent update" - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the task was created" - } - } - }, - "description": "List of tasks" - }, - "total_active_count": { - "type": "integer", - "format": "int32", - "description": "Total count of active (non-archived) tasks" - }, - "total_archived_count": { - "type": "integer", - "format": "int32", - "description": "Total count of archived tasks" - } - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Tasks retrieved successfully

" - }, - { - "httpStatusCode": "400", - "description": "

Bad request

" - }, - { - "httpStatusCode": "401", - "description": "

Authentication required

" - }, - { - "httpStatusCode": "403", - "description": "

Insufficient permissions

" - }, - { - "httpStatusCode": "422", - "description": "

Validation Failed

" - } - ], - "previews": [] - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/agents/tasks/{task_id}", - "title": "Get a task by ID", - "category": "agent-tasks", - "subcategory": "agent-tasks", - "parameters": [ - { - "name": "task_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

The unique identifier of the task.

" - } - ], - "bodyParameters": [], - "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change.

\n
\n

Returns a task by ID with its associated sessions

", - "codeExamples": [ - { - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "task_id": "TASK_ID" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Task retrieved successfully

", - "example": { - "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "url": "https://api.github.com/agents/repos/octocat/hello-world/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "html_url": "https://github.com/octocat/hello-world/copilot/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "creator": { - "id": 1 - }, - "creator_type": "user", - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "state": "completed", - "session_count": 1, - "artifacts": [ - { - "provider": "github", - "type": "pull", - "data": { - "id": 42 - } - } - ], - "archived_at": null, - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T01:00:00Z", - "sessions": [ - { - "id": "s1a2b3c4-d5e6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "user": { - "id": 1 - }, - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "task_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "state": "completed", - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T01:00:00Z", - "completed_at": "2025-01-01T01:00:00Z", - "prompt": "Fix the login button on the homepage", - "head_ref": "copilot/fix-1", - "base_ref": "main", - "model": "claude-sonnet-4.6" - } - ] - }, - "schema": { - "allOf": [ - { - "type": "object", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique task identifier" - }, - "url": { - "type": "string", - "description": "API URL for this task" - }, - "html_url": { - "type": "string", - "description": "Web URL for this task" - }, - "name": { - "type": "string", - "description": "Human-readable name derived from the task prompt" - }, - "creator": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - } - ], - "description": "The entity who created this task" - }, - "creator_type": { - "type": "string", - "description": "Type of the task creator", - "enum": [ - "user", - "organization" - ] - }, - "user_collaborators": { - "type": "array", - "items": { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "description": "User objects of collaborators on this task", - "deprecated": true - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this task belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "state": { - "type": "string", - "description": "Current state of the task, derived from its most recent session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "session_count": { - "type": "integer", - "format": "int32", - "description": "Number of sessions in this task" - }, - "artifacts": { - "type": "array", - "items": { - "type": "object", - "description": "A resource generated by the task", - "required": [ - "provider", - "type", - "data" - ], - "properties": { - "provider": { - "type": "string", - "enum": [ - "github" - ], - "description": "Provider namespace" - }, - "type": { - "type": "string", - "enum": [ - "pull", - "branch" - ], - "description": "Type of artifact. Available Values: `pull`, `branch`.\n" - }, - "data": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub resource (pull request, issue, etc.)", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "GitHub resource ID" - }, - "global_id": { - "type": "string", - "description": "GraphQL global ID" - } - } - }, - { - "type": "object", - "description": "A Git branch reference", - "required": [ - "head_ref", - "base_ref" - ], - "properties": { - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - } - } - } - ], - "description": "Resource data (shape depends on type)" - } - } - }, - "description": "Resources created by this task (PRs, branches, etc.)" - }, - "archived_at": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Timestamp when the task was archived, null if not archived" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp of the most recent update" - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the task was created" - } - } - }, - { - "type": "object", - "properties": { - "sessions": { - "type": "array", - "items": { - "type": "object", - "description": "Full session details within a task", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Session ID" - }, - "name": { - "type": "string", - "description": "Session name" - }, - "user": { - "description": "The user who created this session", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this session belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "task_id": { - "type": "string", - "description": "Task ID this session belongs to" - }, - "state": { - "type": "string", - "description": "Current state of a session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Creation timestamp" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Last update timestamp" - }, - "completed_at": { - "type": "string", - "format": "date-time", - "description": "Completion timestamp" - }, - "prompt": { - "type": "string", - "description": "Content of the triggering event" - }, - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - }, - "model": { - "type": "string", - "description": "Model used for this session" - }, - "error": { - "type": "object", - "description": "Error details for a failed session", - "properties": { - "message": { - "type": "string", - "description": "Error message" - } - } - } - } - }, - "description": "Sessions associated with this task" - } - } - } - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Task retrieved successfully

" - }, - { - "httpStatusCode": "400", - "description": "

Problems parsing request

" - }, - { - "httpStatusCode": "401", - "description": "

Authentication required

" - }, - { - "httpStatusCode": "403", - "description": "

Insufficient permissions

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "422", - "description": "

Validation Failed

" - } - ], - "previews": [] - } - ] -} \ No newline at end of file diff --git a/src/rest/data/fpt-2026-03-10/agent-tasks.json b/src/rest/data/fpt-2026-03-10/agent-tasks.json deleted file mode 100644 index 1dab325724e0..000000000000 --- a/src/rest/data/fpt-2026-03-10/agent-tasks.json +++ /dev/null @@ -1,1994 +0,0 @@ -{ - "agent-tasks": [ - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/agents/repos/{owner}/{repo}/tasks", - "title": "List tasks for repository", - "category": "agent-tasks", - "subcategory": "agent-tasks", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

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

" - }, - { - "name": "repo", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

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

" - }, - { - "name": "per_page", - "in": "query", - "schema": { - "type": "integer", - "default": 30, - "minimum": 1, - "maximum": 100 - }, - "description": "

The number of results per page (max 100).

" - }, - { - "name": "page", - "in": "query", - "schema": { - "type": "integer", - "default": 1, - "minimum": 1 - }, - "description": "

The page number of the results to fetch.

" - }, - { - "name": "sort", - "in": "query", - "schema": { - "type": "string", - "default": "updated_at", - "enum": [ - "updated_at", - "created_at" - ] - }, - "description": "

The field to sort results by. Can be updated_at or created_at.

" - }, - { - "name": "direction", - "in": "query", - "schema": { - "type": "string", - "default": "desc", - "enum": [ - "asc", - "desc" - ] - }, - "description": "

The direction to sort results. Can be asc or desc.

" - }, - { - "name": "state", - "in": "query", - "schema": { - "type": "string" - }, - "description": "

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.

" - }, - { - "name": "is_archived", - "in": "query", - "schema": { - "type": "boolean", - "default": false - }, - "description": "

Filter by archived status. When true, returns only archived tasks. When false or omitted, returns only non-archived tasks. Defaults to false.

" - }, - { - "name": "since", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - }, - "description": "

Only show tasks updated at or after this time (ISO 8601 timestamp)

" - }, - { - "name": "creator_id", - "in": "query", - "schema": { - "type": "integer" - }, - "description": "

Filter tasks by creator user ID

" - } - ], - "bodyParameters": [], - "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change.

\n
\n

Returns a list of tasks for a specific repository

", - "codeExamples": [ - { - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "owner": "OWNER", - "repo": "REPO" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Tasks retrieved successfully

", - "example": { - "tasks": [ - { - "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "url": "https://api.github.com/agents/repos/octocat/hello-world/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "html_url": "https://github.com/octocat/hello-world/copilot/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "creator": { - "id": 1 - }, - "creator_type": "user", - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "state": "completed", - "session_count": 1, - "artifacts": [ - { - "provider": "github", - "type": "pull", - "data": { - "id": 42 - } - } - ], - "archived_at": null, - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T01:00:00Z" - } - ] - }, - "schema": { - "type": "object", - "required": [ - "tasks" - ], - "properties": { - "tasks": { - "type": "array", - "items": { - "type": "object", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique task identifier" - }, - "url": { - "type": "string", - "description": "API URL for this task" - }, - "html_url": { - "type": "string", - "description": "Web URL for this task" - }, - "name": { - "type": "string", - "description": "Human-readable name derived from the task prompt" - }, - "creator": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - } - ], - "description": "The entity who created this task" - }, - "creator_type": { - "type": "string", - "description": "Type of the task creator", - "enum": [ - "user", - "organization" - ] - }, - "user_collaborators": { - "type": "array", - "items": { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "description": "User objects of collaborators on this task", - "deprecated": true - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this task belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "state": { - "type": "string", - "description": "Current state of the task, derived from its most recent session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "session_count": { - "type": "integer", - "format": "int32", - "description": "Number of sessions in this task" - }, - "artifacts": { - "type": "array", - "items": { - "type": "object", - "description": "A resource generated by the task", - "required": [ - "provider", - "type", - "data" - ], - "properties": { - "provider": { - "type": "string", - "enum": [ - "github" - ], - "description": "Provider namespace" - }, - "type": { - "type": "string", - "enum": [ - "pull", - "branch" - ], - "description": "Type of artifact. Available Values: `pull`, `branch`.\n" - }, - "data": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub resource (pull request, issue, etc.)", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "GitHub resource ID" - }, - "global_id": { - "type": "string", - "description": "GraphQL global ID" - } - } - }, - { - "type": "object", - "description": "A Git branch reference", - "required": [ - "head_ref", - "base_ref" - ], - "properties": { - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - } - } - } - ], - "description": "Resource data (shape depends on type)" - } - } - }, - "description": "Resources created by this task (PRs, branches, etc.)" - }, - "archived_at": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Timestamp when the task was archived, null if not archived" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp of the most recent update" - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the task was created" - } - } - }, - "description": "List of tasks" - }, - "total_active_count": { - "type": "integer", - "format": "int32", - "description": "Total count of active (non-archived) tasks" - }, - "total_archived_count": { - "type": "integer", - "format": "int32", - "description": "Total count of archived tasks" - } - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Tasks retrieved successfully

" - }, - { - "httpStatusCode": "400", - "description": "

Bad request

" - }, - { - "httpStatusCode": "401", - "description": "

Authentication required

" - }, - { - "httpStatusCode": "403", - "description": "

Insufficient permissions

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "422", - "description": "

Validation Failed

" - } - ], - "previews": [] - }, - { - "serverUrl": "https://api.github.com", - "verb": "post", - "requestPath": "/agents/repos/{owner}/{repo}/tasks", - "title": "Create a task", - "category": "agent-tasks", - "subcategory": "agent-tasks", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

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

" - }, - { - "name": "repo", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

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

" - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "prompt", - "description": "

The user's prompt for the agent

", - "isRequired": true - }, - { - "type": "string", - "name": "model", - "description": "

The model to use for this task. The allowed models may change over time and depend on the user's GitHub Copilot plan and organization policies. Currently supported values: claude-sonnet-4.6, claude-opus-4.6, gpt-5.2-codex, gpt-5.3-codex, gpt-5.4, claude-sonnet-4.5, claude-opus-4.5

" - }, - { - "type": "boolean", - "name": "create_pull_request", - "description": "

Whether to create a PR.

", - "default": false - }, - { - "type": "string", - "name": "base_ref", - "description": "

Base ref for new branch/PR

" - } - ], - "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change.

\n
\n

Creates a new task for a repository.

", - "codeExamples": [ - { - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "prompt": "Fix the login button on the homepage", - "base_ref": "main" - }, - "parameters": { - "owner": "OWNER", - "repo": "REPO" - } - }, - "response": { - "statusCode": "201", - "contentType": "application/json", - "description": "

Task created successfully

", - "example": { - "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "url": "https://api.github.com/agents/repos/octocat/hello-world/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "html_url": "https://github.com/octocat/hello-world/copilot/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "creator": { - "id": 1 - }, - "creator_type": "user", - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "state": "queued", - "session_count": 1, - "artifacts": [], - "archived_at": null, - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T00:00:00Z" - }, - "schema": { - "type": "object", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique task identifier" - }, - "url": { - "type": "string", - "description": "API URL for this task" - }, - "html_url": { - "type": "string", - "description": "Web URL for this task" - }, - "name": { - "type": "string", - "description": "Human-readable name derived from the task prompt" - }, - "creator": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - } - ], - "description": "The entity who created this task" - }, - "creator_type": { - "type": "string", - "description": "Type of the task creator", - "enum": [ - "user", - "organization" - ] - }, - "user_collaborators": { - "type": "array", - "items": { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "description": "User objects of collaborators on this task", - "deprecated": true - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this task belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "state": { - "type": "string", - "description": "Current state of the task, derived from its most recent session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "session_count": { - "type": "integer", - "format": "int32", - "description": "Number of sessions in this task" - }, - "artifacts": { - "type": "array", - "items": { - "type": "object", - "description": "A resource generated by the task", - "required": [ - "provider", - "type", - "data" - ], - "properties": { - "provider": { - "type": "string", - "enum": [ - "github" - ], - "description": "Provider namespace" - }, - "type": { - "type": "string", - "enum": [ - "pull", - "branch" - ], - "description": "Type of artifact. Available Values: `pull`, `branch`.\n" - }, - "data": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub resource (pull request, issue, etc.)", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "GitHub resource ID" - }, - "global_id": { - "type": "string", - "description": "GraphQL global ID" - } - } - }, - { - "type": "object", - "description": "A Git branch reference", - "required": [ - "head_ref", - "base_ref" - ], - "properties": { - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - } - } - } - ], - "description": "Resource data (shape depends on type)" - } - } - }, - "description": "Resources created by this task (PRs, branches, etc.)" - }, - "archived_at": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Timestamp when the task was archived, null if not archived" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp of the most recent update" - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the task was created" - } - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "201", - "description": "

Task created successfully

" - }, - { - "httpStatusCode": "400", - "description": "

Problems parsing JSON

" - }, - { - "httpStatusCode": "401", - "description": "

Authentication required

" - }, - { - "httpStatusCode": "403", - "description": "

Insufficient permissions

" - }, - { - "httpStatusCode": "422", - "description": "

Validation Failed

" - } - ], - "previews": [] - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/agents/repos/{owner}/{repo}/tasks/{task_id}", - "title": "Get a task by repo", - "category": "agent-tasks", - "subcategory": "agent-tasks", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

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

" - }, - { - "name": "repo", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

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

" - }, - { - "name": "task_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

The unique identifier of the task.

" - } - ], - "bodyParameters": [], - "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change.

\n
\n

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

", - "codeExamples": [ - { - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "owner": "OWNER", - "repo": "REPO", - "task_id": "TASK_ID" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Task retrieved successfully

", - "example": { - "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "url": "https://api.github.com/agents/repos/octocat/hello-world/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "html_url": "https://github.com/octocat/hello-world/copilot/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "creator": { - "id": 1 - }, - "creator_type": "user", - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "state": "completed", - "session_count": 1, - "artifacts": [ - { - "provider": "github", - "type": "pull", - "data": { - "id": 42 - } - } - ], - "archived_at": null, - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T01:00:00Z", - "sessions": [ - { - "id": "s1a2b3c4-d5e6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "user": { - "id": 1 - }, - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "task_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "state": "completed", - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T01:00:00Z", - "completed_at": "2025-01-01T01:00:00Z", - "prompt": "Fix the login button on the homepage", - "head_ref": "copilot/fix-1", - "base_ref": "main", - "model": "claude-sonnet-4.6" - } - ] - }, - "schema": { - "allOf": [ - { - "type": "object", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique task identifier" - }, - "url": { - "type": "string", - "description": "API URL for this task" - }, - "html_url": { - "type": "string", - "description": "Web URL for this task" - }, - "name": { - "type": "string", - "description": "Human-readable name derived from the task prompt" - }, - "creator": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - } - ], - "description": "The entity who created this task" - }, - "creator_type": { - "type": "string", - "description": "Type of the task creator", - "enum": [ - "user", - "organization" - ] - }, - "user_collaborators": { - "type": "array", - "items": { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "description": "User objects of collaborators on this task", - "deprecated": true - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this task belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "state": { - "type": "string", - "description": "Current state of the task, derived from its most recent session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "session_count": { - "type": "integer", - "format": "int32", - "description": "Number of sessions in this task" - }, - "artifacts": { - "type": "array", - "items": { - "type": "object", - "description": "A resource generated by the task", - "required": [ - "provider", - "type", - "data" - ], - "properties": { - "provider": { - "type": "string", - "enum": [ - "github" - ], - "description": "Provider namespace" - }, - "type": { - "type": "string", - "enum": [ - "pull", - "branch" - ], - "description": "Type of artifact. Available Values: `pull`, `branch`.\n" - }, - "data": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub resource (pull request, issue, etc.)", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "GitHub resource ID" - }, - "global_id": { - "type": "string", - "description": "GraphQL global ID" - } - } - }, - { - "type": "object", - "description": "A Git branch reference", - "required": [ - "head_ref", - "base_ref" - ], - "properties": { - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - } - } - } - ], - "description": "Resource data (shape depends on type)" - } - } - }, - "description": "Resources created by this task (PRs, branches, etc.)" - }, - "archived_at": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Timestamp when the task was archived, null if not archived" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp of the most recent update" - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the task was created" - } - } - }, - { - "type": "object", - "properties": { - "sessions": { - "type": "array", - "items": { - "type": "object", - "description": "Full session details within a task", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Session ID" - }, - "name": { - "type": "string", - "description": "Session name" - }, - "user": { - "description": "The user who created this session", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this session belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "task_id": { - "type": "string", - "description": "Task ID this session belongs to" - }, - "state": { - "type": "string", - "description": "Current state of a session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Creation timestamp" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Last update timestamp" - }, - "completed_at": { - "type": "string", - "format": "date-time", - "description": "Completion timestamp" - }, - "prompt": { - "type": "string", - "description": "Content of the triggering event" - }, - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - }, - "model": { - "type": "string", - "description": "Model used for this session" - }, - "error": { - "type": "object", - "description": "Error details for a failed session", - "properties": { - "message": { - "type": "string", - "description": "Error message" - } - } - } - } - }, - "description": "Sessions associated with this task" - } - } - } - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Task retrieved successfully

" - }, - { - "httpStatusCode": "400", - "description": "

Bad request

" - }, - { - "httpStatusCode": "401", - "description": "

Authentication required

" - }, - { - "httpStatusCode": "403", - "description": "

Insufficient permissions

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "422", - "description": "

Validation Failed

" - } - ], - "previews": [] - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/agents/tasks", - "title": "List tasks", - "category": "agent-tasks", - "subcategory": "agent-tasks", - "parameters": [ - { - "name": "per_page", - "in": "query", - "schema": { - "type": "integer", - "default": 30, - "minimum": 1, - "maximum": 100 - }, - "description": "

The number of results per page (max 100).

" - }, - { - "name": "page", - "in": "query", - "schema": { - "type": "integer", - "default": 1, - "minimum": 1 - }, - "description": "

The page number of the results to fetch.

" - }, - { - "name": "sort", - "in": "query", - "schema": { - "type": "string", - "default": "updated_at", - "enum": [ - "updated_at", - "created_at" - ] - }, - "description": "

The field to sort results by. Can be updated_at or created_at.

" - }, - { - "name": "direction", - "in": "query", - "schema": { - "type": "string", - "default": "desc", - "enum": [ - "asc", - "desc" - ] - }, - "description": "

The direction to sort results. Can be asc or desc.

" - }, - { - "name": "state", - "in": "query", - "schema": { - "type": "string" - }, - "description": "

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.

" - }, - { - "name": "is_archived", - "in": "query", - "schema": { - "type": "boolean", - "default": false - }, - "description": "

Filter by archived status. When true, returns only archived tasks. When false or omitted, returns only non-archived tasks. Defaults to false.

" - }, - { - "name": "since", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - }, - "description": "

Only show tasks updated at or after this time (ISO 8601 timestamp)

" - } - ], - "bodyParameters": [], - "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change.

\n
\n

Returns a list of tasks for the authenticated user

", - "codeExamples": [ - { - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json" - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Tasks retrieved successfully

", - "example": { - "tasks": [ - { - "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "creator": { - "id": 1 - }, - "creator_type": "user", - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "state": "completed", - "session_count": 1, - "artifacts": [ - { - "provider": "github", - "type": "pull", - "data": { - "id": 42 - } - } - ], - "archived_at": null, - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T01:00:00Z" - } - ] - }, - "schema": { - "type": "object", - "required": [ - "tasks" - ], - "properties": { - "tasks": { - "type": "array", - "items": { - "type": "object", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique task identifier" - }, - "url": { - "type": "string", - "description": "API URL for this task" - }, - "html_url": { - "type": "string", - "description": "Web URL for this task" - }, - "name": { - "type": "string", - "description": "Human-readable name derived from the task prompt" - }, - "creator": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - } - ], - "description": "The entity who created this task" - }, - "creator_type": { - "type": "string", - "description": "Type of the task creator", - "enum": [ - "user", - "organization" - ] - }, - "user_collaborators": { - "type": "array", - "items": { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "description": "User objects of collaborators on this task", - "deprecated": true - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this task belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "state": { - "type": "string", - "description": "Current state of the task, derived from its most recent session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "session_count": { - "type": "integer", - "format": "int32", - "description": "Number of sessions in this task" - }, - "artifacts": { - "type": "array", - "items": { - "type": "object", - "description": "A resource generated by the task", - "required": [ - "provider", - "type", - "data" - ], - "properties": { - "provider": { - "type": "string", - "enum": [ - "github" - ], - "description": "Provider namespace" - }, - "type": { - "type": "string", - "enum": [ - "pull", - "branch" - ], - "description": "Type of artifact. Available Values: `pull`, `branch`.\n" - }, - "data": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub resource (pull request, issue, etc.)", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "GitHub resource ID" - }, - "global_id": { - "type": "string", - "description": "GraphQL global ID" - } - } - }, - { - "type": "object", - "description": "A Git branch reference", - "required": [ - "head_ref", - "base_ref" - ], - "properties": { - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - } - } - } - ], - "description": "Resource data (shape depends on type)" - } - } - }, - "description": "Resources created by this task (PRs, branches, etc.)" - }, - "archived_at": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Timestamp when the task was archived, null if not archived" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp of the most recent update" - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the task was created" - } - } - }, - "description": "List of tasks" - }, - "total_active_count": { - "type": "integer", - "format": "int32", - "description": "Total count of active (non-archived) tasks" - }, - "total_archived_count": { - "type": "integer", - "format": "int32", - "description": "Total count of archived tasks" - } - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Tasks retrieved successfully

" - }, - { - "httpStatusCode": "400", - "description": "

Bad request

" - }, - { - "httpStatusCode": "401", - "description": "

Authentication required

" - }, - { - "httpStatusCode": "403", - "description": "

Insufficient permissions

" - }, - { - "httpStatusCode": "422", - "description": "

Validation Failed

" - } - ], - "previews": [] - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/agents/tasks/{task_id}", - "title": "Get a task by ID", - "category": "agent-tasks", - "subcategory": "agent-tasks", - "parameters": [ - { - "name": "task_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

The unique identifier of the task.

" - } - ], - "bodyParameters": [], - "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change.

\n
\n

Returns a task by ID with its associated sessions

", - "codeExamples": [ - { - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "task_id": "TASK_ID" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Task retrieved successfully

", - "example": { - "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "url": "https://api.github.com/agents/repos/octocat/hello-world/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "html_url": "https://github.com/octocat/hello-world/copilot/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "creator": { - "id": 1 - }, - "creator_type": "user", - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "state": "completed", - "session_count": 1, - "artifacts": [ - { - "provider": "github", - "type": "pull", - "data": { - "id": 42 - } - } - ], - "archived_at": null, - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T01:00:00Z", - "sessions": [ - { - "id": "s1a2b3c4-d5e6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "user": { - "id": 1 - }, - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "task_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "state": "completed", - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T01:00:00Z", - "completed_at": "2025-01-01T01:00:00Z", - "prompt": "Fix the login button on the homepage", - "head_ref": "copilot/fix-1", - "base_ref": "main", - "model": "claude-sonnet-4.6" - } - ] - }, - "schema": { - "allOf": [ - { - "type": "object", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique task identifier" - }, - "url": { - "type": "string", - "description": "API URL for this task" - }, - "html_url": { - "type": "string", - "description": "Web URL for this task" - }, - "name": { - "type": "string", - "description": "Human-readable name derived from the task prompt" - }, - "creator": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - } - ], - "description": "The entity who created this task" - }, - "creator_type": { - "type": "string", - "description": "Type of the task creator", - "enum": [ - "user", - "organization" - ] - }, - "user_collaborators": { - "type": "array", - "items": { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "description": "User objects of collaborators on this task", - "deprecated": true - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this task belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "state": { - "type": "string", - "description": "Current state of the task, derived from its most recent session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "session_count": { - "type": "integer", - "format": "int32", - "description": "Number of sessions in this task" - }, - "artifacts": { - "type": "array", - "items": { - "type": "object", - "description": "A resource generated by the task", - "required": [ - "provider", - "type", - "data" - ], - "properties": { - "provider": { - "type": "string", - "enum": [ - "github" - ], - "description": "Provider namespace" - }, - "type": { - "type": "string", - "enum": [ - "pull", - "branch" - ], - "description": "Type of artifact. Available Values: `pull`, `branch`.\n" - }, - "data": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub resource (pull request, issue, etc.)", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "GitHub resource ID" - }, - "global_id": { - "type": "string", - "description": "GraphQL global ID" - } - } - }, - { - "type": "object", - "description": "A Git branch reference", - "required": [ - "head_ref", - "base_ref" - ], - "properties": { - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - } - } - } - ], - "description": "Resource data (shape depends on type)" - } - } - }, - "description": "Resources created by this task (PRs, branches, etc.)" - }, - "archived_at": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Timestamp when the task was archived, null if not archived" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp of the most recent update" - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the task was created" - } - } - }, - { - "type": "object", - "properties": { - "sessions": { - "type": "array", - "items": { - "type": "object", - "description": "Full session details within a task", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Session ID" - }, - "name": { - "type": "string", - "description": "Session name" - }, - "user": { - "description": "The user who created this session", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this session belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "task_id": { - "type": "string", - "description": "Task ID this session belongs to" - }, - "state": { - "type": "string", - "description": "Current state of a session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Creation timestamp" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Last update timestamp" - }, - "completed_at": { - "type": "string", - "format": "date-time", - "description": "Completion timestamp" - }, - "prompt": { - "type": "string", - "description": "Content of the triggering event" - }, - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - }, - "model": { - "type": "string", - "description": "Model used for this session" - }, - "error": { - "type": "object", - "description": "Error details for a failed session", - "properties": { - "message": { - "type": "string", - "description": "Error message" - } - } - } - } - }, - "description": "Sessions associated with this task" - } - } - } - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Task retrieved successfully

" - }, - { - "httpStatusCode": "400", - "description": "

Problems parsing request

" - }, - { - "httpStatusCode": "401", - "description": "

Authentication required

" - }, - { - "httpStatusCode": "403", - "description": "

Insufficient permissions

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "422", - "description": "

Validation Failed

" - } - ], - "previews": [] - } - ] -} \ No newline at end of file diff --git a/src/rest/data/ghec-2022-11-28/agent-tasks.json b/src/rest/data/ghec-2022-11-28/agent-tasks.json deleted file mode 100644 index 1dab325724e0..000000000000 --- a/src/rest/data/ghec-2022-11-28/agent-tasks.json +++ /dev/null @@ -1,1994 +0,0 @@ -{ - "agent-tasks": [ - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/agents/repos/{owner}/{repo}/tasks", - "title": "List tasks for repository", - "category": "agent-tasks", - "subcategory": "agent-tasks", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

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

" - }, - { - "name": "repo", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

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

" - }, - { - "name": "per_page", - "in": "query", - "schema": { - "type": "integer", - "default": 30, - "minimum": 1, - "maximum": 100 - }, - "description": "

The number of results per page (max 100).

" - }, - { - "name": "page", - "in": "query", - "schema": { - "type": "integer", - "default": 1, - "minimum": 1 - }, - "description": "

The page number of the results to fetch.

" - }, - { - "name": "sort", - "in": "query", - "schema": { - "type": "string", - "default": "updated_at", - "enum": [ - "updated_at", - "created_at" - ] - }, - "description": "

The field to sort results by. Can be updated_at or created_at.

" - }, - { - "name": "direction", - "in": "query", - "schema": { - "type": "string", - "default": "desc", - "enum": [ - "asc", - "desc" - ] - }, - "description": "

The direction to sort results. Can be asc or desc.

" - }, - { - "name": "state", - "in": "query", - "schema": { - "type": "string" - }, - "description": "

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.

" - }, - { - "name": "is_archived", - "in": "query", - "schema": { - "type": "boolean", - "default": false - }, - "description": "

Filter by archived status. When true, returns only archived tasks. When false or omitted, returns only non-archived tasks. Defaults to false.

" - }, - { - "name": "since", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - }, - "description": "

Only show tasks updated at or after this time (ISO 8601 timestamp)

" - }, - { - "name": "creator_id", - "in": "query", - "schema": { - "type": "integer" - }, - "description": "

Filter tasks by creator user ID

" - } - ], - "bodyParameters": [], - "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change.

\n
\n

Returns a list of tasks for a specific repository

", - "codeExamples": [ - { - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "owner": "OWNER", - "repo": "REPO" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Tasks retrieved successfully

", - "example": { - "tasks": [ - { - "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "url": "https://api.github.com/agents/repos/octocat/hello-world/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "html_url": "https://github.com/octocat/hello-world/copilot/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "creator": { - "id": 1 - }, - "creator_type": "user", - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "state": "completed", - "session_count": 1, - "artifacts": [ - { - "provider": "github", - "type": "pull", - "data": { - "id": 42 - } - } - ], - "archived_at": null, - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T01:00:00Z" - } - ] - }, - "schema": { - "type": "object", - "required": [ - "tasks" - ], - "properties": { - "tasks": { - "type": "array", - "items": { - "type": "object", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique task identifier" - }, - "url": { - "type": "string", - "description": "API URL for this task" - }, - "html_url": { - "type": "string", - "description": "Web URL for this task" - }, - "name": { - "type": "string", - "description": "Human-readable name derived from the task prompt" - }, - "creator": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - } - ], - "description": "The entity who created this task" - }, - "creator_type": { - "type": "string", - "description": "Type of the task creator", - "enum": [ - "user", - "organization" - ] - }, - "user_collaborators": { - "type": "array", - "items": { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "description": "User objects of collaborators on this task", - "deprecated": true - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this task belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "state": { - "type": "string", - "description": "Current state of the task, derived from its most recent session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "session_count": { - "type": "integer", - "format": "int32", - "description": "Number of sessions in this task" - }, - "artifacts": { - "type": "array", - "items": { - "type": "object", - "description": "A resource generated by the task", - "required": [ - "provider", - "type", - "data" - ], - "properties": { - "provider": { - "type": "string", - "enum": [ - "github" - ], - "description": "Provider namespace" - }, - "type": { - "type": "string", - "enum": [ - "pull", - "branch" - ], - "description": "Type of artifact. Available Values: `pull`, `branch`.\n" - }, - "data": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub resource (pull request, issue, etc.)", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "GitHub resource ID" - }, - "global_id": { - "type": "string", - "description": "GraphQL global ID" - } - } - }, - { - "type": "object", - "description": "A Git branch reference", - "required": [ - "head_ref", - "base_ref" - ], - "properties": { - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - } - } - } - ], - "description": "Resource data (shape depends on type)" - } - } - }, - "description": "Resources created by this task (PRs, branches, etc.)" - }, - "archived_at": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Timestamp when the task was archived, null if not archived" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp of the most recent update" - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the task was created" - } - } - }, - "description": "List of tasks" - }, - "total_active_count": { - "type": "integer", - "format": "int32", - "description": "Total count of active (non-archived) tasks" - }, - "total_archived_count": { - "type": "integer", - "format": "int32", - "description": "Total count of archived tasks" - } - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Tasks retrieved successfully

" - }, - { - "httpStatusCode": "400", - "description": "

Bad request

" - }, - { - "httpStatusCode": "401", - "description": "

Authentication required

" - }, - { - "httpStatusCode": "403", - "description": "

Insufficient permissions

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "422", - "description": "

Validation Failed

" - } - ], - "previews": [] - }, - { - "serverUrl": "https://api.github.com", - "verb": "post", - "requestPath": "/agents/repos/{owner}/{repo}/tasks", - "title": "Create a task", - "category": "agent-tasks", - "subcategory": "agent-tasks", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

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

" - }, - { - "name": "repo", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

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

" - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "prompt", - "description": "

The user's prompt for the agent

", - "isRequired": true - }, - { - "type": "string", - "name": "model", - "description": "

The model to use for this task. The allowed models may change over time and depend on the user's GitHub Copilot plan and organization policies. Currently supported values: claude-sonnet-4.6, claude-opus-4.6, gpt-5.2-codex, gpt-5.3-codex, gpt-5.4, claude-sonnet-4.5, claude-opus-4.5

" - }, - { - "type": "boolean", - "name": "create_pull_request", - "description": "

Whether to create a PR.

", - "default": false - }, - { - "type": "string", - "name": "base_ref", - "description": "

Base ref for new branch/PR

" - } - ], - "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change.

\n
\n

Creates a new task for a repository.

", - "codeExamples": [ - { - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "prompt": "Fix the login button on the homepage", - "base_ref": "main" - }, - "parameters": { - "owner": "OWNER", - "repo": "REPO" - } - }, - "response": { - "statusCode": "201", - "contentType": "application/json", - "description": "

Task created successfully

", - "example": { - "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "url": "https://api.github.com/agents/repos/octocat/hello-world/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "html_url": "https://github.com/octocat/hello-world/copilot/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "creator": { - "id": 1 - }, - "creator_type": "user", - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "state": "queued", - "session_count": 1, - "artifacts": [], - "archived_at": null, - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T00:00:00Z" - }, - "schema": { - "type": "object", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique task identifier" - }, - "url": { - "type": "string", - "description": "API URL for this task" - }, - "html_url": { - "type": "string", - "description": "Web URL for this task" - }, - "name": { - "type": "string", - "description": "Human-readable name derived from the task prompt" - }, - "creator": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - } - ], - "description": "The entity who created this task" - }, - "creator_type": { - "type": "string", - "description": "Type of the task creator", - "enum": [ - "user", - "organization" - ] - }, - "user_collaborators": { - "type": "array", - "items": { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "description": "User objects of collaborators on this task", - "deprecated": true - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this task belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "state": { - "type": "string", - "description": "Current state of the task, derived from its most recent session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "session_count": { - "type": "integer", - "format": "int32", - "description": "Number of sessions in this task" - }, - "artifacts": { - "type": "array", - "items": { - "type": "object", - "description": "A resource generated by the task", - "required": [ - "provider", - "type", - "data" - ], - "properties": { - "provider": { - "type": "string", - "enum": [ - "github" - ], - "description": "Provider namespace" - }, - "type": { - "type": "string", - "enum": [ - "pull", - "branch" - ], - "description": "Type of artifact. Available Values: `pull`, `branch`.\n" - }, - "data": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub resource (pull request, issue, etc.)", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "GitHub resource ID" - }, - "global_id": { - "type": "string", - "description": "GraphQL global ID" - } - } - }, - { - "type": "object", - "description": "A Git branch reference", - "required": [ - "head_ref", - "base_ref" - ], - "properties": { - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - } - } - } - ], - "description": "Resource data (shape depends on type)" - } - } - }, - "description": "Resources created by this task (PRs, branches, etc.)" - }, - "archived_at": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Timestamp when the task was archived, null if not archived" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp of the most recent update" - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the task was created" - } - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "201", - "description": "

Task created successfully

" - }, - { - "httpStatusCode": "400", - "description": "

Problems parsing JSON

" - }, - { - "httpStatusCode": "401", - "description": "

Authentication required

" - }, - { - "httpStatusCode": "403", - "description": "

Insufficient permissions

" - }, - { - "httpStatusCode": "422", - "description": "

Validation Failed

" - } - ], - "previews": [] - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/agents/repos/{owner}/{repo}/tasks/{task_id}", - "title": "Get a task by repo", - "category": "agent-tasks", - "subcategory": "agent-tasks", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

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

" - }, - { - "name": "repo", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

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

" - }, - { - "name": "task_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

The unique identifier of the task.

" - } - ], - "bodyParameters": [], - "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change.

\n
\n

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

", - "codeExamples": [ - { - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "owner": "OWNER", - "repo": "REPO", - "task_id": "TASK_ID" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Task retrieved successfully

", - "example": { - "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "url": "https://api.github.com/agents/repos/octocat/hello-world/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "html_url": "https://github.com/octocat/hello-world/copilot/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "creator": { - "id": 1 - }, - "creator_type": "user", - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "state": "completed", - "session_count": 1, - "artifacts": [ - { - "provider": "github", - "type": "pull", - "data": { - "id": 42 - } - } - ], - "archived_at": null, - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T01:00:00Z", - "sessions": [ - { - "id": "s1a2b3c4-d5e6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "user": { - "id": 1 - }, - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "task_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "state": "completed", - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T01:00:00Z", - "completed_at": "2025-01-01T01:00:00Z", - "prompt": "Fix the login button on the homepage", - "head_ref": "copilot/fix-1", - "base_ref": "main", - "model": "claude-sonnet-4.6" - } - ] - }, - "schema": { - "allOf": [ - { - "type": "object", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique task identifier" - }, - "url": { - "type": "string", - "description": "API URL for this task" - }, - "html_url": { - "type": "string", - "description": "Web URL for this task" - }, - "name": { - "type": "string", - "description": "Human-readable name derived from the task prompt" - }, - "creator": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - } - ], - "description": "The entity who created this task" - }, - "creator_type": { - "type": "string", - "description": "Type of the task creator", - "enum": [ - "user", - "organization" - ] - }, - "user_collaborators": { - "type": "array", - "items": { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "description": "User objects of collaborators on this task", - "deprecated": true - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this task belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "state": { - "type": "string", - "description": "Current state of the task, derived from its most recent session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "session_count": { - "type": "integer", - "format": "int32", - "description": "Number of sessions in this task" - }, - "artifacts": { - "type": "array", - "items": { - "type": "object", - "description": "A resource generated by the task", - "required": [ - "provider", - "type", - "data" - ], - "properties": { - "provider": { - "type": "string", - "enum": [ - "github" - ], - "description": "Provider namespace" - }, - "type": { - "type": "string", - "enum": [ - "pull", - "branch" - ], - "description": "Type of artifact. Available Values: `pull`, `branch`.\n" - }, - "data": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub resource (pull request, issue, etc.)", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "GitHub resource ID" - }, - "global_id": { - "type": "string", - "description": "GraphQL global ID" - } - } - }, - { - "type": "object", - "description": "A Git branch reference", - "required": [ - "head_ref", - "base_ref" - ], - "properties": { - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - } - } - } - ], - "description": "Resource data (shape depends on type)" - } - } - }, - "description": "Resources created by this task (PRs, branches, etc.)" - }, - "archived_at": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Timestamp when the task was archived, null if not archived" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp of the most recent update" - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the task was created" - } - } - }, - { - "type": "object", - "properties": { - "sessions": { - "type": "array", - "items": { - "type": "object", - "description": "Full session details within a task", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Session ID" - }, - "name": { - "type": "string", - "description": "Session name" - }, - "user": { - "description": "The user who created this session", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this session belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "task_id": { - "type": "string", - "description": "Task ID this session belongs to" - }, - "state": { - "type": "string", - "description": "Current state of a session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Creation timestamp" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Last update timestamp" - }, - "completed_at": { - "type": "string", - "format": "date-time", - "description": "Completion timestamp" - }, - "prompt": { - "type": "string", - "description": "Content of the triggering event" - }, - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - }, - "model": { - "type": "string", - "description": "Model used for this session" - }, - "error": { - "type": "object", - "description": "Error details for a failed session", - "properties": { - "message": { - "type": "string", - "description": "Error message" - } - } - } - } - }, - "description": "Sessions associated with this task" - } - } - } - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Task retrieved successfully

" - }, - { - "httpStatusCode": "400", - "description": "

Bad request

" - }, - { - "httpStatusCode": "401", - "description": "

Authentication required

" - }, - { - "httpStatusCode": "403", - "description": "

Insufficient permissions

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "422", - "description": "

Validation Failed

" - } - ], - "previews": [] - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/agents/tasks", - "title": "List tasks", - "category": "agent-tasks", - "subcategory": "agent-tasks", - "parameters": [ - { - "name": "per_page", - "in": "query", - "schema": { - "type": "integer", - "default": 30, - "minimum": 1, - "maximum": 100 - }, - "description": "

The number of results per page (max 100).

" - }, - { - "name": "page", - "in": "query", - "schema": { - "type": "integer", - "default": 1, - "minimum": 1 - }, - "description": "

The page number of the results to fetch.

" - }, - { - "name": "sort", - "in": "query", - "schema": { - "type": "string", - "default": "updated_at", - "enum": [ - "updated_at", - "created_at" - ] - }, - "description": "

The field to sort results by. Can be updated_at or created_at.

" - }, - { - "name": "direction", - "in": "query", - "schema": { - "type": "string", - "default": "desc", - "enum": [ - "asc", - "desc" - ] - }, - "description": "

The direction to sort results. Can be asc or desc.

" - }, - { - "name": "state", - "in": "query", - "schema": { - "type": "string" - }, - "description": "

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.

" - }, - { - "name": "is_archived", - "in": "query", - "schema": { - "type": "boolean", - "default": false - }, - "description": "

Filter by archived status. When true, returns only archived tasks. When false or omitted, returns only non-archived tasks. Defaults to false.

" - }, - { - "name": "since", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - }, - "description": "

Only show tasks updated at or after this time (ISO 8601 timestamp)

" - } - ], - "bodyParameters": [], - "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change.

\n
\n

Returns a list of tasks for the authenticated user

", - "codeExamples": [ - { - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json" - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Tasks retrieved successfully

", - "example": { - "tasks": [ - { - "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "creator": { - "id": 1 - }, - "creator_type": "user", - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "state": "completed", - "session_count": 1, - "artifacts": [ - { - "provider": "github", - "type": "pull", - "data": { - "id": 42 - } - } - ], - "archived_at": null, - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T01:00:00Z" - } - ] - }, - "schema": { - "type": "object", - "required": [ - "tasks" - ], - "properties": { - "tasks": { - "type": "array", - "items": { - "type": "object", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique task identifier" - }, - "url": { - "type": "string", - "description": "API URL for this task" - }, - "html_url": { - "type": "string", - "description": "Web URL for this task" - }, - "name": { - "type": "string", - "description": "Human-readable name derived from the task prompt" - }, - "creator": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - } - ], - "description": "The entity who created this task" - }, - "creator_type": { - "type": "string", - "description": "Type of the task creator", - "enum": [ - "user", - "organization" - ] - }, - "user_collaborators": { - "type": "array", - "items": { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "description": "User objects of collaborators on this task", - "deprecated": true - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this task belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "state": { - "type": "string", - "description": "Current state of the task, derived from its most recent session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "session_count": { - "type": "integer", - "format": "int32", - "description": "Number of sessions in this task" - }, - "artifacts": { - "type": "array", - "items": { - "type": "object", - "description": "A resource generated by the task", - "required": [ - "provider", - "type", - "data" - ], - "properties": { - "provider": { - "type": "string", - "enum": [ - "github" - ], - "description": "Provider namespace" - }, - "type": { - "type": "string", - "enum": [ - "pull", - "branch" - ], - "description": "Type of artifact. Available Values: `pull`, `branch`.\n" - }, - "data": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub resource (pull request, issue, etc.)", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "GitHub resource ID" - }, - "global_id": { - "type": "string", - "description": "GraphQL global ID" - } - } - }, - { - "type": "object", - "description": "A Git branch reference", - "required": [ - "head_ref", - "base_ref" - ], - "properties": { - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - } - } - } - ], - "description": "Resource data (shape depends on type)" - } - } - }, - "description": "Resources created by this task (PRs, branches, etc.)" - }, - "archived_at": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Timestamp when the task was archived, null if not archived" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp of the most recent update" - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the task was created" - } - } - }, - "description": "List of tasks" - }, - "total_active_count": { - "type": "integer", - "format": "int32", - "description": "Total count of active (non-archived) tasks" - }, - "total_archived_count": { - "type": "integer", - "format": "int32", - "description": "Total count of archived tasks" - } - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Tasks retrieved successfully

" - }, - { - "httpStatusCode": "400", - "description": "

Bad request

" - }, - { - "httpStatusCode": "401", - "description": "

Authentication required

" - }, - { - "httpStatusCode": "403", - "description": "

Insufficient permissions

" - }, - { - "httpStatusCode": "422", - "description": "

Validation Failed

" - } - ], - "previews": [] - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/agents/tasks/{task_id}", - "title": "Get a task by ID", - "category": "agent-tasks", - "subcategory": "agent-tasks", - "parameters": [ - { - "name": "task_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

The unique identifier of the task.

" - } - ], - "bodyParameters": [], - "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change.

\n
\n

Returns a task by ID with its associated sessions

", - "codeExamples": [ - { - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "task_id": "TASK_ID" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Task retrieved successfully

", - "example": { - "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "url": "https://api.github.com/agents/repos/octocat/hello-world/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "html_url": "https://github.com/octocat/hello-world/copilot/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "creator": { - "id": 1 - }, - "creator_type": "user", - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "state": "completed", - "session_count": 1, - "artifacts": [ - { - "provider": "github", - "type": "pull", - "data": { - "id": 42 - } - } - ], - "archived_at": null, - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T01:00:00Z", - "sessions": [ - { - "id": "s1a2b3c4-d5e6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "user": { - "id": 1 - }, - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "task_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "state": "completed", - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T01:00:00Z", - "completed_at": "2025-01-01T01:00:00Z", - "prompt": "Fix the login button on the homepage", - "head_ref": "copilot/fix-1", - "base_ref": "main", - "model": "claude-sonnet-4.6" - } - ] - }, - "schema": { - "allOf": [ - { - "type": "object", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique task identifier" - }, - "url": { - "type": "string", - "description": "API URL for this task" - }, - "html_url": { - "type": "string", - "description": "Web URL for this task" - }, - "name": { - "type": "string", - "description": "Human-readable name derived from the task prompt" - }, - "creator": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - } - ], - "description": "The entity who created this task" - }, - "creator_type": { - "type": "string", - "description": "Type of the task creator", - "enum": [ - "user", - "organization" - ] - }, - "user_collaborators": { - "type": "array", - "items": { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "description": "User objects of collaborators on this task", - "deprecated": true - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this task belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "state": { - "type": "string", - "description": "Current state of the task, derived from its most recent session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "session_count": { - "type": "integer", - "format": "int32", - "description": "Number of sessions in this task" - }, - "artifacts": { - "type": "array", - "items": { - "type": "object", - "description": "A resource generated by the task", - "required": [ - "provider", - "type", - "data" - ], - "properties": { - "provider": { - "type": "string", - "enum": [ - "github" - ], - "description": "Provider namespace" - }, - "type": { - "type": "string", - "enum": [ - "pull", - "branch" - ], - "description": "Type of artifact. Available Values: `pull`, `branch`.\n" - }, - "data": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub resource (pull request, issue, etc.)", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "GitHub resource ID" - }, - "global_id": { - "type": "string", - "description": "GraphQL global ID" - } - } - }, - { - "type": "object", - "description": "A Git branch reference", - "required": [ - "head_ref", - "base_ref" - ], - "properties": { - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - } - } - } - ], - "description": "Resource data (shape depends on type)" - } - } - }, - "description": "Resources created by this task (PRs, branches, etc.)" - }, - "archived_at": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Timestamp when the task was archived, null if not archived" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp of the most recent update" - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the task was created" - } - } - }, - { - "type": "object", - "properties": { - "sessions": { - "type": "array", - "items": { - "type": "object", - "description": "Full session details within a task", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Session ID" - }, - "name": { - "type": "string", - "description": "Session name" - }, - "user": { - "description": "The user who created this session", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this session belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "task_id": { - "type": "string", - "description": "Task ID this session belongs to" - }, - "state": { - "type": "string", - "description": "Current state of a session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Creation timestamp" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Last update timestamp" - }, - "completed_at": { - "type": "string", - "format": "date-time", - "description": "Completion timestamp" - }, - "prompt": { - "type": "string", - "description": "Content of the triggering event" - }, - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - }, - "model": { - "type": "string", - "description": "Model used for this session" - }, - "error": { - "type": "object", - "description": "Error details for a failed session", - "properties": { - "message": { - "type": "string", - "description": "Error message" - } - } - } - } - }, - "description": "Sessions associated with this task" - } - } - } - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Task retrieved successfully

" - }, - { - "httpStatusCode": "400", - "description": "

Problems parsing request

" - }, - { - "httpStatusCode": "401", - "description": "

Authentication required

" - }, - { - "httpStatusCode": "403", - "description": "

Insufficient permissions

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "422", - "description": "

Validation Failed

" - } - ], - "previews": [] - } - ] -} \ No newline at end of file diff --git a/src/rest/data/ghec-2026-03-10/agent-tasks.json b/src/rest/data/ghec-2026-03-10/agent-tasks.json deleted file mode 100644 index 1dab325724e0..000000000000 --- a/src/rest/data/ghec-2026-03-10/agent-tasks.json +++ /dev/null @@ -1,1994 +0,0 @@ -{ - "agent-tasks": [ - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/agents/repos/{owner}/{repo}/tasks", - "title": "List tasks for repository", - "category": "agent-tasks", - "subcategory": "agent-tasks", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

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

" - }, - { - "name": "repo", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

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

" - }, - { - "name": "per_page", - "in": "query", - "schema": { - "type": "integer", - "default": 30, - "minimum": 1, - "maximum": 100 - }, - "description": "

The number of results per page (max 100).

" - }, - { - "name": "page", - "in": "query", - "schema": { - "type": "integer", - "default": 1, - "minimum": 1 - }, - "description": "

The page number of the results to fetch.

" - }, - { - "name": "sort", - "in": "query", - "schema": { - "type": "string", - "default": "updated_at", - "enum": [ - "updated_at", - "created_at" - ] - }, - "description": "

The field to sort results by. Can be updated_at or created_at.

" - }, - { - "name": "direction", - "in": "query", - "schema": { - "type": "string", - "default": "desc", - "enum": [ - "asc", - "desc" - ] - }, - "description": "

The direction to sort results. Can be asc or desc.

" - }, - { - "name": "state", - "in": "query", - "schema": { - "type": "string" - }, - "description": "

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.

" - }, - { - "name": "is_archived", - "in": "query", - "schema": { - "type": "boolean", - "default": false - }, - "description": "

Filter by archived status. When true, returns only archived tasks. When false or omitted, returns only non-archived tasks. Defaults to false.

" - }, - { - "name": "since", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - }, - "description": "

Only show tasks updated at or after this time (ISO 8601 timestamp)

" - }, - { - "name": "creator_id", - "in": "query", - "schema": { - "type": "integer" - }, - "description": "

Filter tasks by creator user ID

" - } - ], - "bodyParameters": [], - "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change.

\n
\n

Returns a list of tasks for a specific repository

", - "codeExamples": [ - { - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "owner": "OWNER", - "repo": "REPO" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Tasks retrieved successfully

", - "example": { - "tasks": [ - { - "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "url": "https://api.github.com/agents/repos/octocat/hello-world/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "html_url": "https://github.com/octocat/hello-world/copilot/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "creator": { - "id": 1 - }, - "creator_type": "user", - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "state": "completed", - "session_count": 1, - "artifacts": [ - { - "provider": "github", - "type": "pull", - "data": { - "id": 42 - } - } - ], - "archived_at": null, - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T01:00:00Z" - } - ] - }, - "schema": { - "type": "object", - "required": [ - "tasks" - ], - "properties": { - "tasks": { - "type": "array", - "items": { - "type": "object", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique task identifier" - }, - "url": { - "type": "string", - "description": "API URL for this task" - }, - "html_url": { - "type": "string", - "description": "Web URL for this task" - }, - "name": { - "type": "string", - "description": "Human-readable name derived from the task prompt" - }, - "creator": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - } - ], - "description": "The entity who created this task" - }, - "creator_type": { - "type": "string", - "description": "Type of the task creator", - "enum": [ - "user", - "organization" - ] - }, - "user_collaborators": { - "type": "array", - "items": { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "description": "User objects of collaborators on this task", - "deprecated": true - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this task belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "state": { - "type": "string", - "description": "Current state of the task, derived from its most recent session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "session_count": { - "type": "integer", - "format": "int32", - "description": "Number of sessions in this task" - }, - "artifacts": { - "type": "array", - "items": { - "type": "object", - "description": "A resource generated by the task", - "required": [ - "provider", - "type", - "data" - ], - "properties": { - "provider": { - "type": "string", - "enum": [ - "github" - ], - "description": "Provider namespace" - }, - "type": { - "type": "string", - "enum": [ - "pull", - "branch" - ], - "description": "Type of artifact. Available Values: `pull`, `branch`.\n" - }, - "data": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub resource (pull request, issue, etc.)", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "GitHub resource ID" - }, - "global_id": { - "type": "string", - "description": "GraphQL global ID" - } - } - }, - { - "type": "object", - "description": "A Git branch reference", - "required": [ - "head_ref", - "base_ref" - ], - "properties": { - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - } - } - } - ], - "description": "Resource data (shape depends on type)" - } - } - }, - "description": "Resources created by this task (PRs, branches, etc.)" - }, - "archived_at": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Timestamp when the task was archived, null if not archived" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp of the most recent update" - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the task was created" - } - } - }, - "description": "List of tasks" - }, - "total_active_count": { - "type": "integer", - "format": "int32", - "description": "Total count of active (non-archived) tasks" - }, - "total_archived_count": { - "type": "integer", - "format": "int32", - "description": "Total count of archived tasks" - } - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Tasks retrieved successfully

" - }, - { - "httpStatusCode": "400", - "description": "

Bad request

" - }, - { - "httpStatusCode": "401", - "description": "

Authentication required

" - }, - { - "httpStatusCode": "403", - "description": "

Insufficient permissions

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "422", - "description": "

Validation Failed

" - } - ], - "previews": [] - }, - { - "serverUrl": "https://api.github.com", - "verb": "post", - "requestPath": "/agents/repos/{owner}/{repo}/tasks", - "title": "Create a task", - "category": "agent-tasks", - "subcategory": "agent-tasks", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

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

" - }, - { - "name": "repo", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

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

" - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "prompt", - "description": "

The user's prompt for the agent

", - "isRequired": true - }, - { - "type": "string", - "name": "model", - "description": "

The model to use for this task. The allowed models may change over time and depend on the user's GitHub Copilot plan and organization policies. Currently supported values: claude-sonnet-4.6, claude-opus-4.6, gpt-5.2-codex, gpt-5.3-codex, gpt-5.4, claude-sonnet-4.5, claude-opus-4.5

" - }, - { - "type": "boolean", - "name": "create_pull_request", - "description": "

Whether to create a PR.

", - "default": false - }, - { - "type": "string", - "name": "base_ref", - "description": "

Base ref for new branch/PR

" - } - ], - "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change.

\n
\n

Creates a new task for a repository.

", - "codeExamples": [ - { - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "prompt": "Fix the login button on the homepage", - "base_ref": "main" - }, - "parameters": { - "owner": "OWNER", - "repo": "REPO" - } - }, - "response": { - "statusCode": "201", - "contentType": "application/json", - "description": "

Task created successfully

", - "example": { - "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "url": "https://api.github.com/agents/repos/octocat/hello-world/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "html_url": "https://github.com/octocat/hello-world/copilot/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "creator": { - "id": 1 - }, - "creator_type": "user", - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "state": "queued", - "session_count": 1, - "artifacts": [], - "archived_at": null, - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T00:00:00Z" - }, - "schema": { - "type": "object", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique task identifier" - }, - "url": { - "type": "string", - "description": "API URL for this task" - }, - "html_url": { - "type": "string", - "description": "Web URL for this task" - }, - "name": { - "type": "string", - "description": "Human-readable name derived from the task prompt" - }, - "creator": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - } - ], - "description": "The entity who created this task" - }, - "creator_type": { - "type": "string", - "description": "Type of the task creator", - "enum": [ - "user", - "organization" - ] - }, - "user_collaborators": { - "type": "array", - "items": { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "description": "User objects of collaborators on this task", - "deprecated": true - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this task belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "state": { - "type": "string", - "description": "Current state of the task, derived from its most recent session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "session_count": { - "type": "integer", - "format": "int32", - "description": "Number of sessions in this task" - }, - "artifacts": { - "type": "array", - "items": { - "type": "object", - "description": "A resource generated by the task", - "required": [ - "provider", - "type", - "data" - ], - "properties": { - "provider": { - "type": "string", - "enum": [ - "github" - ], - "description": "Provider namespace" - }, - "type": { - "type": "string", - "enum": [ - "pull", - "branch" - ], - "description": "Type of artifact. Available Values: `pull`, `branch`.\n" - }, - "data": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub resource (pull request, issue, etc.)", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "GitHub resource ID" - }, - "global_id": { - "type": "string", - "description": "GraphQL global ID" - } - } - }, - { - "type": "object", - "description": "A Git branch reference", - "required": [ - "head_ref", - "base_ref" - ], - "properties": { - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - } - } - } - ], - "description": "Resource data (shape depends on type)" - } - } - }, - "description": "Resources created by this task (PRs, branches, etc.)" - }, - "archived_at": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Timestamp when the task was archived, null if not archived" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp of the most recent update" - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the task was created" - } - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "201", - "description": "

Task created successfully

" - }, - { - "httpStatusCode": "400", - "description": "

Problems parsing JSON

" - }, - { - "httpStatusCode": "401", - "description": "

Authentication required

" - }, - { - "httpStatusCode": "403", - "description": "

Insufficient permissions

" - }, - { - "httpStatusCode": "422", - "description": "

Validation Failed

" - } - ], - "previews": [] - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/agents/repos/{owner}/{repo}/tasks/{task_id}", - "title": "Get a task by repo", - "category": "agent-tasks", - "subcategory": "agent-tasks", - "parameters": [ - { - "name": "owner", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

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

" - }, - { - "name": "repo", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

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

" - }, - { - "name": "task_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

The unique identifier of the task.

" - } - ], - "bodyParameters": [], - "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change.

\n
\n

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

", - "codeExamples": [ - { - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "owner": "OWNER", - "repo": "REPO", - "task_id": "TASK_ID" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Task retrieved successfully

", - "example": { - "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "url": "https://api.github.com/agents/repos/octocat/hello-world/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "html_url": "https://github.com/octocat/hello-world/copilot/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "creator": { - "id": 1 - }, - "creator_type": "user", - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "state": "completed", - "session_count": 1, - "artifacts": [ - { - "provider": "github", - "type": "pull", - "data": { - "id": 42 - } - } - ], - "archived_at": null, - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T01:00:00Z", - "sessions": [ - { - "id": "s1a2b3c4-d5e6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "user": { - "id": 1 - }, - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "task_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "state": "completed", - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T01:00:00Z", - "completed_at": "2025-01-01T01:00:00Z", - "prompt": "Fix the login button on the homepage", - "head_ref": "copilot/fix-1", - "base_ref": "main", - "model": "claude-sonnet-4.6" - } - ] - }, - "schema": { - "allOf": [ - { - "type": "object", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique task identifier" - }, - "url": { - "type": "string", - "description": "API URL for this task" - }, - "html_url": { - "type": "string", - "description": "Web URL for this task" - }, - "name": { - "type": "string", - "description": "Human-readable name derived from the task prompt" - }, - "creator": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - } - ], - "description": "The entity who created this task" - }, - "creator_type": { - "type": "string", - "description": "Type of the task creator", - "enum": [ - "user", - "organization" - ] - }, - "user_collaborators": { - "type": "array", - "items": { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "description": "User objects of collaborators on this task", - "deprecated": true - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this task belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "state": { - "type": "string", - "description": "Current state of the task, derived from its most recent session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "session_count": { - "type": "integer", - "format": "int32", - "description": "Number of sessions in this task" - }, - "artifacts": { - "type": "array", - "items": { - "type": "object", - "description": "A resource generated by the task", - "required": [ - "provider", - "type", - "data" - ], - "properties": { - "provider": { - "type": "string", - "enum": [ - "github" - ], - "description": "Provider namespace" - }, - "type": { - "type": "string", - "enum": [ - "pull", - "branch" - ], - "description": "Type of artifact. Available Values: `pull`, `branch`.\n" - }, - "data": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub resource (pull request, issue, etc.)", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "GitHub resource ID" - }, - "global_id": { - "type": "string", - "description": "GraphQL global ID" - } - } - }, - { - "type": "object", - "description": "A Git branch reference", - "required": [ - "head_ref", - "base_ref" - ], - "properties": { - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - } - } - } - ], - "description": "Resource data (shape depends on type)" - } - } - }, - "description": "Resources created by this task (PRs, branches, etc.)" - }, - "archived_at": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Timestamp when the task was archived, null if not archived" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp of the most recent update" - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the task was created" - } - } - }, - { - "type": "object", - "properties": { - "sessions": { - "type": "array", - "items": { - "type": "object", - "description": "Full session details within a task", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Session ID" - }, - "name": { - "type": "string", - "description": "Session name" - }, - "user": { - "description": "The user who created this session", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this session belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "task_id": { - "type": "string", - "description": "Task ID this session belongs to" - }, - "state": { - "type": "string", - "description": "Current state of a session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Creation timestamp" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Last update timestamp" - }, - "completed_at": { - "type": "string", - "format": "date-time", - "description": "Completion timestamp" - }, - "prompt": { - "type": "string", - "description": "Content of the triggering event" - }, - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - }, - "model": { - "type": "string", - "description": "Model used for this session" - }, - "error": { - "type": "object", - "description": "Error details for a failed session", - "properties": { - "message": { - "type": "string", - "description": "Error message" - } - } - } - } - }, - "description": "Sessions associated with this task" - } - } - } - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Task retrieved successfully

" - }, - { - "httpStatusCode": "400", - "description": "

Bad request

" - }, - { - "httpStatusCode": "401", - "description": "

Authentication required

" - }, - { - "httpStatusCode": "403", - "description": "

Insufficient permissions

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "422", - "description": "

Validation Failed

" - } - ], - "previews": [] - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/agents/tasks", - "title": "List tasks", - "category": "agent-tasks", - "subcategory": "agent-tasks", - "parameters": [ - { - "name": "per_page", - "in": "query", - "schema": { - "type": "integer", - "default": 30, - "minimum": 1, - "maximum": 100 - }, - "description": "

The number of results per page (max 100).

" - }, - { - "name": "page", - "in": "query", - "schema": { - "type": "integer", - "default": 1, - "minimum": 1 - }, - "description": "

The page number of the results to fetch.

" - }, - { - "name": "sort", - "in": "query", - "schema": { - "type": "string", - "default": "updated_at", - "enum": [ - "updated_at", - "created_at" - ] - }, - "description": "

The field to sort results by. Can be updated_at or created_at.

" - }, - { - "name": "direction", - "in": "query", - "schema": { - "type": "string", - "default": "desc", - "enum": [ - "asc", - "desc" - ] - }, - "description": "

The direction to sort results. Can be asc or desc.

" - }, - { - "name": "state", - "in": "query", - "schema": { - "type": "string" - }, - "description": "

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.

" - }, - { - "name": "is_archived", - "in": "query", - "schema": { - "type": "boolean", - "default": false - }, - "description": "

Filter by archived status. When true, returns only archived tasks. When false or omitted, returns only non-archived tasks. Defaults to false.

" - }, - { - "name": "since", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - }, - "description": "

Only show tasks updated at or after this time (ISO 8601 timestamp)

" - } - ], - "bodyParameters": [], - "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change.

\n
\n

Returns a list of tasks for the authenticated user

", - "codeExamples": [ - { - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json" - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Tasks retrieved successfully

", - "example": { - "tasks": [ - { - "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "creator": { - "id": 1 - }, - "creator_type": "user", - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "state": "completed", - "session_count": 1, - "artifacts": [ - { - "provider": "github", - "type": "pull", - "data": { - "id": 42 - } - } - ], - "archived_at": null, - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T01:00:00Z" - } - ] - }, - "schema": { - "type": "object", - "required": [ - "tasks" - ], - "properties": { - "tasks": { - "type": "array", - "items": { - "type": "object", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique task identifier" - }, - "url": { - "type": "string", - "description": "API URL for this task" - }, - "html_url": { - "type": "string", - "description": "Web URL for this task" - }, - "name": { - "type": "string", - "description": "Human-readable name derived from the task prompt" - }, - "creator": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - } - ], - "description": "The entity who created this task" - }, - "creator_type": { - "type": "string", - "description": "Type of the task creator", - "enum": [ - "user", - "organization" - ] - }, - "user_collaborators": { - "type": "array", - "items": { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "description": "User objects of collaborators on this task", - "deprecated": true - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this task belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "state": { - "type": "string", - "description": "Current state of the task, derived from its most recent session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "session_count": { - "type": "integer", - "format": "int32", - "description": "Number of sessions in this task" - }, - "artifacts": { - "type": "array", - "items": { - "type": "object", - "description": "A resource generated by the task", - "required": [ - "provider", - "type", - "data" - ], - "properties": { - "provider": { - "type": "string", - "enum": [ - "github" - ], - "description": "Provider namespace" - }, - "type": { - "type": "string", - "enum": [ - "pull", - "branch" - ], - "description": "Type of artifact. Available Values: `pull`, `branch`.\n" - }, - "data": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub resource (pull request, issue, etc.)", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "GitHub resource ID" - }, - "global_id": { - "type": "string", - "description": "GraphQL global ID" - } - } - }, - { - "type": "object", - "description": "A Git branch reference", - "required": [ - "head_ref", - "base_ref" - ], - "properties": { - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - } - } - } - ], - "description": "Resource data (shape depends on type)" - } - } - }, - "description": "Resources created by this task (PRs, branches, etc.)" - }, - "archived_at": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Timestamp when the task was archived, null if not archived" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp of the most recent update" - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the task was created" - } - } - }, - "description": "List of tasks" - }, - "total_active_count": { - "type": "integer", - "format": "int32", - "description": "Total count of active (non-archived) tasks" - }, - "total_archived_count": { - "type": "integer", - "format": "int32", - "description": "Total count of archived tasks" - } - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Tasks retrieved successfully

" - }, - { - "httpStatusCode": "400", - "description": "

Bad request

" - }, - { - "httpStatusCode": "401", - "description": "

Authentication required

" - }, - { - "httpStatusCode": "403", - "description": "

Insufficient permissions

" - }, - { - "httpStatusCode": "422", - "description": "

Validation Failed

" - } - ], - "previews": [] - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/agents/tasks/{task_id}", - "title": "Get a task by ID", - "category": "agent-tasks", - "subcategory": "agent-tasks", - "parameters": [ - { - "name": "task_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "

The unique identifier of the task.

" - } - ], - "bodyParameters": [], - "descriptionHTML": "

Note

\n

\nThis endpoint is in public preview and is subject to change.

\n
\n

Returns a task by ID with its associated sessions

", - "codeExamples": [ - { - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "task_id": "TASK_ID" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

Task retrieved successfully

", - "example": { - "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "url": "https://api.github.com/agents/repos/octocat/hello-world/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "html_url": "https://github.com/octocat/hello-world/copilot/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "creator": { - "id": 1 - }, - "creator_type": "user", - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "state": "completed", - "session_count": 1, - "artifacts": [ - { - "provider": "github", - "type": "pull", - "data": { - "id": 42 - } - } - ], - "archived_at": null, - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T01:00:00Z", - "sessions": [ - { - "id": "s1a2b3c4-d5e6-7890-abcd-ef1234567890", - "name": "Fix the login button on the homepage", - "user": { - "id": 1 - }, - "owner": { - "id": 1 - }, - "repository": { - "id": 1296269 - }, - "task_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "state": "completed", - "created_at": "2025-01-01T00:00:00Z", - "updated_at": "2025-01-01T01:00:00Z", - "completed_at": "2025-01-01T01:00:00Z", - "prompt": "Fix the login button on the homepage", - "head_ref": "copilot/fix-1", - "base_ref": "main", - "model": "claude-sonnet-4.6" - } - ] - }, - "schema": { - "allOf": [ - { - "type": "object", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique task identifier" - }, - "url": { - "type": "string", - "description": "API URL for this task" - }, - "html_url": { - "type": "string", - "description": "Web URL for this task" - }, - "name": { - "type": "string", - "description": "Human-readable name derived from the task prompt" - }, - "creator": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - } - ], - "description": "The entity who created this task" - }, - "creator_type": { - "type": "string", - "description": "Type of the task creator", - "enum": [ - "user", - "organization" - ] - }, - "user_collaborators": { - "type": "array", - "items": { - "type": "object", - "description": "A GitHub user", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "description": "User objects of collaborators on this task", - "deprecated": true - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this task belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "state": { - "type": "string", - "description": "Current state of the task, derived from its most recent session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "session_count": { - "type": "integer", - "format": "int32", - "description": "Number of sessions in this task" - }, - "artifacts": { - "type": "array", - "items": { - "type": "object", - "description": "A resource generated by the task", - "required": [ - "provider", - "type", - "data" - ], - "properties": { - "provider": { - "type": "string", - "enum": [ - "github" - ], - "description": "Provider namespace" - }, - "type": { - "type": "string", - "enum": [ - "pull", - "branch" - ], - "description": "Type of artifact. Available Values: `pull`, `branch`.\n" - }, - "data": { - "oneOf": [ - { - "type": "object", - "description": "A GitHub resource (pull request, issue, etc.)", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "GitHub resource ID" - }, - "global_id": { - "type": "string", - "description": "GraphQL global ID" - } - } - }, - { - "type": "object", - "description": "A Git branch reference", - "required": [ - "head_ref", - "base_ref" - ], - "properties": { - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - } - } - } - ], - "description": "Resource data (shape depends on type)" - } - } - }, - "description": "Resources created by this task (PRs, branches, etc.)" - }, - "archived_at": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Timestamp when the task was archived, null if not archived" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp of the most recent update" - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the task was created" - } - } - }, - { - "type": "object", - "properties": { - "sessions": { - "type": "array", - "items": { - "type": "object", - "description": "Full session details within a task", - "required": [ - "id", - "state", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Session ID" - }, - "name": { - "type": "string", - "description": "Session name" - }, - "user": { - "description": "The user who created this session", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "owner": { - "description": "The owner of the repository", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the user" - } - } - }, - "repository": { - "description": "The repository this session belongs to", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "The unique identifier of the repository" - } - } - }, - "task_id": { - "type": "string", - "description": "Task ID this session belongs to" - }, - "state": { - "type": "string", - "description": "Current state of a session", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "idle", - "waiting_for_user", - "timed_out", - "cancelled" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Creation timestamp" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Last update timestamp" - }, - "completed_at": { - "type": "string", - "format": "date-time", - "description": "Completion timestamp" - }, - "prompt": { - "type": "string", - "description": "Content of the triggering event" - }, - "head_ref": { - "type": "string", - "description": "Head branch name" - }, - "base_ref": { - "type": "string", - "description": "Base branch name" - }, - "model": { - "type": "string", - "description": "Model used for this session" - }, - "error": { - "type": "object", - "description": "Error details for a failed session", - "properties": { - "message": { - "type": "string", - "description": "Error message" - } - } - } - } - }, - "description": "Sessions associated with this task" - } - } - } - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

Task retrieved successfully

" - }, - { - "httpStatusCode": "400", - "description": "

Problems parsing request

" - }, - { - "httpStatusCode": "401", - "description": "

Authentication required

" - }, - { - "httpStatusCode": "403", - "description": "

Insufficient permissions

" - }, - { - "httpStatusCode": "404", - "description": "

Resource not found

" - }, - { - "httpStatusCode": "422", - "description": "

Validation Failed

" - } - ], - "previews": [] - } - ] -} \ No newline at end of file diff --git a/src/rest/scripts/utils/sync.ts b/src/rest/scripts/utils/sync.ts index 481c96578897..fd0c835135f3 100644 --- a/src/rest/scripts/utils/sync.ts +++ b/src/rest/scripts/utils/sync.ts @@ -1,4 +1,4 @@ -import { readFile, writeFile } from 'fs/promises' +import { readFile, writeFile, readdir, unlink } from 'fs/promises' import { existsSync } from 'fs' import path from 'path' import { mkdirp } from 'mkdirp' @@ -27,6 +27,9 @@ export async function syncRestData( injectIntoSchema?: (schema: Schema, schemaName: string) => Schema, ): Promise { const writeTasks: Promise[] = [] + // Track which category files were written per version directory so we + // can remove stale files that no longer appear in the upstream schema. + const writtenFilesByVersion = new Map>() await Promise.all( restSchemas.map(async (schemaName) => { @@ -69,8 +72,14 @@ export async function syncRestData( if (!existsSync(targetDirectoryPath)) { await mkdirp(targetDirectoryPath) } + + const writtenFiles = new Set() + writtenFilesByVersion.set(targetDirectoryPath, writtenFiles) + for (const [category, categoryData] of Object.entries(formattedOperations)) { - const categoryPath = path.join(targetDirectoryPath, `${category}.json`) + const categoryFilename = `${category}.json` + const categoryPath = path.join(targetDirectoryPath, categoryFilename) + writtenFiles.add(categoryFilename) writeTasks.push( (async () => { await writeFile(categoryPath, JSON.stringify(categoryData, null, 2)) @@ -82,10 +91,32 @@ export async function syncRestData( ) await Promise.all(writeTasks) + await removeStaleRestDataFiles(writtenFilesByVersion) await updateRestFiles() await updateRestConfigData(restSchemas) } +// After syncing, remove any .json category files on disk that were not +// written during this run. This handles the case where an entire API +// category is removed upstream — without this cleanup, stale data files +// would persist and continue to generate docs pages. +export async function removeStaleRestDataFiles( + writtenFilesByVersion: Map>, +): Promise { + for (const [versionDir, writtenFiles] of writtenFilesByVersion) { + if (!existsSync(versionDir)) continue + + const filesOnDisk = (await readdir(versionDir)).filter((f) => f.endsWith('.json')) + for (const file of filesOnDisk) { + if (!writtenFiles.has(file)) { + const filePath = path.join(versionDir, file) + await unlink(filePath) + console.log(`🗑️ Removed stale data file ${filePath}`) + } + } + } +} + async function formatRestData(operations: Operation[]): Promise { const categories = [...new Set(operations.map((operation) => operation.category))].sort() diff --git a/src/rest/tests/remove-stale-data-files.ts b/src/rest/tests/remove-stale-data-files.ts new file mode 100644 index 000000000000..b6a0a153f851 --- /dev/null +++ b/src/rest/tests/remove-stale-data-files.ts @@ -0,0 +1,92 @@ +import { describe, expect, test, beforeEach, afterEach } from 'vitest' +import { mkdtemp, writeFile, readdir, rm } from 'fs/promises' +import { mkdirSync } from 'fs' +import path from 'path' +import os from 'os' + +import { removeStaleRestDataFiles } from '../scripts/utils/sync' + +describe('removeStaleRestDataFiles', () => { + let tmpDir: string + let versionDir: string + + beforeEach(async () => { + tmpDir = await mkdtemp(path.join(os.tmpdir(), 'rest-sync-test-')) + versionDir = path.join(tmpDir, 'fpt-2022-11-28') + mkdirSync(versionDir) + }) + + afterEach(async () => { + await rm(tmpDir, { recursive: true, force: true }) + }) + + test('removes stale .json files not written during sync', async () => { + // Simulate pre-existing files on disk + await writeFile(path.join(versionDir, 'actions.json'), '{}') + await writeFile(path.join(versionDir, 'agent-tasks.json'), '{}') + await writeFile(path.join(versionDir, 'repos.json'), '{}') + + // Only actions.json and repos.json were produced by the sync + const writtenFiles = new Map>() + writtenFiles.set(versionDir, new Set(['actions.json', 'repos.json'])) + + await removeStaleRestDataFiles(writtenFiles) + + const remaining = (await readdir(versionDir)).sort() + expect(remaining).toEqual(['actions.json', 'repos.json']) + }) + + test('does not remove files when all are current', async () => { + await writeFile(path.join(versionDir, 'actions.json'), '{}') + await writeFile(path.join(versionDir, 'repos.json'), '{}') + + const writtenFiles = new Map>() + writtenFiles.set(versionDir, new Set(['actions.json', 'repos.json'])) + + await removeStaleRestDataFiles(writtenFiles) + + const remaining = (await readdir(versionDir)).sort() + expect(remaining).toEqual(['actions.json', 'repos.json']) + }) + + test('ignores non-.json files', async () => { + await writeFile(path.join(versionDir, 'actions.json'), '{}') + await writeFile(path.join(versionDir, 'README.md'), '# readme') + + const writtenFiles = new Map>() + writtenFiles.set(versionDir, new Set(['actions.json'])) + + await removeStaleRestDataFiles(writtenFiles) + + const remaining = (await readdir(versionDir)).sort() + expect(remaining).toEqual(['README.md', 'actions.json']) + }) + + test('handles multiple version directories', async () => { + const versionDir2 = path.join(tmpDir, 'ghec-2022-11-28') + mkdirSync(versionDir2) + + await writeFile(path.join(versionDir, 'actions.json'), '{}') + await writeFile(path.join(versionDir, 'stale.json'), '{}') + await writeFile(path.join(versionDir2, 'repos.json'), '{}') + await writeFile(path.join(versionDir2, 'stale.json'), '{}') + + const writtenFiles = new Map>() + writtenFiles.set(versionDir, new Set(['actions.json'])) + writtenFiles.set(versionDir2, new Set(['repos.json'])) + + await removeStaleRestDataFiles(writtenFiles) + + expect(await readdir(versionDir)).toEqual(['actions.json']) + expect(await readdir(versionDir2)).toEqual(['repos.json']) + }) + + test('skips version directories that do not exist', async () => { + const nonexistent = path.join(tmpDir, 'does-not-exist') + const writtenFiles = new Map>() + writtenFiles.set(nonexistent, new Set(['actions.json'])) + + // Should not throw + await removeStaleRestDataFiles(writtenFiles) + }) +}) diff --git a/src/types/types.ts b/src/types/types.ts index 223327096fd2..896237334f2c 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -345,6 +345,7 @@ export type Page = { industry?: string[] sidebarLink?: SidebarLink contentType?: string + docsTeamMetrics?: string[] children?: string[] }