diff --git a/descriptions/api.github.com/api.github.com.2022-11-28.json b/descriptions/api.github.com/api.github.com.2022-11-28.json index 06d803d914..febc269a8d 100644 --- a/descriptions/api.github.com/api.github.com.2022-11-28.json +++ b/descriptions/api.github.com/api.github.com.2022-11-28.json @@ -195,6 +195,10 @@ { "name": "projects", "description": "Endpoints to manage Projects using the REST API." + }, + { + "name": "agent-tasks", + "description": "Endpoints to manage and interact with agent tasks." } ], "servers": [ @@ -325,196 +329,3481 @@ "type": "string" } } - ] - } - }, - { - "name": "is_withdrawn", - "in": "query", - "description": "Whether to only return advisories that have been withdrawn.", - "schema": { - "type": "boolean" + ] + } + }, + { + "name": "is_withdrawn", + "in": "query", + "description": "Whether to only return advisories that have been withdrawn.", + "schema": { + "type": "boolean" + } + }, + { + "name": "affects", + "in": "query", + "description": "If specified, only return advisories that affect any of `package` or `package@version`. A maximum of 1000 packages can be specified.\nIf the query parameter causes the URL to exceed the maximum URL length supported by your client, you must specify fewer packages.\n\nExample: `affects=package1,package2@1.0.0,package3@2.0.0` or `affects[]=package1&affects[]=package2@1.0.0`", + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "maxItems": 1000, + "items": { + "type": "string" + } + } + ] + } + }, + { + "name": "published", + "in": "query", + "description": "If specified, only return advisories that were published on a date or date range.\n\nFor more information on the syntax of the date range, see \"[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates).\"", + "schema": { + "type": "string" + } + }, + { + "name": "updated", + "in": "query", + "description": "If specified, only return advisories that were updated on a date or date range.\n\nFor more information on the syntax of the date range, see \"[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates).\"", + "schema": { + "type": "string" + } + }, + { + "name": "modified", + "description": "If specified, only show advisories that were updated or published on a date or date range.\n\nFor more information on the syntax of the date range, see \"[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates).\"", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "epss_percentage", + "in": "query", + "description": "If specified, only return advisories that have an EPSS percentage score that matches the provided value.\nThe EPSS percentage represents the likelihood of a CVE being exploited.", + "schema": { + "type": "string" + } + }, + { + "name": "epss_percentile", + "in": "query", + "description": "If specified, only return advisories that have an EPSS percentile score that matches the provided value.\nThe EPSS percentile represents the relative rank of the CVE's likelihood of being exploited compared to other CVEs.", + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/pagination-before" + }, + { + "$ref": "#/components/parameters/pagination-after" + }, + { + "$ref": "#/components/parameters/direction" + }, + { + "name": "per_page", + "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 30 + } + }, + { + "name": "sort", + "description": "The property to sort the results by.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "updated", + "published", + "epss_percentage", + "epss_percentile" + ], + "default": "published" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/global-advisory" + } + }, + "examples": { + "default": { + "$ref": "#/components/examples/global-advisory-items" + } + } + } + } + }, + "429": { + "description": "Too many requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/basic-error" + } + } + } + }, + "422": { + "$ref": "#/components/responses/validation_failed_simple" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "security-advisories", + "subcategory": "global-advisories" + } + } + }, + "/advisories/{ghsa_id}": { + "get": { + "summary": "Get a global security advisory", + "description": "Gets a global security advisory using its GitHub Security Advisory (GHSA) identifier.", + "tags": [ + "security-advisories" + ], + "operationId": "security-advisories/get-global-advisory", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/security-advisories/global-advisories#get-a-global-security-advisory" + }, + "parameters": [ + { + "$ref": "#/components/parameters/ghsa_id" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/global-advisory" + }, + "examples": { + "default": { + "$ref": "#/components/examples/global-advisory" + } + } + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "security-advisories", + "subcategory": "global-advisories" + } + } + }, + "/agents/repos/{owner}/{repo}/tasks": { + "get": { + "summary": "List tasks for repository", + "description": "Returns a list of tasks for a specific repository", + "tags": [ + "agent-tasks" + ], + "operationId": "agent-tasks/list-tasks-for-repo", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/agent-tasks/agent-tasks#list-tasks-for-repository" + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "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" + }, + "description": "Filter by archived status. When `true`, returns only archived tasks. When `false`, returns only non-archived tasks." + }, + { + "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" + } + ], + "responses": { + "200": { + "description": "Tasks retrieved successfully", + "headers": { + "Link": { + "description": "Pagination links. Contains rel=\"first\" (always),\nrel=\"prev\" (when current page > 1),\nrel=\"next\" (when more pages exist), and rel=\"last\" (when on the final page).\n", + "schema": { + "type": "string" + }, + "example": "; rel=\"next\", ; rel=\"first\"" + } + }, + "content": { + "application/json": { + "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": { + "description": "The entity who created this task", + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "The unique identifier of the user" + } + } + }, + "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": [ + "github_resource", + "branch" + ], + "description": "Discriminator for data shape" + }, + "data": { + "oneOf": [ + { + "type": "object", + "description": "A GitHub resource (pull request, issue, etc.)", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "GitHub resource ID" + }, + "type": { + "type": "string", + "description": "Resource type (e.g., pull_request, issue)" + }, + "global_id": { + "type": "string", + "description": "GraphQL global ID" + } + } + }, + { + "type": "object", + "description": "A Git branch reference", + "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", + "format": "date-time", + "nullable": true, + "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" + }, + "remote_steerable": { + "type": "boolean", + "description": "Whether the latest session in this task supports remote steering via Mission Control" + } + } + }, + "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" + } + } + }, + "examples": { + "default": { + "value": { + "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": "github_resource", + "data": { + "id": 42, + "type": "pull_request" + } + } + ], + "archived_at": null, + "created_at": "2025-01-01T00:00:00Z", + "updated_at": "2025-01-01T01:00:00Z" + } + ] + } + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "403": { + "description": "Insufficient permissions", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "422": { + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + } + } + }, + "post": { + "summary": "Create a task", + "description": "Creates a new task for a repository", + "tags": [ + "agent-tasks" + ], + "operationId": "agent-tasks/create-task", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/agent-tasks/agent-tasks#create-a-task" + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "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." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "event_content" + ], + "properties": { + "agent_id": { + "type": "integer", + "format": "int64", + "description": "Agent ID (optional, defaults to coding agent)" + }, + "problem_statement": { + "type": "string", + "description": "Additional prompting for the agent" + }, + "event_content": { + "type": "string", + "description": "User's written prompt" + }, + "model": { + "type": "string", + "description": "Model identifier" + }, + "custom_agent": { + "type": "string", + "description": "Custom agent identifier" + }, + "create_pull_request": { + "type": "boolean", + "description": "Whether to create a PR" + }, + "base_ref": { + "type": "string", + "description": "Base ref for new branch/PR" + }, + "event_type": { + "type": "string", + "description": "Type of event" + }, + "event_url": { + "type": "string", + "description": "URL of the triggering event" + }, + "event_identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Identifiers for tracking" + } + } + }, + "examples": { + "default": { + "value": { + "event_content": "Fix the login button on the homepage", + "create_pull_request": true, + "base_ref": "main" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Task created successfully", + "content": { + "application/json": { + "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": { + "description": "The entity who created this task", + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "The unique identifier of the user" + } + } + }, + "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": [ + "github_resource", + "branch" + ], + "description": "Discriminator for data shape" + }, + "data": { + "oneOf": [ + { + "type": "object", + "description": "A GitHub resource (pull request, issue, etc.)", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "GitHub resource ID" + }, + "type": { + "type": "string", + "description": "Resource type (e.g., pull_request, issue)" + }, + "global_id": { + "type": "string", + "description": "GraphQL global ID" + } + } + }, + { + "type": "object", + "description": "A Git branch reference", + "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", + "format": "date-time", + "nullable": true, + "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" + }, + "remote_steerable": { + "type": "boolean", + "description": "Whether the latest session in this task supports remote steering via Mission Control" + } + } + }, + "examples": { + "default": { + "value": { + "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" + } + } + } + } + } + }, + "400": { + "description": "Problems parsing JSON", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "403": { + "description": "Insufficient permissions", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "422": { + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + } + } + } + }, + "/agents/repos/{owner}/{repo}/tasks/{task_id}": { + "get": { + "summary": "Get a task by repo", + "description": "Returns a task by ID scoped to an owner/repo path", + "tags": [ + "agent-tasks" + ], + "operationId": "agent-tasks/get-task-by-repo-and-id", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/agent-tasks/agent-tasks#get-a-task-by-repo" + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "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." + } + ], + "responses": { + "200": { + "description": "Task retrieved successfully", + "content": { + "application/json": { + "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": { + "description": "The entity who created this task", + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "The unique identifier of the user" + } + } + }, + "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": [ + "github_resource", + "branch" + ], + "description": "Discriminator for data shape" + }, + "data": { + "oneOf": [ + { + "type": "object", + "description": "A GitHub resource (pull request, issue, etc.)", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "GitHub resource ID" + }, + "type": { + "type": "string", + "description": "Resource type (e.g., pull_request, issue)" + }, + "global_id": { + "type": "string", + "description": "GraphQL global ID" + } + } + }, + { + "type": "object", + "description": "A Git branch reference", + "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", + "format": "date-time", + "nullable": true, + "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" + }, + "remote_steerable": { + "type": "boolean", + "description": "Whether the latest session in this task supports remote steering via Mission Control" + } + } + }, + { + "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" + } + } + }, + "agent_id": { + "type": "integer", + "format": "int64", + "description": "Agent ID" + }, + "agent_task_id": { + "type": "string", + "description": "Agent internal task ID" + }, + "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" + }, + "event_type": { + "type": "string", + "description": "Type of event that triggered this session" + }, + "event_url": { + "type": "string", + "description": "URL of the triggering event" + }, + "event_content": { + "type": "string", + "description": "Content of the triggering event" + }, + "event_identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Identifiers for tracking" + }, + "resource_type": { + "type": "string", + "description": "Type of resource associated with this session" + }, + "resource_id": { + "type": "integer", + "format": "int64", + "description": "Resource ID" + }, + "resource_number": { + "type": "integer", + "format": "int32", + "description": "Resource number (e.g., PR number)" + }, + "resource_global_id": { + "type": "string", + "description": "GraphQL global ID of the resource" + }, + "resource_state": { + "type": "string", + "description": "State of the associated resource" + }, + "head_ref": { + "type": "string", + "description": "Head branch name" + }, + "base_ref": { + "type": "string", + "description": "Base branch name" + }, + "workflow_run_id": { + "type": "integer", + "format": "int64", + "description": "GitHub Actions workflow run ID" + }, + "model": { + "type": "string", + "description": "Model used for this session" + }, + "premium_requests": { + "type": "number", + "format": "double", + "description": "Premium request count" + }, + "remote_steerable": { + "type": "boolean", + "description": "Whether this session supports remote steering via Mission Control" + }, + "error": { + "type": "object", + "description": "Error details for a failed session", + "properties": { + "message": { + "type": "string", + "description": "Error message" + } + } + } + } + }, + "description": "Sessions associated with this task" + } + } + } + ] + }, + "examples": { + "default": { + "value": { + "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": "github_resource", + "data": { + "id": 42, + "type": "pull_request" + } + } + ], + "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", + "event_content": "Fix the login button on the homepage", + "head_ref": "copilot/fix-1", + "base_ref": "main" + } + ] + } + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "403": { + "description": "Insufficient permissions", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } } }, - { - "name": "affects", - "in": "query", - "description": "If specified, only return advisories that affect any of `package` or `package@version`. A maximum of 1000 packages can be specified.\nIf the query parameter causes the URL to exceed the maximum URL length supported by your client, you must specify fewer packages.\n\nExample: `affects=package1,package2@1.0.0,package3@2.0.0` or `affects[]=package1&affects[]=package2@1.0.0`", - "schema": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "maxItems": 1000, - "items": { - "type": "string" + "422": { + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } } } - ] + } } - }, + } + } + } + }, + "/agents/tasks": { + "get": { + "summary": "List tasks", + "description": "Returns a list of tasks for the authenticated user", + "tags": [ + "agent-tasks" + ], + "operationId": "agent-tasks/list-tasks", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/agent-tasks/agent-tasks#list-tasks" + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "agent-tasks", + "subcategory": "agent-tasks" + }, + "parameters": [ { - "name": "published", + "name": "per_page", "in": "query", - "description": "If specified, only return advisories that were published on a date or date range.\n\nFor more information on the syntax of the date range, see \"[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates).\"", "schema": { - "type": "string" - } + "type": "integer", + "default": 30, + "minimum": 1, + "maximum": 100 + }, + "description": "The number of results per page (max 100)." }, { - "name": "updated", + "name": "page", "in": "query", - "description": "If specified, only return advisories that were updated on a date or date range.\n\nFor more information on the syntax of the date range, see \"[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates).\"", "schema": { - "type": "string" - } + "type": "integer", + "default": 1, + "minimum": 1 + }, + "description": "The page number of the results to fetch." }, { - "name": "modified", - "description": "If specified, only show advisories that were updated or published on a date or date range.\n\nFor more information on the syntax of the date range, see \"[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates).\"", + "name": "sort", "in": "query", "schema": { - "type": "string" - } + "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": "epss_percentage", + "name": "direction", "in": "query", - "description": "If specified, only return advisories that have an EPSS percentage score that matches the provided value.\nThe EPSS percentage represents the likelihood of a CVE being exploited.", "schema": { - "type": "string" - } + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ] + }, + "description": "The direction to sort results. Can be `asc` or `desc`." }, { - "name": "epss_percentile", + "name": "state", "in": "query", - "description": "If specified, only return advisories that have an EPSS percentile score that matches the provided value.\nThe EPSS percentile represents the relative rank of the CVE's likelihood of being exploited compared to other CVEs.", "schema": { "type": "string" - } - }, - { - "$ref": "#/components/parameters/pagination-before" - }, - { - "$ref": "#/components/parameters/pagination-after" - }, - { - "$ref": "#/components/parameters/direction" + }, + "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": "per_page", - "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "name": "is_archived", "in": "query", "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 30 - } + "type": "boolean" + }, + "description": "Filter by archived status. When `true`, returns only archived tasks. When `false`, returns only non-archived tasks." }, { - "name": "sort", - "description": "The property to sort the results by.", + "name": "since", "in": "query", - "required": false, "schema": { "type": "string", - "enum": [ - "updated", - "published", - "epss_percentage", - "epss_percentile" - ], - "default": "published" - } + "format": "date-time" + }, + "description": "Only show tasks updated at or after this time (ISO 8601 timestamp)" } ], "responses": { "200": { - "description": "Response", + "description": "Tasks retrieved successfully", + "headers": { + "Link": { + "description": "Pagination links. Contains rel=\"first\" (always),\nrel=\"next\" (when more pages exist), and rel=\"last\" (when on the final page).\n", + "schema": { + "type": "string" + }, + "example": "; rel=\"next\", ; rel=\"first\"" + } + }, "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/global-advisory" + "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": { + "description": "The entity who created this task", + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "The unique identifier of the user" + } + } + }, + "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": [ + "github_resource", + "branch" + ], + "description": "Discriminator for data shape" + }, + "data": { + "oneOf": [ + { + "type": "object", + "description": "A GitHub resource (pull request, issue, etc.)", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "GitHub resource ID" + }, + "type": { + "type": "string", + "description": "Resource type (e.g., pull_request, issue)" + }, + "global_id": { + "type": "string", + "description": "GraphQL global ID" + } + } + }, + { + "type": "object", + "description": "A Git branch reference", + "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", + "format": "date-time", + "nullable": true, + "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" + }, + "remote_steerable": { + "type": "boolean", + "description": "Whether the latest session in this task supports remote steering via Mission Control" + } + } + }, + "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" + } } }, "examples": { "default": { - "$ref": "#/components/examples/global-advisory-items" + "value": { + "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": "github_resource", + "data": { + "id": 42, + "type": "pull_request" + } + } + ], + "archived_at": null, + "created_at": "2025-01-01T00:00:00Z", + "updated_at": "2025-01-01T01:00:00Z" + } + ] + } } } } } }, - "429": { - "description": "Too many requests", + "400": { + "description": "Bad request", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/basic-error" + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "403": { + "description": "Insufficient permissions", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } } } } }, "422": { - "$ref": "#/components/responses/validation_failed_simple" + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } } - }, - "x-github": { - "githubCloudOnly": false, - "enabledForGitHubApps": true, - "category": "security-advisories", - "subcategory": "global-advisories" } } }, - "/advisories/{ghsa_id}": { + "/agents/tasks/{task_id}": { "get": { - "summary": "Get a global security advisory", - "description": "Gets a global security advisory using its GitHub Security Advisory (GHSA) identifier.", + "summary": "Get a task by ID", + "description": "Returns a task by ID with its associated sessions", "tags": [ - "security-advisories" + "agent-tasks" ], - "operationId": "security-advisories/get-global-advisory", + "operationId": "agent-tasks/get-task-by-id", "externalDocs": { "description": "API method documentation", - "url": "https://docs.github.com/rest/security-advisories/global-advisories#get-a-global-security-advisory" + "url": "https://docs.github.com/rest/agent-tasks/agent-tasks#get-a-task-by-id" + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "agent-tasks", + "subcategory": "agent-tasks" }, "parameters": [ { - "$ref": "#/components/parameters/ghsa_id" + "name": "task_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The unique identifier of the task." } ], "responses": { "200": { - "description": "Response", + "description": "Task retrieved successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/global-advisory" + "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": { + "description": "The entity who created this task", + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "The unique identifier of the user" + } + } + }, + "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": [ + "github_resource", + "branch" + ], + "description": "Discriminator for data shape" + }, + "data": { + "oneOf": [ + { + "type": "object", + "description": "A GitHub resource (pull request, issue, etc.)", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "GitHub resource ID" + }, + "type": { + "type": "string", + "description": "Resource type (e.g., pull_request, issue)" + }, + "global_id": { + "type": "string", + "description": "GraphQL global ID" + } + } + }, + { + "type": "object", + "description": "A Git branch reference", + "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", + "format": "date-time", + "nullable": true, + "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" + }, + "remote_steerable": { + "type": "boolean", + "description": "Whether the latest session in this task supports remote steering via Mission Control" + } + } + }, + { + "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" + } + } + }, + "agent_id": { + "type": "integer", + "format": "int64", + "description": "Agent ID" + }, + "agent_task_id": { + "type": "string", + "description": "Agent internal task ID" + }, + "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" + }, + "event_type": { + "type": "string", + "description": "Type of event that triggered this session" + }, + "event_url": { + "type": "string", + "description": "URL of the triggering event" + }, + "event_content": { + "type": "string", + "description": "Content of the triggering event" + }, + "event_identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Identifiers for tracking" + }, + "resource_type": { + "type": "string", + "description": "Type of resource associated with this session" + }, + "resource_id": { + "type": "integer", + "format": "int64", + "description": "Resource ID" + }, + "resource_number": { + "type": "integer", + "format": "int32", + "description": "Resource number (e.g., PR number)" + }, + "resource_global_id": { + "type": "string", + "description": "GraphQL global ID of the resource" + }, + "resource_state": { + "type": "string", + "description": "State of the associated resource" + }, + "head_ref": { + "type": "string", + "description": "Head branch name" + }, + "base_ref": { + "type": "string", + "description": "Base branch name" + }, + "workflow_run_id": { + "type": "integer", + "format": "int64", + "description": "GitHub Actions workflow run ID" + }, + "model": { + "type": "string", + "description": "Model used for this session" + }, + "premium_requests": { + "type": "number", + "format": "double", + "description": "Premium request count" + }, + "remote_steerable": { + "type": "boolean", + "description": "Whether this session supports remote steering via Mission Control" + }, + "error": { + "type": "object", + "description": "Error details for a failed session", + "properties": { + "message": { + "type": "string", + "description": "Error message" + } + } + } + } + }, + "description": "Sessions associated with this task" + } + } + } + ] }, "examples": { "default": { - "$ref": "#/components/examples/global-advisory" + "value": { + "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": "github_resource", + "data": { + "id": 42, + "type": "pull_request" + } + } + ], + "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", + "event_content": "Fix the login button on the homepage", + "head_ref": "copilot/fix-1", + "base_ref": "main" + } + ] + } + } + } + } + } + }, + "400": { + "description": "Problems parsing request", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "403": { + "description": "Insufficient permissions", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } } } } } }, "404": { - "$ref": "#/components/responses/not_found" + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "422": { + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } } - }, - "x-github": { - "githubCloudOnly": false, - "enabledForGitHubApps": true, - "category": "security-advisories", - "subcategory": "global-advisories" } } }, @@ -10505,7 +13794,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/oidc-custom-sub" + "title": "Actions OIDC Subject customization", + "description": "Actions OIDC Subject customization", + "type": "object", + "properties": { + "include_claim_keys": { + "description": "Array of unique strings. Each claim key can only contain alphanumeric characters and underscores.", + "type": "array", + "items": { + "type": "string" + } + } + } }, "examples": { "default": { @@ -14332,206 +17632,226 @@ } }, "403": { - "$ref": "#/components/responses/forbidden" - }, - "404": { - "$ref": "#/components/responses/not_found" - } - }, - "x-github": { - "githubCloudOnly": false, - "enabledForGitHubApps": true, - "category": "orgs", - "subcategory": "artifact-metadata" - } - } - }, - "/orgs/{org}/artifacts/metadata/deployment-record/cluster/{cluster}": { - "post": { - "summary": "Set cluster deployment records", - "description": "Set deployment records for a given cluster.\nIf proposed records in the 'deployments' field have identical 'cluster', 'logical_environment',\n'physical_environment', and 'deployment_name' values as existing records, the existing records will be updated.\nIf no existing records match, new records will be created.", - "tags": [ - "orgs" - ], - "operationId": "orgs/set-cluster-deployment-records", - "externalDocs": { - "description": "API method documentation", - "url": "https://docs.github.com/rest/orgs/artifact-metadata#set-cluster-deployment-records" - }, - "parameters": [ - { - "$ref": "#/components/parameters/org" - }, - { - "name": "cluster", - "in": "path", - "description": "The cluster name.", - "required": true, - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 128, - "pattern": "^[a-zA-Z0-9._-]+$" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "logical_environment": { - "type": "string", - "description": "The stage of the deployment.", - "minLength": 1, - "maxLength": 128 - }, - "physical_environment": { - "type": "string", - "description": "The physical region of the deployment.", - "maxLength": 128 - }, - "deployments": { - "type": "array", - "description": "The list of deployments to record.", - "maxItems": 1000, - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the artifact. Note that if multiple deployments have identical 'digest' parameter values,\nthe name parameter must also be identical across all entries.\n", - "minLength": 1, - "maxLength": 256 - }, - "digest": { - "type": "string", - "description": "The hex encoded digest of the artifact. Note that if multiple deployments have identical 'digest' parameter values,\nthe name and version parameters must also be identical across all entries.\n", - "minLength": 71, - "maxLength": 71, - "pattern": "^sha256:[a-f0-9]{64}$" - }, - "version": { - "type": "string", - "description": "The artifact version. Note that if multiple deployments have identical 'digest' parameter values,\nthe version parameter must also be identical across all entries.\n", - "maxLength": 100, - "x-multi-segment": true, - "example": "1.2.3" - }, - "status": { - "type": "string", - "description": "The deployment status of the artifact.", - "default": "deployed", - "enum": [ - "deployed", - "decommissioned" - ] - }, - "deployment_name": { - "type": "string", - "description": "The unique identifier for the deployment represented by the new record. To accommodate differing\ncontainers and namespaces within a record set, the following format is recommended:\n{namespaceName}-{deploymentName}-{containerName}.\nThe deployment_name must be unique across all entries in the deployments array.\n", - "minLength": 1, - "maxLength": 256 - }, - "github_repository": { - "type": "string", - "description": "The name of the GitHub repository associated with the artifact. This should be used\nwhen there are no provenance attestations available for the artifact. The repository\nmust belong to the organization specified in the path parameter.\n\nIf a provenance attestation is available for the artifact, the API will use\nthe repository information from the attestation instead of this parameter.", - "maxLength": 100, - "pattern": "^[A-Za-z0-9.\\-_]+$", - "example": "my-github-repo" - }, - "tags": { - "type": "object", - "description": "Key-value pairs to tag the deployment record.", - "additionalProperties": { - "type": "string" - } - }, - "runtime_risks": { - "type": "array", - "description": "A list of runtime risks associated with the deployment.", - "maxItems": 4, - "uniqueItems": true, - "items": { - "type": "string", - "enum": [ - "critical-resource", - "internet-exposed", - "lateral-movement", - "sensitive-data" - ] - } - } - }, - "required": [ - "name", - "deployment_name", - "digest" - ] - } - } - }, - "required": [ - "logical_environment", - "deployments" - ] - }, - "examples": { - "default": { - "value": { - "logical_environment": "prod", - "physical_environment": "pacific-east", - "deployments": [ - { - "name": "awesome-image", - "digest": "sha256:1bb1e949e55dcefc6353e7b36c8897d2a107d8e8dca49d4e3c0ea8493fc0bc72", - "version": "2.1.0", - "status": "deployed", - "deployment_name": "deployment-pod", - "tags": { - "runtime-risk": "sensitive-data" - } - } - ] - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Deployment records created or updated successfully.\n", + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "orgs", + "subcategory": "artifact-metadata" + } + } + }, + "/orgs/{org}/artifacts/metadata/deployment-record/cluster/{cluster}": { + "post": { + "summary": "Set cluster deployment records", + "description": "Set deployment records for a given cluster.\nIf proposed records in the 'deployments' field have identical 'cluster', 'logical_environment',\n'physical_environment', and 'deployment_name' values as existing records, the existing records will be updated.\nIf no existing records match, new records will be created.", + "tags": [ + "orgs" + ], + "operationId": "orgs/set-cluster-deployment-records", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/orgs/artifact-metadata#set-cluster-deployment-records" + }, + "parameters": [ + { + "$ref": "#/components/parameters/org" + }, + { + "name": "cluster", + "in": "path", + "description": "The cluster name.", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 128, + "pattern": "^[a-zA-Z0-9._-]+$" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "logical_environment": { + "type": "string", + "description": "The stage of the deployment.", + "minLength": 1, + "maxLength": 128 + }, + "physical_environment": { + "type": "string", + "description": "The physical region of the deployment.", + "maxLength": 128 + }, + "deployments": { + "type": "array", + "description": "The list of deployments to record.", + "maxItems": 1000, + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the artifact. Note that if multiple deployments have identical 'digest' parameter values,\nthe name parameter must also be identical across all entries.\n", + "minLength": 1, + "maxLength": 256 + }, + "digest": { + "type": "string", + "description": "The hex encoded digest of the artifact. Note that if multiple deployments have identical 'digest' parameter values,\nthe name and version parameters must also be identical across all entries.\n", + "minLength": 71, + "maxLength": 71, + "pattern": "^sha256:[a-f0-9]{64}$" + }, + "version": { + "type": "string", + "description": "The artifact version. Note that if multiple deployments have identical 'digest' parameter values,\nthe version parameter must also be identical across all entries.\n", + "maxLength": 100, + "x-multi-segment": true, + "example": "1.2.3" + }, + "status": { + "type": "string", + "description": "The deployment status of the artifact.", + "default": "deployed", + "enum": [ + "deployed", + "decommissioned" + ] + }, + "deployment_name": { + "type": "string", + "description": "The unique identifier for the deployment represented by the new record. To accommodate differing\ncontainers and namespaces within a record set, the following format is recommended:\n{namespaceName}-{deploymentName}-{containerName}.\nThe deployment_name must be unique across all entries in the deployments array.\n", + "minLength": 1, + "maxLength": 256 + }, + "github_repository": { + "type": "string", + "description": "The name of the GitHub repository associated with the artifact. This should be used\nwhen there are no provenance attestations available for the artifact. The repository\nmust belong to the organization specified in the path parameter.\n\nIf a provenance attestation is available for the artifact, the API will use\nthe repository information from the attestation instead of this parameter.", + "maxLength": 100, + "pattern": "^[A-Za-z0-9.\\-_]+$", + "example": "my-github-repo" + }, + "tags": { + "type": "object", + "description": "Key-value pairs to tag the deployment record.", + "additionalProperties": { + "type": "string" + } + }, + "runtime_risks": { + "type": "array", + "description": "A list of runtime risks associated with the deployment.", + "maxItems": 4, + "uniqueItems": true, + "items": { + "type": "string", + "enum": [ + "critical-resource", + "internet-exposed", + "lateral-movement", + "sensitive-data" + ] + } + } + }, + "required": [ + "name", + "deployment_name", + "digest" + ] + } + } + }, + "required": [ + "logical_environment", + "deployments" + ] + }, + "examples": { + "default": { + "value": { + "logical_environment": "prod", + "physical_environment": "pacific-east", + "deployments": [ + { + "name": "awesome-image", + "digest": "sha256:1bb1e949e55dcefc6353e7b36c8897d2a107d8e8dca49d4e3c0ea8493fc0bc72", + "version": "2.1.0", + "status": "deployed", + "deployment_name": "deployment-pod", + "tags": { + "runtime-risk": "sensitive-data" + } + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Deployment records created or updated successfully.\n", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total_count": { + "description": "The number of deployment records created", + "type": "integer" + }, + "deployment_records": { + "type": "array", + "items": { + "$ref": "#/components/schemas/artifact-deployment-record" + } + } + } + }, + "examples": { + "default": { + "$ref": "#/components/examples/artifact-deployment-record-list" + } + } + } + } + }, + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "total_count": { - "description": "The number of deployment records created", - "type": "integer" - }, - "deployment_records": { - "type": "array", - "items": { - "$ref": "#/components/schemas/artifact-deployment-record" - } - } - } + "$ref": "#/components/schemas/basic-error" }, "examples": { - "default": { - "$ref": "#/components/examples/artifact-deployment-record-list" + "insufficient_repo_permissions": { + "value": { + "message": { + "cause": "artifact metadata write permission required on one or more repositories", + "repositories": [ + 123, + 345 + ] + } + } } } } } }, - "403": { - "$ref": "#/components/responses/forbidden" - }, "404": { "$ref": "#/components/responses/not_found" } @@ -23923,7 +27243,7 @@ "/orgs/{org}/organization-roles": { "get": { "summary": "Get all organization roles for an organization", - "description": "Lists the organization roles available in this organization. For more information on organization roles, see \"[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles).\"\n\nTo use this endpoint, the authenticated user must be one of:\n\n- An administrator for the organization.\n- A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization.\n\nOAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.", + "description": "Lists the organization roles available in this organization. For more information on organization roles, see \"[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles).\"\n\nTo use this endpoint, the authenticated user must be one of:\n\n- An administrator for the organization.\n- An organization member (or a member of a team) assigned a custom organization role that includes the **View organization roles** (`read_organization_custom_org_role`) permission. For more information, see \"[Permissions for organization access](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/permissions-of-custom-organization-roles#permissions-for-organization-access).\"\n\nOAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.", "tags": [ "orgs" ], @@ -24202,7 +27522,7 @@ "/orgs/{org}/organization-roles/{role_id}": { "get": { "summary": "Get an organization role", - "description": "Gets an organization role that is available to this organization. For more information on organization roles, see \"[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles).\"\n\nTo use this endpoint, the authenticated user must be one of:\n\n- An administrator for the organization.\n- A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization.\n\nOAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.", + "description": "Gets an organization role that is available to this organization. For more information on organization roles, see \"[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles).\"\n\nTo use this endpoint, the authenticated user must be one of:\n\n- An administrator for the organization.\n- An organization member (or a member of a team) assigned a custom organization role that includes the **View organization roles** (`read_organization_custom_org_role`) permission. For more information, see \"[Permissions for organization access](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/permissions-of-custom-organization-roles#permissions-for-organization-access).\"\n\nOAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.", "tags": [ "orgs" ], @@ -30304,6 +33624,19 @@ "items": { "type": "string" } + }, + "failover_network_settings_ids": { + "type": "array", + "minItems": 0, + "maxItems": 1, + "description": "A list of identifiers of the failover network settings resources to use for the network configuration. Exactly one resource identifier must be specified in the list.", + "items": { + "type": "string" + } + }, + "failover_network_enabled": { + "type": "boolean", + "description": "Indicates whether the failover network resource is enabled." } }, "required": [ @@ -30445,6 +33778,19 @@ "items": { "type": "string" } + }, + "failover_network_settings_ids": { + "type": "array", + "minItems": 0, + "maxItems": 1, + "description": "A list of identifiers of the failover network settings resources to use for the network configuration. Exactly one resource identifier must be specified in the list.", + "items": { + "type": "string" + } + }, + "failover_network_enabled": { + "type": "boolean", + "description": "Indicates whether the failover network resource is enabled." } } }, @@ -107134,7 +110480,8 @@ "enum": [ "unknown", "direct", - "transitive" + "transitive", + "inconclusive" ] } } @@ -122010,6 +125357,12 @@ "commit_url": { "type": "string", "description": "The API URL to get the associated commit resource" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL to get the associated commit resource.", + "example": "https://github.com/octocat/Hello-World/blob/af5626b/example/secrets.txt#L1-L1" } }, "required": [ @@ -122091,6 +125444,12 @@ "format": "uri", "description": "The API URL to get the issue where the secret was detected.", "example": "https://api.github.com/repos/octocat/Hello-World/issues/1347" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL for the issue where the secret was detected.", + "example": "https://github.com/octocat/Hello-World/issues/1" } }, "required": [ @@ -122106,6 +125465,12 @@ "format": "uri", "description": "The API URL to get the issue where the secret was detected.", "example": "https://api.github.com/repos/octocat/Hello-World/issues/1347" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL for the issue where the secret was detected.", + "example": "https://github.com/octocat/Hello-World/issues/1" } }, "required": [ @@ -122121,6 +125486,12 @@ "format": "uri", "description": "The API URL to get the issue comment where the secret was detected.", "example": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL for the issue comment where the secret was detected.", + "example": "https://github.com/octocat/Hello-World/issues/1#issuecomment-1081119451" } }, "required": [ @@ -122181,6 +125552,12 @@ "format": "uri", "description": "The API URL to get the pull request where the secret was detected.", "example": "https://api.github.com/repos/octocat/Hello-World/pulls/2846" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL for the pull request where the secret was detected.", + "example": "https://github.com/octocat/Hello-World/pull/2846" } }, "required": [ @@ -122196,6 +125573,12 @@ "format": "uri", "description": "The API URL to get the pull request where the secret was detected.", "example": "https://api.github.com/repos/octocat/Hello-World/pulls/2846" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL for the pull request where the secret was detected.", + "example": "https://github.com/octocat/Hello-World/pull/2846" } }, "required": [ @@ -122211,6 +125594,12 @@ "format": "uri", "description": "The API URL to get the pull request comment where the secret was detected.", "example": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL for the pull request comment where the secret was detected.", + "example": "https://github.com/octocat/Hello-World/pull/2846#issuecomment-1081119451" } }, "required": [ @@ -122226,6 +125615,12 @@ "format": "uri", "description": "The API URL to get the pull request review where the secret was detected.", "example": "https://api.github.com/repos/octocat/Hello-World/pulls/2846/reviews/80" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL for the pull request review where the secret was detected.", + "example": "https://github.com/octocat/Hello-World/pull/2846#pullrequestreview-80" } }, "required": [ @@ -122241,6 +125636,12 @@ "format": "uri", "description": "The API URL to get the pull request review comment where the secret was detected.", "example": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/12" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL for the pull request review comment where the secret was detected.", + "example": "https://github.com/octocat/Hello-World/pull/2846#discussion_r12" } }, "required": [ @@ -130286,7 +133687,8 @@ "enum": [ "unknown", "direct", - "transitive" + "transitive", + "inconclusive" ] } } @@ -284395,12 +287797,10 @@ "name": "Uncontrolled Resource Consumption" } ], - "epss": [ - { - "percentage": 0.00045, - "percentile": "0.16001e0" - } - ], + "epss": { + "percentage": 0.00045, + "percentile": "0.16001e0" + }, "credits": [ { "user": { @@ -287550,12 +290950,10 @@ "score": 8.7 } }, - "epss": [ - { - "percentage": 0.00045, - "percentile": "0.16001e0" - } - ], + "epss": { + "percentage": 0.00045, + "percentile": "0.16001e0" + }, "cwes": [ { "cwe_id": "CWE-200", @@ -304273,12 +307671,10 @@ "score": 8.7 } }, - "epss": [ - { - "percentage": 0.00045, - "percentile": "0.16001e0" - } - ], + "epss": { + "percentage": 0.00045, + "percentile": "0.16001e0" + }, "cwes": [ { "cwe_id": "CWE-200", @@ -304566,12 +307962,10 @@ "score": 8.5 } }, - "epss": [ - { - "percentage": 0.00045, - "percentile": "0.16001e0" - } - ], + "epss": { + "percentage": 0.00045, + "percentile": "0.16001e0" + }, "cwes": [ { "cwe_id": "CWE-532", diff --git a/descriptions/api.github.com/api.github.com.2022-11-28.yaml b/descriptions/api.github.com/api.github.com.2022-11-28.yaml index 6c892c6261..966a3269eb 100644 --- a/descriptions/api.github.com/api.github.com.2022-11-28.yaml +++ b/descriptions/api.github.com/api.github.com.2022-11-28.yaml @@ -103,6 +103,8 @@ tags: description: Endpoints to manage campaigns via the REST API. - name: projects description: Endpoints to manage Projects using the REST API. +- name: agent-tasks + description: Endpoints to manage and interact with agent tasks. servers: - url: https://api.github.com externalDocs: @@ -336,6 +338,2534 @@ paths: enabledForGitHubApps: true category: security-advisories subcategory: global-advisories + "/agents/repos/{owner}/{repo}/tasks": + get: + summary: List tasks for repository + description: Returns a list of tasks for a specific repository + tags: + - agent-tasks + operationId: agent-tasks/list-tasks-for-repo + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/agent-tasks/agent-tasks#list-tasks-for-repository + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + 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 + description: Filter by archived status. When `true`, returns only archived + tasks. When `false`, returns only non-archived tasks. + - 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 + responses: + '200': + description: Tasks retrieved successfully + headers: + Link: + description: | + Pagination links. Contains rel="first" (always), + rel="prev" (when current page > 1), + rel="next" (when more pages exist), and rel="last" (when on the final page). + schema: + type: string + example: ; + rel="next", ; + rel="first" + content: + application/json: + 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: + description: The entity who created this task + type: object + properties: + id: + type: integer + format: int64 + description: The unique identifier of the user + 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: + - github_resource + - branch + description: Discriminator for data shape + data: + oneOf: + - type: object + description: A GitHub resource (pull request, issue, + etc.) + properties: + id: + type: integer + format: int64 + description: GitHub resource ID + type: + type: string + description: Resource type (e.g., pull_request, + issue) + global_id: + type: string + description: GraphQL global ID + - type: object + description: A Git branch reference + 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 + format: date-time + nullable: true + 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 + remote_steerable: + type: boolean + description: Whether the latest session in this task supports + remote steering via Mission Control + 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 + examples: + default: + value: + 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: github_resource + data: + id: 42 + type: pull_request + archived_at: + created_at: '2025-01-01T00:00:00Z' + updated_at: '2025-01-01T01:00:00Z' + '400': + description: Bad request + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '401': + description: Authentication required + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '403': + description: Insufficient permissions + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '404': + description: Resource not found + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '422': + description: Validation Failed + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + post: + summary: Create a task + description: Creates a new task for a repository + tags: + - agent-tasks + operationId: agent-tasks/create-task + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/agent-tasks/agent-tasks#create-a-task + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + 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. + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - event_content + properties: + agent_id: + type: integer + format: int64 + description: Agent ID (optional, defaults to coding agent) + problem_statement: + type: string + description: Additional prompting for the agent + event_content: + type: string + description: User's written prompt + model: + type: string + description: Model identifier + custom_agent: + type: string + description: Custom agent identifier + create_pull_request: + type: boolean + description: Whether to create a PR + base_ref: + type: string + description: Base ref for new branch/PR + event_type: + type: string + description: Type of event + event_url: + type: string + description: URL of the triggering event + event_identifiers: + type: array + items: + type: string + description: Identifiers for tracking + examples: + default: + value: + event_content: Fix the login button on the homepage + create_pull_request: true + base_ref: main + responses: + '201': + description: Task created successfully + content: + application/json: + 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: + description: The entity who created this task + type: object + properties: + id: + type: integer + format: int64 + description: The unique identifier of the user + 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: + - github_resource + - branch + description: Discriminator for data shape + data: + oneOf: + - type: object + description: A GitHub resource (pull request, issue, etc.) + properties: + id: + type: integer + format: int64 + description: GitHub resource ID + type: + type: string + description: Resource type (e.g., pull_request, issue) + global_id: + type: string + description: GraphQL global ID + - type: object + description: A Git branch reference + 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 + format: date-time + nullable: true + 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 + remote_steerable: + type: boolean + description: Whether the latest session in this task supports + remote steering via Mission Control + examples: + default: + value: + 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: + created_at: '2025-01-01T00:00:00Z' + updated_at: '2025-01-01T00:00:00Z' + '400': + description: Problems parsing JSON + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '401': + description: Authentication required + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '403': + description: Insufficient permissions + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '422': + description: Validation Failed + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + "/agents/repos/{owner}/{repo}/tasks/{task_id}": + get: + summary: Get a task by repo + description: Returns a task by ID scoped to an owner/repo path + tags: + - agent-tasks + operationId: agent-tasks/get-task-by-repo-and-id + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/agent-tasks/agent-tasks#get-a-task-by-repo + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + 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. + responses: + '200': + description: Task retrieved successfully + content: + application/json: + 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: + description: The entity who created this task + type: object + properties: + id: + type: integer + format: int64 + description: The unique identifier of the user + 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: + - github_resource + - branch + description: Discriminator for data shape + data: + oneOf: + - type: object + description: A GitHub resource (pull request, issue, + etc.) + properties: + id: + type: integer + format: int64 + description: GitHub resource ID + type: + type: string + description: Resource type (e.g., pull_request, + issue) + global_id: + type: string + description: GraphQL global ID + - type: object + description: A Git branch reference + 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 + format: date-time + nullable: true + 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 + remote_steerable: + type: boolean + description: Whether the latest session in this task supports + remote steering via Mission Control + - 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 + agent_id: + type: integer + format: int64 + description: Agent ID + agent_task_id: + type: string + description: Agent internal task ID + 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 + event_type: + type: string + description: Type of event that triggered this session + event_url: + type: string + description: URL of the triggering event + event_content: + type: string + description: Content of the triggering event + event_identifiers: + type: array + items: + type: string + description: Identifiers for tracking + resource_type: + type: string + description: Type of resource associated with this session + resource_id: + type: integer + format: int64 + description: Resource ID + resource_number: + type: integer + format: int32 + description: Resource number (e.g., PR number) + resource_global_id: + type: string + description: GraphQL global ID of the resource + resource_state: + type: string + description: State of the associated resource + head_ref: + type: string + description: Head branch name + base_ref: + type: string + description: Base branch name + workflow_run_id: + type: integer + format: int64 + description: GitHub Actions workflow run ID + model: + type: string + description: Model used for this session + premium_requests: + type: number + format: double + description: Premium request count + remote_steerable: + type: boolean + description: Whether this session supports remote steering + via Mission Control + error: + type: object + description: Error details for a failed session + properties: + message: + type: string + description: Error message + description: Sessions associated with this task + examples: + default: + value: + 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: github_resource + data: + id: 42 + type: pull_request + archived_at: + 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' + event_content: Fix the login button on the homepage + head_ref: copilot/fix-1 + base_ref: main + '400': + description: Bad request + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '401': + description: Authentication required + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '403': + description: Insufficient permissions + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '404': + description: Resource not found + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '422': + description: Validation Failed + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + "/agents/tasks": + get: + summary: List tasks + description: Returns a list of tasks for the authenticated user + tags: + - agent-tasks + operationId: agent-tasks/list-tasks + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/agent-tasks/agent-tasks#list-tasks + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + 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 + description: Filter by archived status. When `true`, returns only archived + tasks. When `false`, returns only non-archived tasks. + - name: since + in: query + schema: + type: string + format: date-time + description: Only show tasks updated at or after this time (ISO 8601 timestamp) + responses: + '200': + description: Tasks retrieved successfully + headers: + Link: + description: | + Pagination links. Contains rel="first" (always), + rel="next" (when more pages exist), and rel="last" (when on the final page). + schema: + type: string + example: ; rel="next", + ; rel="first" + content: + application/json: + 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: + description: The entity who created this task + type: object + properties: + id: + type: integer + format: int64 + description: The unique identifier of the user + 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: + - github_resource + - branch + description: Discriminator for data shape + data: + oneOf: + - type: object + description: A GitHub resource (pull request, issue, + etc.) + properties: + id: + type: integer + format: int64 + description: GitHub resource ID + type: + type: string + description: Resource type (e.g., pull_request, + issue) + global_id: + type: string + description: GraphQL global ID + - type: object + description: A Git branch reference + 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 + format: date-time + nullable: true + 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 + remote_steerable: + type: boolean + description: Whether the latest session in this task supports + remote steering via Mission Control + 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 + examples: + default: + value: + 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: github_resource + data: + id: 42 + type: pull_request + archived_at: + created_at: '2025-01-01T00:00:00Z' + updated_at: '2025-01-01T01:00:00Z' + '400': + description: Bad request + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '401': + description: Authentication required + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '403': + description: Insufficient permissions + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '422': + description: Validation Failed + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + "/agents/tasks/{task_id}": + get: + summary: Get a task by ID + description: Returns a task by ID with its associated sessions + tags: + - agent-tasks + operationId: agent-tasks/get-task-by-id + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/agent-tasks/agent-tasks#get-a-task-by-id + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: agent-tasks + subcategory: agent-tasks + parameters: + - name: task_id + in: path + required: true + schema: + type: string + description: The unique identifier of the task. + responses: + '200': + description: Task retrieved successfully + content: + application/json: + 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: + description: The entity who created this task + type: object + properties: + id: + type: integer + format: int64 + description: The unique identifier of the user + 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: + - github_resource + - branch + description: Discriminator for data shape + data: + oneOf: + - type: object + description: A GitHub resource (pull request, issue, + etc.) + properties: + id: + type: integer + format: int64 + description: GitHub resource ID + type: + type: string + description: Resource type (e.g., pull_request, + issue) + global_id: + type: string + description: GraphQL global ID + - type: object + description: A Git branch reference + 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 + format: date-time + nullable: true + 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 + remote_steerable: + type: boolean + description: Whether the latest session in this task supports + remote steering via Mission Control + - 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 + agent_id: + type: integer + format: int64 + description: Agent ID + agent_task_id: + type: string + description: Agent internal task ID + 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 + event_type: + type: string + description: Type of event that triggered this session + event_url: + type: string + description: URL of the triggering event + event_content: + type: string + description: Content of the triggering event + event_identifiers: + type: array + items: + type: string + description: Identifiers for tracking + resource_type: + type: string + description: Type of resource associated with this session + resource_id: + type: integer + format: int64 + description: Resource ID + resource_number: + type: integer + format: int32 + description: Resource number (e.g., PR number) + resource_global_id: + type: string + description: GraphQL global ID of the resource + resource_state: + type: string + description: State of the associated resource + head_ref: + type: string + description: Head branch name + base_ref: + type: string + description: Base branch name + workflow_run_id: + type: integer + format: int64 + description: GitHub Actions workflow run ID + model: + type: string + description: Model used for this session + premium_requests: + type: number + format: double + description: Premium request count + remote_steerable: + type: boolean + description: Whether this session supports remote steering + via Mission Control + error: + type: object + description: Error details for a failed session + properties: + message: + type: string + description: Error message + description: Sessions associated with this task + examples: + default: + value: + 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: github_resource + data: + id: 42 + type: pull_request + archived_at: + 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' + event_content: Fix the login button on the homepage + head_ref: copilot/fix-1 + base_ref: main + '400': + description: Problems parsing request + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '401': + description: Authentication required + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '403': + description: Insufficient permissions + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '404': + description: Resource not found + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '422': + description: Validation Failed + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation "/app": get: summary: Get the authenticated app @@ -7524,7 +10054,16 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/oidc-custom-sub" + title: Actions OIDC Subject customization + description: Actions OIDC Subject customization + type: object + properties: + include_claim_keys: + description: Array of unique strings. Each claim key can only contain + alphanumeric characters and underscores. + type: array + items: + type: string examples: default: "$ref": "#/components/examples/oidc-custom-sub" @@ -10524,7 +13063,20 @@ paths: default: "$ref": "#/components/examples/artifact-deployment-record-list" '403': - "$ref": "#/components/responses/forbidden" + description: Forbidden + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + examples: + insufficient_repo_permissions: + value: + message: + cause: artifact metadata write permission required on one or + more repositories + repositories: + - 123 + - 345 '404': "$ref": "#/components/responses/not_found" x-github: @@ -17418,7 +19970,7 @@ paths: To use this endpoint, the authenticated user must be one of: - An administrator for the organization. - - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization. + - An organization member (or a member of a team) assigned a custom organization role that includes the **View organization roles** (`read_organization_custom_org_role`) permission. For more information, see "[Permissions for organization access](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/permissions-of-custom-organization-roles#permissions-for-organization-access)." OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: @@ -17636,7 +20188,7 @@ paths: To use this endpoint, the authenticated user must be one of: - An administrator for the organization. - - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization. + - An organization member (or a member of a team) assigned a custom organization role that includes the **View organization roles** (`read_organization_custom_org_role`) permission. For more information, see "[Permissions for organization access](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/permissions-of-custom-organization-roles#permissions-for-organization-access)." OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: @@ -21990,6 +24542,19 @@ paths: must be specified in the list. items: type: string + failover_network_settings_ids: + type: array + minItems: 0 + maxItems: 1 + description: A list of identifiers of the failover network settings + resources to use for the network configuration. Exactly one resource + identifier must be specified in the list. + items: + type: string + failover_network_enabled: + type: boolean + description: Indicates whether the failover network resource is + enabled. required: - name - network_settings_ids @@ -22091,6 +24656,19 @@ paths: must be specified in the list. items: type: string + failover_network_settings_ids: + type: array + minItems: 0 + maxItems: 1 + description: A list of identifiers of the failover network settings + resources to use for the network configuration. Exactly one resource + identifier must be specified in the list. + items: + type: string + failover_network_enabled: + type: boolean + description: Indicates whether the failover network resource is + enabled. examples: default: value: @@ -77813,6 +80391,7 @@ components: - unknown - direct - transitive + - inconclusive security_advisory: "$ref": "#/components/schemas/dependabot-alert-security-advisory" security_vulnerability: @@ -89514,6 +92093,11 @@ components: commit_url: type: string description: The API URL to get the associated commit resource + html_url: + type: string + format: uri + description: The GitHub URL to get the associated commit resource. + example: https://github.com/octocat/Hello-World/blob/af5626b/example/secrets.txt#L1-L1 required: - path - start_line @@ -89584,6 +92168,11 @@ components: format: uri description: The API URL to get the issue where the secret was detected. example: https://api.github.com/repos/octocat/Hello-World/issues/1347 + html_url: + type: string + format: uri + description: The GitHub URL for the issue where the secret was detected. + example: https://github.com/octocat/Hello-World/issues/1 required: - issue_title_url secret-scanning-location-issue-body: @@ -89596,6 +92185,11 @@ components: format: uri description: The API URL to get the issue where the secret was detected. example: https://api.github.com/repos/octocat/Hello-World/issues/1347 + html_url: + type: string + format: uri + description: The GitHub URL for the issue where the secret was detected. + example: https://github.com/octocat/Hello-World/issues/1 required: - issue_body_url secret-scanning-location-issue-comment: @@ -89608,6 +92202,11 @@ components: format: uri description: The API URL to get the issue comment where the secret was detected. example: https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451 + html_url: + type: string + format: uri + description: The GitHub URL for the issue comment where the secret was detected. + example: https://github.com/octocat/Hello-World/issues/1#issuecomment-1081119451 required: - issue_comment_url secret-scanning-location-discussion-title: @@ -89658,6 +92257,11 @@ components: format: uri description: The API URL to get the pull request where the secret was detected. example: https://api.github.com/repos/octocat/Hello-World/pulls/2846 + html_url: + type: string + format: uri + description: The GitHub URL for the pull request where the secret was detected. + example: https://github.com/octocat/Hello-World/pull/2846 required: - pull_request_title_url secret-scanning-location-pull-request-body: @@ -89671,6 +92275,11 @@ components: format: uri description: The API URL to get the pull request where the secret was detected. example: https://api.github.com/repos/octocat/Hello-World/pulls/2846 + html_url: + type: string + format: uri + description: The GitHub URL for the pull request where the secret was detected. + example: https://github.com/octocat/Hello-World/pull/2846 required: - pull_request_body_url secret-scanning-location-pull-request-comment: @@ -89685,6 +92294,12 @@ components: description: The API URL to get the pull request comment where the secret was detected. example: https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451 + html_url: + type: string + format: uri + description: The GitHub URL for the pull request comment where the secret + was detected. + example: https://github.com/octocat/Hello-World/pull/2846#issuecomment-1081119451 required: - pull_request_comment_url secret-scanning-location-pull-request-review: @@ -89699,6 +92314,12 @@ components: description: The API URL to get the pull request review where the secret was detected. example: https://api.github.com/repos/octocat/Hello-World/pulls/2846/reviews/80 + html_url: + type: string + format: uri + description: The GitHub URL for the pull request review where the secret + was detected. + example: https://github.com/octocat/Hello-World/pull/2846#pullrequestreview-80 required: - pull_request_review_url secret-scanning-location-pull-request-review-comment: @@ -89713,6 +92334,12 @@ components: description: The API URL to get the pull request review comment where the secret was detected. example: https://api.github.com/repos/octocat/Hello-World/pulls/comments/12 + html_url: + type: string + format: uri + description: The GitHub URL for the pull request review comment where the + secret was detected. + example: https://github.com/octocat/Hello-World/pull/2846#discussion_r12 required: - pull_request_review_comment_url nullable-secret-scanning-first-detected-location: @@ -95954,6 +98581,7 @@ components: - unknown - direct - transitive + - inconclusive security_advisory: "$ref": "#/components/schemas/dependabot-alert-security-advisory" security_vulnerability: @@ -212089,7 +214717,7 @@ components: - cwe_id: CWE-400 name: Uncontrolled Resource Consumption epss: - - percentage: 0.00045 + percentage: 0.00045 percentile: 0.16001e0 credits: - user: @@ -215119,7 +217747,7 @@ components: vector_string: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N score: 8.7 epss: - - percentage: 0.00045 + percentage: 0.00045 percentile: 0.16001e0 cwes: - cwe_id: CWE-200 @@ -229395,7 +232023,7 @@ components: vector_string: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N score: 8.7 epss: - - percentage: 0.00045 + percentage: 0.00045 percentile: 0.16001e0 cwes: - cwe_id: CWE-200 @@ -229604,7 +232232,7 @@ components: vector_string: CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N score: 8.5 epss: - - percentage: 0.00045 + percentage: 0.00045 percentile: 0.16001e0 cwes: - cwe_id: CWE-532 diff --git a/descriptions/api.github.com/api.github.com.2026-03-10.json b/descriptions/api.github.com/api.github.com.2026-03-10.json index 3a13e16173..12a1ad22b2 100644 --- a/descriptions/api.github.com/api.github.com.2026-03-10.json +++ b/descriptions/api.github.com/api.github.com.2026-03-10.json @@ -195,6 +195,10 @@ { "name": "projects", "description": "Endpoints to manage Projects using the REST API." + }, + { + "name": "agent-tasks", + "description": "Endpoints to manage and interact with agent tasks." } ], "servers": [ @@ -251,270 +255,3555 @@ "tags": [ "security-advisories" ], - "operationId": "security-advisories/list-global-advisories", + "operationId": "security-advisories/list-global-advisories", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/security-advisories/global-advisories#list-global-security-advisories" + }, + "parameters": [ + { + "name": "ghsa_id", + "in": "query", + "description": "If specified, only advisories with this GHSA (GitHub Security Advisory) identifier will be returned.", + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "description": "If specified, only advisories of this type will be returned. By default, a request with no other parameters defined will only return reviewed advisories that are not malware.", + "schema": { + "type": "string", + "enum": [ + "reviewed", + "malware", + "unreviewed" + ], + "default": "reviewed" + } + }, + { + "name": "cve_id", + "description": "If specified, only advisories with this CVE (Common Vulnerabilities and Exposures) identifier will be returned.", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "ecosystem", + "in": "query", + "description": "If specified, only advisories for these ecosystems will be returned.", + "schema": { + "$ref": "#/components/schemas/security-advisory-ecosystems" + } + }, + { + "name": "severity", + "in": "query", + "description": "If specified, only advisories with these severities will be returned.", + "schema": { + "type": "string", + "enum": [ + "unknown", + "low", + "medium", + "high", + "critical" + ] + } + }, + { + "name": "cwes", + "in": "query", + "description": "If specified, only advisories with these Common Weakness Enumerations (CWEs) will be returned.\n\nExample: `cwes=79,284,22` or `cwes[]=79&cwes[]=284&cwes[]=22`", + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + }, + { + "name": "is_withdrawn", + "in": "query", + "description": "Whether to only return advisories that have been withdrawn.", + "schema": { + "type": "boolean" + } + }, + { + "name": "affects", + "in": "query", + "description": "If specified, only return advisories that affect any of `package` or `package@version`. A maximum of 1000 packages can be specified.\nIf the query parameter causes the URL to exceed the maximum URL length supported by your client, you must specify fewer packages.\n\nExample: `affects=package1,package2@1.0.0,package3@2.0.0` or `affects[]=package1&affects[]=package2@1.0.0`", + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "maxItems": 1000, + "items": { + "type": "string" + } + } + ] + } + }, + { + "name": "published", + "in": "query", + "description": "If specified, only return advisories that were published on a date or date range.\n\nFor more information on the syntax of the date range, see \"[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates).\"", + "schema": { + "type": "string" + } + }, + { + "name": "updated", + "in": "query", + "description": "If specified, only return advisories that were updated on a date or date range.\n\nFor more information on the syntax of the date range, see \"[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates).\"", + "schema": { + "type": "string" + } + }, + { + "name": "modified", + "description": "If specified, only show advisories that were updated or published on a date or date range.\n\nFor more information on the syntax of the date range, see \"[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates).\"", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "epss_percentage", + "in": "query", + "description": "If specified, only return advisories that have an EPSS percentage score that matches the provided value.\nThe EPSS percentage represents the likelihood of a CVE being exploited.", + "schema": { + "type": "string" + } + }, + { + "name": "epss_percentile", + "in": "query", + "description": "If specified, only return advisories that have an EPSS percentile score that matches the provided value.\nThe EPSS percentile represents the relative rank of the CVE's likelihood of being exploited compared to other CVEs.", + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/pagination-before" + }, + { + "$ref": "#/components/parameters/pagination-after" + }, + { + "$ref": "#/components/parameters/direction" + }, + { + "name": "per_page", + "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 30 + } + }, + { + "name": "sort", + "description": "The property to sort the results by.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "updated", + "published", + "epss_percentage", + "epss_percentile" + ], + "default": "published" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/global-advisory" + } + }, + "examples": { + "default": { + "$ref": "#/components/examples/global-advisory-items" + } + } + } + } + }, + "429": { + "description": "Too many requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/basic-error" + } + } + } + }, + "422": { + "$ref": "#/components/responses/validation_failed_simple" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "security-advisories", + "subcategory": "global-advisories" + } + } + }, + "/advisories/{ghsa_id}": { + "get": { + "summary": "Get a global security advisory", + "description": "Gets a global security advisory using its GitHub Security Advisory (GHSA) identifier.", + "tags": [ + "security-advisories" + ], + "operationId": "security-advisories/get-global-advisory", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/security-advisories/global-advisories#get-a-global-security-advisory" + }, + "parameters": [ + { + "$ref": "#/components/parameters/ghsa_id" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/global-advisory" + }, + "examples": { + "default": { + "$ref": "#/components/examples/global-advisory" + } + } + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "security-advisories", + "subcategory": "global-advisories" + } + } + }, + "/agents/repos/{owner}/{repo}/tasks": { + "get": { + "summary": "List tasks for repository", + "description": "Returns a list of tasks for a specific repository", + "tags": [ + "agent-tasks" + ], + "operationId": "agent-tasks/list-tasks-for-repo", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/agent-tasks/agent-tasks#list-tasks-for-repository" + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "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" + }, + "description": "Filter by archived status. When `true`, returns only archived tasks. When `false`, returns only non-archived tasks." + }, + { + "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" + } + ], + "responses": { + "200": { + "description": "Tasks retrieved successfully", + "headers": { + "Link": { + "description": "Pagination links. Contains rel=\"first\" (always),\nrel=\"prev\" (when current page > 1),\nrel=\"next\" (when more pages exist), and rel=\"last\" (when on the final page).\n", + "schema": { + "type": "string" + }, + "example": "; rel=\"next\", ; rel=\"first\"" + } + }, + "content": { + "application/json": { + "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": { + "description": "The entity who created this task", + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "The unique identifier of the user" + } + } + }, + "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": [ + "github_resource", + "branch" + ], + "description": "Discriminator for data shape" + }, + "data": { + "oneOf": [ + { + "type": "object", + "description": "A GitHub resource (pull request, issue, etc.)", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "GitHub resource ID" + }, + "type": { + "type": "string", + "description": "Resource type (e.g., pull_request, issue)" + }, + "global_id": { + "type": "string", + "description": "GraphQL global ID" + } + } + }, + { + "type": "object", + "description": "A Git branch reference", + "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", + "format": "date-time", + "nullable": true, + "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" + }, + "remote_steerable": { + "type": "boolean", + "description": "Whether the latest session in this task supports remote steering via Mission Control" + } + } + }, + "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" + } + } + }, + "examples": { + "default": { + "value": { + "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": "github_resource", + "data": { + "id": 42, + "type": "pull_request" + } + } + ], + "archived_at": null, + "created_at": "2025-01-01T00:00:00Z", + "updated_at": "2025-01-01T01:00:00Z" + } + ] + } + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "403": { + "description": "Insufficient permissions", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "422": { + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + } + } + }, + "post": { + "summary": "Create a task", + "description": "Creates a new task for a repository", + "tags": [ + "agent-tasks" + ], + "operationId": "agent-tasks/create-task", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/agent-tasks/agent-tasks#create-a-task" + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "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." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "event_content" + ], + "properties": { + "agent_id": { + "type": "integer", + "format": "int64", + "description": "Agent ID (optional, defaults to coding agent)" + }, + "problem_statement": { + "type": "string", + "description": "Additional prompting for the agent" + }, + "event_content": { + "type": "string", + "description": "User's written prompt" + }, + "model": { + "type": "string", + "description": "Model identifier" + }, + "custom_agent": { + "type": "string", + "description": "Custom agent identifier" + }, + "create_pull_request": { + "type": "boolean", + "description": "Whether to create a PR" + }, + "base_ref": { + "type": "string", + "description": "Base ref for new branch/PR" + }, + "event_type": { + "type": "string", + "description": "Type of event" + }, + "event_url": { + "type": "string", + "description": "URL of the triggering event" + }, + "event_identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Identifiers for tracking" + } + } + }, + "examples": { + "default": { + "value": { + "event_content": "Fix the login button on the homepage", + "create_pull_request": true, + "base_ref": "main" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Task created successfully", + "content": { + "application/json": { + "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": { + "description": "The entity who created this task", + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "The unique identifier of the user" + } + } + }, + "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": [ + "github_resource", + "branch" + ], + "description": "Discriminator for data shape" + }, + "data": { + "oneOf": [ + { + "type": "object", + "description": "A GitHub resource (pull request, issue, etc.)", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "GitHub resource ID" + }, + "type": { + "type": "string", + "description": "Resource type (e.g., pull_request, issue)" + }, + "global_id": { + "type": "string", + "description": "GraphQL global ID" + } + } + }, + { + "type": "object", + "description": "A Git branch reference", + "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", + "format": "date-time", + "nullable": true, + "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" + }, + "remote_steerable": { + "type": "boolean", + "description": "Whether the latest session in this task supports remote steering via Mission Control" + } + } + }, + "examples": { + "default": { + "value": { + "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" + } + } + } + } + } + }, + "400": { + "description": "Problems parsing JSON", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "403": { + "description": "Insufficient permissions", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "422": { + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + } + } + } + }, + "/agents/repos/{owner}/{repo}/tasks/{task_id}": { + "get": { + "summary": "Get a task by repo", + "description": "Returns a task by ID scoped to an owner/repo path", + "tags": [ + "agent-tasks" + ], + "operationId": "agent-tasks/get-task-by-repo-and-id", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/agent-tasks/agent-tasks#get-a-task-by-repo" + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "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." + } + ], + "responses": { + "200": { + "description": "Task retrieved successfully", + "content": { + "application/json": { + "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": { + "description": "The entity who created this task", + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "The unique identifier of the user" + } + } + }, + "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": [ + "github_resource", + "branch" + ], + "description": "Discriminator for data shape" + }, + "data": { + "oneOf": [ + { + "type": "object", + "description": "A GitHub resource (pull request, issue, etc.)", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "GitHub resource ID" + }, + "type": { + "type": "string", + "description": "Resource type (e.g., pull_request, issue)" + }, + "global_id": { + "type": "string", + "description": "GraphQL global ID" + } + } + }, + { + "type": "object", + "description": "A Git branch reference", + "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", + "format": "date-time", + "nullable": true, + "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" + }, + "remote_steerable": { + "type": "boolean", + "description": "Whether the latest session in this task supports remote steering via Mission Control" + } + } + }, + { + "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" + } + } + }, + "agent_id": { + "type": "integer", + "format": "int64", + "description": "Agent ID" + }, + "agent_task_id": { + "type": "string", + "description": "Agent internal task ID" + }, + "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" + }, + "event_type": { + "type": "string", + "description": "Type of event that triggered this session" + }, + "event_url": { + "type": "string", + "description": "URL of the triggering event" + }, + "event_content": { + "type": "string", + "description": "Content of the triggering event" + }, + "event_identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Identifiers for tracking" + }, + "resource_type": { + "type": "string", + "description": "Type of resource associated with this session" + }, + "resource_id": { + "type": "integer", + "format": "int64", + "description": "Resource ID" + }, + "resource_number": { + "type": "integer", + "format": "int32", + "description": "Resource number (e.g., PR number)" + }, + "resource_global_id": { + "type": "string", + "description": "GraphQL global ID of the resource" + }, + "resource_state": { + "type": "string", + "description": "State of the associated resource" + }, + "head_ref": { + "type": "string", + "description": "Head branch name" + }, + "base_ref": { + "type": "string", + "description": "Base branch name" + }, + "workflow_run_id": { + "type": "integer", + "format": "int64", + "description": "GitHub Actions workflow run ID" + }, + "model": { + "type": "string", + "description": "Model used for this session" + }, + "premium_requests": { + "type": "number", + "format": "double", + "description": "Premium request count" + }, + "remote_steerable": { + "type": "boolean", + "description": "Whether this session supports remote steering via Mission Control" + }, + "error": { + "type": "object", + "description": "Error details for a failed session", + "properties": { + "message": { + "type": "string", + "description": "Error message" + } + } + } + } + }, + "description": "Sessions associated with this task" + } + } + } + ] + }, + "examples": { + "default": { + "value": { + "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": "github_resource", + "data": { + "id": 42, + "type": "pull_request" + } + } + ], + "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", + "event_content": "Fix the login button on the homepage", + "head_ref": "copilot/fix-1", + "base_ref": "main" + } + ] + } + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "403": { + "description": "Insufficient permissions", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "422": { + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + } + } + } + }, + "/agents/tasks": { + "get": { + "summary": "List tasks", + "description": "Returns a list of tasks for the authenticated user", + "tags": [ + "agent-tasks" + ], + "operationId": "agent-tasks/list-tasks", "externalDocs": { "description": "API method documentation", - "url": "https://docs.github.com/rest/security-advisories/global-advisories#list-global-security-advisories" + "url": "https://docs.github.com/rest/agent-tasks/agent-tasks#list-tasks" + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "agent-tasks", + "subcategory": "agent-tasks" }, "parameters": [ { - "name": "ghsa_id", - "in": "query", - "description": "If specified, only advisories with this GHSA (GitHub Security Advisory) identifier will be returned.", - "schema": { - "type": "string" - } - }, - { - "name": "type", - "in": "query", - "description": "If specified, only advisories of this type will be returned. By default, a request with no other parameters defined will only return reviewed advisories that are not malware.", - "schema": { - "type": "string", - "enum": [ - "reviewed", - "malware", - "unreviewed" - ], - "default": "reviewed" - } - }, - { - "name": "cve_id", - "description": "If specified, only advisories with this CVE (Common Vulnerabilities and Exposures) identifier will be returned.", + "name": "per_page", "in": "query", "schema": { - "type": "string" - } + "type": "integer", + "default": 30, + "minimum": 1, + "maximum": 100 + }, + "description": "The number of results per page (max 100)." }, { - "name": "ecosystem", + "name": "page", "in": "query", - "description": "If specified, only advisories for these ecosystems will be returned.", "schema": { - "$ref": "#/components/schemas/security-advisory-ecosystems" - } + "type": "integer", + "default": 1, + "minimum": 1 + }, + "description": "The page number of the results to fetch." }, { - "name": "severity", + "name": "sort", "in": "query", - "description": "If specified, only advisories with these severities will be returned.", "schema": { "type": "string", + "default": "updated_at", "enum": [ - "unknown", - "low", - "medium", - "high", - "critical" - ] - } - }, - { - "name": "cwes", - "in": "query", - "description": "If specified, only advisories with these Common Weakness Enumerations (CWEs) will be returned.\n\nExample: `cwes=79,284,22` or `cwes[]=79&cwes[]=284&cwes[]=22`", - "schema": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } + "updated_at", + "created_at" ] - } - }, - { - "name": "is_withdrawn", - "in": "query", - "description": "Whether to only return advisories that have been withdrawn.", - "schema": { - "type": "boolean" - } + }, + "description": "The field to sort results by. Can be `updated_at` or `created_at`." }, { - "name": "affects", + "name": "direction", "in": "query", - "description": "If specified, only return advisories that affect any of `package` or `package@version`. A maximum of 1000 packages can be specified.\nIf the query parameter causes the URL to exceed the maximum URL length supported by your client, you must specify fewer packages.\n\nExample: `affects=package1,package2@1.0.0,package3@2.0.0` or `affects[]=package1&affects[]=package2@1.0.0`", "schema": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "maxItems": 1000, - "items": { - "type": "string" - } - } + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" ] - } - }, - { - "name": "published", - "in": "query", - "description": "If specified, only return advisories that were published on a date or date range.\n\nFor more information on the syntax of the date range, see \"[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates).\"", - "schema": { - "type": "string" - } - }, - { - "name": "updated", - "in": "query", - "description": "If specified, only return advisories that were updated on a date or date range.\n\nFor more information on the syntax of the date range, see \"[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates).\"", - "schema": { - "type": "string" - } - }, - { - "name": "modified", - "description": "If specified, only show advisories that were updated or published on a date or date range.\n\nFor more information on the syntax of the date range, see \"[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates).\"", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "epss_percentage", - "in": "query", - "description": "If specified, only return advisories that have an EPSS percentage score that matches the provided value.\nThe EPSS percentage represents the likelihood of a CVE being exploited.", - "schema": { - "type": "string" - } + }, + "description": "The direction to sort results. Can be `asc` or `desc`." }, { - "name": "epss_percentile", + "name": "state", "in": "query", - "description": "If specified, only return advisories that have an EPSS percentile score that matches the provided value.\nThe EPSS percentile represents the relative rank of the CVE's likelihood of being exploited compared to other CVEs.", "schema": { "type": "string" - } - }, - { - "$ref": "#/components/parameters/pagination-before" - }, - { - "$ref": "#/components/parameters/pagination-after" - }, - { - "$ref": "#/components/parameters/direction" + }, + "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": "per_page", - "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "name": "is_archived", "in": "query", "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 30 - } + "type": "boolean" + }, + "description": "Filter by archived status. When `true`, returns only archived tasks. When `false`, returns only non-archived tasks." }, { - "name": "sort", - "description": "The property to sort the results by.", + "name": "since", "in": "query", - "required": false, "schema": { "type": "string", - "enum": [ - "updated", - "published", - "epss_percentage", - "epss_percentile" - ], - "default": "published" - } + "format": "date-time" + }, + "description": "Only show tasks updated at or after this time (ISO 8601 timestamp)" } ], "responses": { "200": { - "description": "Response", + "description": "Tasks retrieved successfully", + "headers": { + "Link": { + "description": "Pagination links. Contains rel=\"first\" (always),\nrel=\"next\" (when more pages exist), and rel=\"last\" (when on the final page).\n", + "schema": { + "type": "string" + }, + "example": "; rel=\"next\", ; rel=\"first\"" + } + }, "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/global-advisory" + "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": { + "description": "The entity who created this task", + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "The unique identifier of the user" + } + } + }, + "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": [ + "github_resource", + "branch" + ], + "description": "Discriminator for data shape" + }, + "data": { + "oneOf": [ + { + "type": "object", + "description": "A GitHub resource (pull request, issue, etc.)", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "GitHub resource ID" + }, + "type": { + "type": "string", + "description": "Resource type (e.g., pull_request, issue)" + }, + "global_id": { + "type": "string", + "description": "GraphQL global ID" + } + } + }, + { + "type": "object", + "description": "A Git branch reference", + "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", + "format": "date-time", + "nullable": true, + "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" + }, + "remote_steerable": { + "type": "boolean", + "description": "Whether the latest session in this task supports remote steering via Mission Control" + } + } + }, + "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" + } } }, "examples": { "default": { - "$ref": "#/components/examples/global-advisory-items" + "value": { + "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": "github_resource", + "data": { + "id": 42, + "type": "pull_request" + } + } + ], + "archived_at": null, + "created_at": "2025-01-01T00:00:00Z", + "updated_at": "2025-01-01T01:00:00Z" + } + ] + } } } } } }, - "429": { - "description": "Too many requests", + "400": { + "description": "Bad request", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/basic-error" + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "403": { + "description": "Insufficient permissions", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } } } } }, "422": { - "$ref": "#/components/responses/validation_failed_simple" + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } } - }, - "x-github": { - "githubCloudOnly": false, - "enabledForGitHubApps": true, - "category": "security-advisories", - "subcategory": "global-advisories" } } }, - "/advisories/{ghsa_id}": { + "/agents/tasks/{task_id}": { "get": { - "summary": "Get a global security advisory", - "description": "Gets a global security advisory using its GitHub Security Advisory (GHSA) identifier.", + "summary": "Get a task by ID", + "description": "Returns a task by ID with its associated sessions", "tags": [ - "security-advisories" + "agent-tasks" ], - "operationId": "security-advisories/get-global-advisory", + "operationId": "agent-tasks/get-task-by-id", "externalDocs": { "description": "API method documentation", - "url": "https://docs.github.com/rest/security-advisories/global-advisories#get-a-global-security-advisory" + "url": "https://docs.github.com/rest/agent-tasks/agent-tasks#get-a-task-by-id" + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "agent-tasks", + "subcategory": "agent-tasks" }, "parameters": [ { - "$ref": "#/components/parameters/ghsa_id" + "name": "task_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The unique identifier of the task." } ], "responses": { "200": { - "description": "Response", + "description": "Task retrieved successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/global-advisory" + "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": { + "description": "The entity who created this task", + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "The unique identifier of the user" + } + } + }, + "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": [ + "github_resource", + "branch" + ], + "description": "Discriminator for data shape" + }, + "data": { + "oneOf": [ + { + "type": "object", + "description": "A GitHub resource (pull request, issue, etc.)", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "GitHub resource ID" + }, + "type": { + "type": "string", + "description": "Resource type (e.g., pull_request, issue)" + }, + "global_id": { + "type": "string", + "description": "GraphQL global ID" + } + } + }, + { + "type": "object", + "description": "A Git branch reference", + "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", + "format": "date-time", + "nullable": true, + "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" + }, + "remote_steerable": { + "type": "boolean", + "description": "Whether the latest session in this task supports remote steering via Mission Control" + } + } + }, + { + "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" + } + } + }, + "agent_id": { + "type": "integer", + "format": "int64", + "description": "Agent ID" + }, + "agent_task_id": { + "type": "string", + "description": "Agent internal task ID" + }, + "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" + }, + "event_type": { + "type": "string", + "description": "Type of event that triggered this session" + }, + "event_url": { + "type": "string", + "description": "URL of the triggering event" + }, + "event_content": { + "type": "string", + "description": "Content of the triggering event" + }, + "event_identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Identifiers for tracking" + }, + "resource_type": { + "type": "string", + "description": "Type of resource associated with this session" + }, + "resource_id": { + "type": "integer", + "format": "int64", + "description": "Resource ID" + }, + "resource_number": { + "type": "integer", + "format": "int32", + "description": "Resource number (e.g., PR number)" + }, + "resource_global_id": { + "type": "string", + "description": "GraphQL global ID of the resource" + }, + "resource_state": { + "type": "string", + "description": "State of the associated resource" + }, + "head_ref": { + "type": "string", + "description": "Head branch name" + }, + "base_ref": { + "type": "string", + "description": "Base branch name" + }, + "workflow_run_id": { + "type": "integer", + "format": "int64", + "description": "GitHub Actions workflow run ID" + }, + "model": { + "type": "string", + "description": "Model used for this session" + }, + "premium_requests": { + "type": "number", + "format": "double", + "description": "Premium request count" + }, + "remote_steerable": { + "type": "boolean", + "description": "Whether this session supports remote steering via Mission Control" + }, + "error": { + "type": "object", + "description": "Error details for a failed session", + "properties": { + "message": { + "type": "string", + "description": "Error message" + } + } + } + } + }, + "description": "Sessions associated with this task" + } + } + } + ] }, "examples": { "default": { - "$ref": "#/components/examples/global-advisory" + "value": { + "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": "github_resource", + "data": { + "id": 42, + "type": "pull_request" + } + } + ], + "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", + "event_content": "Fix the login button on the homepage", + "head_ref": "copilot/fix-1", + "base_ref": "main" + } + ] + } + } + } + } + } + }, + "400": { + "description": "Problems parsing request", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "403": { + "description": "Insufficient permissions", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } } } } } }, "404": { - "$ref": "#/components/responses/not_found" + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "422": { + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } } - }, - "x-github": { - "githubCloudOnly": false, - "enabledForGitHubApps": true, - "category": "security-advisories", - "subcategory": "global-advisories" } } }, @@ -10504,7 +13793,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/oidc-custom-sub" + "title": "Actions OIDC Subject customization", + "description": "Actions OIDC Subject customization", + "type": "object", + "properties": { + "include_claim_keys": { + "description": "Array of unique strings. Each claim key can only contain alphanumeric characters and underscores.", + "type": "array", + "items": { + "type": "string" + } + } + } }, "examples": { "default": { @@ -14331,206 +17631,226 @@ } }, "403": { - "$ref": "#/components/responses/forbidden" - }, - "404": { - "$ref": "#/components/responses/not_found" - } - }, - "x-github": { - "githubCloudOnly": false, - "enabledForGitHubApps": true, - "category": "orgs", - "subcategory": "artifact-metadata" - } - } - }, - "/orgs/{org}/artifacts/metadata/deployment-record/cluster/{cluster}": { - "post": { - "summary": "Set cluster deployment records", - "description": "Set deployment records for a given cluster.\nIf proposed records in the 'deployments' field have identical 'cluster', 'logical_environment',\n'physical_environment', and 'deployment_name' values as existing records, the existing records will be updated.\nIf no existing records match, new records will be created.", - "tags": [ - "orgs" - ], - "operationId": "orgs/set-cluster-deployment-records", - "externalDocs": { - "description": "API method documentation", - "url": "https://docs.github.com/rest/orgs/artifact-metadata#set-cluster-deployment-records" - }, - "parameters": [ - { - "$ref": "#/components/parameters/org" - }, - { - "name": "cluster", - "in": "path", - "description": "The cluster name.", - "required": true, - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 128, - "pattern": "^[a-zA-Z0-9._-]+$" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "logical_environment": { - "type": "string", - "description": "The stage of the deployment.", - "minLength": 1, - "maxLength": 128 - }, - "physical_environment": { - "type": "string", - "description": "The physical region of the deployment.", - "maxLength": 128 - }, - "deployments": { - "type": "array", - "description": "The list of deployments to record.", - "maxItems": 1000, - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the artifact. Note that if multiple deployments have identical 'digest' parameter values,\nthe name parameter must also be identical across all entries.\n", - "minLength": 1, - "maxLength": 256 - }, - "digest": { - "type": "string", - "description": "The hex encoded digest of the artifact. Note that if multiple deployments have identical 'digest' parameter values,\nthe name and version parameters must also be identical across all entries.\n", - "minLength": 71, - "maxLength": 71, - "pattern": "^sha256:[a-f0-9]{64}$" - }, - "version": { - "type": "string", - "description": "The artifact version. Note that if multiple deployments have identical 'digest' parameter values,\nthe version parameter must also be identical across all entries.\n", - "maxLength": 100, - "x-multi-segment": true, - "example": "1.2.3" - }, - "status": { - "type": "string", - "description": "The deployment status of the artifact.", - "default": "deployed", - "enum": [ - "deployed", - "decommissioned" - ] - }, - "deployment_name": { - "type": "string", - "description": "The unique identifier for the deployment represented by the new record. To accommodate differing\ncontainers and namespaces within a record set, the following format is recommended:\n{namespaceName}-{deploymentName}-{containerName}.\nThe deployment_name must be unique across all entries in the deployments array.\n", - "minLength": 1, - "maxLength": 256 - }, - "github_repository": { - "type": "string", - "description": "The name of the GitHub repository associated with the artifact. This should be used\nwhen there are no provenance attestations available for the artifact. The repository\nmust belong to the organization specified in the path parameter.\n\nIf a provenance attestation is available for the artifact, the API will use\nthe repository information from the attestation instead of this parameter.", - "maxLength": 100, - "pattern": "^[A-Za-z0-9.\\-_]+$", - "example": "my-github-repo" - }, - "tags": { - "type": "object", - "description": "Key-value pairs to tag the deployment record.", - "additionalProperties": { - "type": "string" - } - }, - "runtime_risks": { - "type": "array", - "description": "A list of runtime risks associated with the deployment.", - "maxItems": 4, - "uniqueItems": true, - "items": { - "type": "string", - "enum": [ - "critical-resource", - "internet-exposed", - "lateral-movement", - "sensitive-data" - ] - } - } - }, - "required": [ - "name", - "deployment_name", - "digest" - ] - } - } - }, - "required": [ - "logical_environment", - "deployments" - ] - }, - "examples": { - "default": { - "value": { - "logical_environment": "prod", - "physical_environment": "pacific-east", - "deployments": [ - { - "name": "awesome-image", - "digest": "sha256:1bb1e949e55dcefc6353e7b36c8897d2a107d8e8dca49d4e3c0ea8493fc0bc72", - "version": "2.1.0", - "status": "deployed", - "deployment_name": "deployment-pod", - "tags": { - "runtime-risk": "sensitive-data" - } - } - ] - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Deployment records created or updated successfully.\n", + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "orgs", + "subcategory": "artifact-metadata" + } + } + }, + "/orgs/{org}/artifacts/metadata/deployment-record/cluster/{cluster}": { + "post": { + "summary": "Set cluster deployment records", + "description": "Set deployment records for a given cluster.\nIf proposed records in the 'deployments' field have identical 'cluster', 'logical_environment',\n'physical_environment', and 'deployment_name' values as existing records, the existing records will be updated.\nIf no existing records match, new records will be created.", + "tags": [ + "orgs" + ], + "operationId": "orgs/set-cluster-deployment-records", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/orgs/artifact-metadata#set-cluster-deployment-records" + }, + "parameters": [ + { + "$ref": "#/components/parameters/org" + }, + { + "name": "cluster", + "in": "path", + "description": "The cluster name.", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 128, + "pattern": "^[a-zA-Z0-9._-]+$" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "logical_environment": { + "type": "string", + "description": "The stage of the deployment.", + "minLength": 1, + "maxLength": 128 + }, + "physical_environment": { + "type": "string", + "description": "The physical region of the deployment.", + "maxLength": 128 + }, + "deployments": { + "type": "array", + "description": "The list of deployments to record.", + "maxItems": 1000, + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the artifact. Note that if multiple deployments have identical 'digest' parameter values,\nthe name parameter must also be identical across all entries.\n", + "minLength": 1, + "maxLength": 256 + }, + "digest": { + "type": "string", + "description": "The hex encoded digest of the artifact. Note that if multiple deployments have identical 'digest' parameter values,\nthe name and version parameters must also be identical across all entries.\n", + "minLength": 71, + "maxLength": 71, + "pattern": "^sha256:[a-f0-9]{64}$" + }, + "version": { + "type": "string", + "description": "The artifact version. Note that if multiple deployments have identical 'digest' parameter values,\nthe version parameter must also be identical across all entries.\n", + "maxLength": 100, + "x-multi-segment": true, + "example": "1.2.3" + }, + "status": { + "type": "string", + "description": "The deployment status of the artifact.", + "default": "deployed", + "enum": [ + "deployed", + "decommissioned" + ] + }, + "deployment_name": { + "type": "string", + "description": "The unique identifier for the deployment represented by the new record. To accommodate differing\ncontainers and namespaces within a record set, the following format is recommended:\n{namespaceName}-{deploymentName}-{containerName}.\nThe deployment_name must be unique across all entries in the deployments array.\n", + "minLength": 1, + "maxLength": 256 + }, + "github_repository": { + "type": "string", + "description": "The name of the GitHub repository associated with the artifact. This should be used\nwhen there are no provenance attestations available for the artifact. The repository\nmust belong to the organization specified in the path parameter.\n\nIf a provenance attestation is available for the artifact, the API will use\nthe repository information from the attestation instead of this parameter.", + "maxLength": 100, + "pattern": "^[A-Za-z0-9.\\-_]+$", + "example": "my-github-repo" + }, + "tags": { + "type": "object", + "description": "Key-value pairs to tag the deployment record.", + "additionalProperties": { + "type": "string" + } + }, + "runtime_risks": { + "type": "array", + "description": "A list of runtime risks associated with the deployment.", + "maxItems": 4, + "uniqueItems": true, + "items": { + "type": "string", + "enum": [ + "critical-resource", + "internet-exposed", + "lateral-movement", + "sensitive-data" + ] + } + } + }, + "required": [ + "name", + "deployment_name", + "digest" + ] + } + } + }, + "required": [ + "logical_environment", + "deployments" + ] + }, + "examples": { + "default": { + "value": { + "logical_environment": "prod", + "physical_environment": "pacific-east", + "deployments": [ + { + "name": "awesome-image", + "digest": "sha256:1bb1e949e55dcefc6353e7b36c8897d2a107d8e8dca49d4e3c0ea8493fc0bc72", + "version": "2.1.0", + "status": "deployed", + "deployment_name": "deployment-pod", + "tags": { + "runtime-risk": "sensitive-data" + } + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Deployment records created or updated successfully.\n", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total_count": { + "description": "The number of deployment records created", + "type": "integer" + }, + "deployment_records": { + "type": "array", + "items": { + "$ref": "#/components/schemas/artifact-deployment-record" + } + } + } + }, + "examples": { + "default": { + "$ref": "#/components/examples/artifact-deployment-record-list" + } + } + } + } + }, + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "total_count": { - "description": "The number of deployment records created", - "type": "integer" - }, - "deployment_records": { - "type": "array", - "items": { - "$ref": "#/components/schemas/artifact-deployment-record" - } - } - } + "$ref": "#/components/schemas/basic-error" }, "examples": { - "default": { - "$ref": "#/components/examples/artifact-deployment-record-list" + "insufficient_repo_permissions": { + "value": { + "message": { + "cause": "artifact metadata write permission required on one or more repositories", + "repositories": [ + 123, + 345 + ] + } + } } } } } }, - "403": { - "$ref": "#/components/responses/forbidden" - }, "404": { "$ref": "#/components/responses/not_found" } @@ -23877,7 +27197,7 @@ "/orgs/{org}/organization-roles": { "get": { "summary": "Get all organization roles for an organization", - "description": "Lists the organization roles available in this organization. For more information on organization roles, see \"[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles).\"\n\nTo use this endpoint, the authenticated user must be one of:\n\n- An administrator for the organization.\n- A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization.\n\nOAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.", + "description": "Lists the organization roles available in this organization. For more information on organization roles, see \"[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles).\"\n\nTo use this endpoint, the authenticated user must be one of:\n\n- An administrator for the organization.\n- An organization member (or a member of a team) assigned a custom organization role that includes the **View organization roles** (`read_organization_custom_org_role`) permission. For more information, see \"[Permissions for organization access](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/permissions-of-custom-organization-roles#permissions-for-organization-access).\"\n\nOAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.", "tags": [ "orgs" ], @@ -24156,7 +27476,7 @@ "/orgs/{org}/organization-roles/{role_id}": { "get": { "summary": "Get an organization role", - "description": "Gets an organization role that is available to this organization. For more information on organization roles, see \"[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles).\"\n\nTo use this endpoint, the authenticated user must be one of:\n\n- An administrator for the organization.\n- A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization.\n\nOAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.", + "description": "Gets an organization role that is available to this organization. For more information on organization roles, see \"[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles).\"\n\nTo use this endpoint, the authenticated user must be one of:\n\n- An administrator for the organization.\n- An organization member (or a member of a team) assigned a custom organization role that includes the **View organization roles** (`read_organization_custom_org_role`) permission. For more information, see \"[Permissions for organization access](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/permissions-of-custom-organization-roles#permissions-for-organization-access).\"\n\nOAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.", "tags": [ "orgs" ], @@ -30261,6 +33581,19 @@ "items": { "type": "string" } + }, + "failover_network_settings_ids": { + "type": "array", + "minItems": 0, + "maxItems": 1, + "description": "A list of identifiers of the failover network settings resources to use for the network configuration. Exactly one resource identifier must be specified in the list.", + "items": { + "type": "string" + } + }, + "failover_network_enabled": { + "type": "boolean", + "description": "Indicates whether the failover network resource is enabled." } }, "required": [ @@ -30402,6 +33735,19 @@ "items": { "type": "string" } + }, + "failover_network_settings_ids": { + "type": "array", + "minItems": 0, + "maxItems": 1, + "description": "A list of identifiers of the failover network settings resources to use for the network configuration. Exactly one resource identifier must be specified in the list.", + "items": { + "type": "string" + } + }, + "failover_network_enabled": { + "type": "boolean", + "description": "Indicates whether the failover network resource is enabled." } } }, @@ -106932,7 +110278,8 @@ "enum": [ "unknown", "direct", - "transitive" + "transitive", + "inconclusive" ] } } @@ -121466,6 +124813,12 @@ "commit_url": { "type": "string", "description": "The API URL to get the associated commit resource" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL to get the associated commit resource.", + "example": "https://github.com/octocat/Hello-World/blob/af5626b/example/secrets.txt#L1-L1" } }, "required": [ @@ -121547,6 +124900,12 @@ "format": "uri", "description": "The API URL to get the issue where the secret was detected.", "example": "https://api.github.com/repos/octocat/Hello-World/issues/1347" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL for the issue where the secret was detected.", + "example": "https://github.com/octocat/Hello-World/issues/1" } }, "required": [ @@ -121562,6 +124921,12 @@ "format": "uri", "description": "The API URL to get the issue where the secret was detected.", "example": "https://api.github.com/repos/octocat/Hello-World/issues/1347" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL for the issue where the secret was detected.", + "example": "https://github.com/octocat/Hello-World/issues/1" } }, "required": [ @@ -121577,6 +124942,12 @@ "format": "uri", "description": "The API URL to get the issue comment where the secret was detected.", "example": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL for the issue comment where the secret was detected.", + "example": "https://github.com/octocat/Hello-World/issues/1#issuecomment-1081119451" } }, "required": [ @@ -121637,6 +125008,12 @@ "format": "uri", "description": "The API URL to get the pull request where the secret was detected.", "example": "https://api.github.com/repos/octocat/Hello-World/pulls/2846" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL for the pull request where the secret was detected.", + "example": "https://github.com/octocat/Hello-World/pull/2846" } }, "required": [ @@ -121652,6 +125029,12 @@ "format": "uri", "description": "The API URL to get the pull request where the secret was detected.", "example": "https://api.github.com/repos/octocat/Hello-World/pulls/2846" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL for the pull request where the secret was detected.", + "example": "https://github.com/octocat/Hello-World/pull/2846" } }, "required": [ @@ -121667,6 +125050,12 @@ "format": "uri", "description": "The API URL to get the pull request comment where the secret was detected.", "example": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL for the pull request comment where the secret was detected.", + "example": "https://github.com/octocat/Hello-World/pull/2846#issuecomment-1081119451" } }, "required": [ @@ -121682,6 +125071,12 @@ "format": "uri", "description": "The API URL to get the pull request review where the secret was detected.", "example": "https://api.github.com/repos/octocat/Hello-World/pulls/2846/reviews/80" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL for the pull request review where the secret was detected.", + "example": "https://github.com/octocat/Hello-World/pull/2846#pullrequestreview-80" } }, "required": [ @@ -121697,6 +125092,12 @@ "format": "uri", "description": "The API URL to get the pull request review comment where the secret was detected.", "example": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/12" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL for the pull request review comment where the secret was detected.", + "example": "https://github.com/octocat/Hello-World/pull/2846#discussion_r12" } }, "required": [ @@ -129705,7 +133106,8 @@ "enum": [ "unknown", "direct", - "transitive" + "transitive", + "inconclusive" ] } } @@ -283645,12 +287047,10 @@ "name": "Uncontrolled Resource Consumption" } ], - "epss": [ - { - "percentage": 0.00045, - "percentile": "0.16001e0" - } - ], + "epss": { + "percentage": 0.00045, + "percentile": "0.16001e0" + }, "credits": [ { "user": { @@ -286800,12 +290200,10 @@ "score": 8.7 } }, - "epss": [ - { - "percentage": 0.00045, - "percentile": "0.16001e0" - } - ], + "epss": { + "percentage": 0.00045, + "percentile": "0.16001e0" + }, "cwes": [ { "cwe_id": "CWE-200", @@ -303522,12 +306920,10 @@ "score": 8.7 } }, - "epss": [ - { - "percentage": 0.00045, - "percentile": "0.16001e0" - } - ], + "epss": { + "percentage": 0.00045, + "percentile": "0.16001e0" + }, "cwes": [ { "cwe_id": "CWE-200", @@ -303815,12 +307211,10 @@ "score": 8.5 } }, - "epss": [ - { - "percentage": 0.00045, - "percentile": "0.16001e0" - } - ], + "epss": { + "percentage": 0.00045, + "percentile": "0.16001e0" + }, "cwes": [ { "cwe_id": "CWE-532", diff --git a/descriptions/api.github.com/api.github.com.2026-03-10.yaml b/descriptions/api.github.com/api.github.com.2026-03-10.yaml index 3368588465..de38c24217 100644 --- a/descriptions/api.github.com/api.github.com.2026-03-10.yaml +++ b/descriptions/api.github.com/api.github.com.2026-03-10.yaml @@ -103,6 +103,8 @@ tags: description: Endpoints to manage campaigns via the REST API. - name: projects description: Endpoints to manage Projects using the REST API. +- name: agent-tasks + description: Endpoints to manage and interact with agent tasks. servers: - url: https://api.github.com externalDocs: @@ -336,6 +338,2534 @@ paths: enabledForGitHubApps: true category: security-advisories subcategory: global-advisories + "/agents/repos/{owner}/{repo}/tasks": + get: + summary: List tasks for repository + description: Returns a list of tasks for a specific repository + tags: + - agent-tasks + operationId: agent-tasks/list-tasks-for-repo + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/agent-tasks/agent-tasks#list-tasks-for-repository + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + 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 + description: Filter by archived status. When `true`, returns only archived + tasks. When `false`, returns only non-archived tasks. + - 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 + responses: + '200': + description: Tasks retrieved successfully + headers: + Link: + description: | + Pagination links. Contains rel="first" (always), + rel="prev" (when current page > 1), + rel="next" (when more pages exist), and rel="last" (when on the final page). + schema: + type: string + example: ; + rel="next", ; + rel="first" + content: + application/json: + 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: + description: The entity who created this task + type: object + properties: + id: + type: integer + format: int64 + description: The unique identifier of the user + 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: + - github_resource + - branch + description: Discriminator for data shape + data: + oneOf: + - type: object + description: A GitHub resource (pull request, issue, + etc.) + properties: + id: + type: integer + format: int64 + description: GitHub resource ID + type: + type: string + description: Resource type (e.g., pull_request, + issue) + global_id: + type: string + description: GraphQL global ID + - type: object + description: A Git branch reference + 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 + format: date-time + nullable: true + 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 + remote_steerable: + type: boolean + description: Whether the latest session in this task supports + remote steering via Mission Control + 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 + examples: + default: + value: + 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: github_resource + data: + id: 42 + type: pull_request + archived_at: + created_at: '2025-01-01T00:00:00Z' + updated_at: '2025-01-01T01:00:00Z' + '400': + description: Bad request + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '401': + description: Authentication required + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '403': + description: Insufficient permissions + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '404': + description: Resource not found + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '422': + description: Validation Failed + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + post: + summary: Create a task + description: Creates a new task for a repository + tags: + - agent-tasks + operationId: agent-tasks/create-task + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/agent-tasks/agent-tasks#create-a-task + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + 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. + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - event_content + properties: + agent_id: + type: integer + format: int64 + description: Agent ID (optional, defaults to coding agent) + problem_statement: + type: string + description: Additional prompting for the agent + event_content: + type: string + description: User's written prompt + model: + type: string + description: Model identifier + custom_agent: + type: string + description: Custom agent identifier + create_pull_request: + type: boolean + description: Whether to create a PR + base_ref: + type: string + description: Base ref for new branch/PR + event_type: + type: string + description: Type of event + event_url: + type: string + description: URL of the triggering event + event_identifiers: + type: array + items: + type: string + description: Identifiers for tracking + examples: + default: + value: + event_content: Fix the login button on the homepage + create_pull_request: true + base_ref: main + responses: + '201': + description: Task created successfully + content: + application/json: + 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: + description: The entity who created this task + type: object + properties: + id: + type: integer + format: int64 + description: The unique identifier of the user + 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: + - github_resource + - branch + description: Discriminator for data shape + data: + oneOf: + - type: object + description: A GitHub resource (pull request, issue, etc.) + properties: + id: + type: integer + format: int64 + description: GitHub resource ID + type: + type: string + description: Resource type (e.g., pull_request, issue) + global_id: + type: string + description: GraphQL global ID + - type: object + description: A Git branch reference + 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 + format: date-time + nullable: true + 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 + remote_steerable: + type: boolean + description: Whether the latest session in this task supports + remote steering via Mission Control + examples: + default: + value: + 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: + created_at: '2025-01-01T00:00:00Z' + updated_at: '2025-01-01T00:00:00Z' + '400': + description: Problems parsing JSON + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '401': + description: Authentication required + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '403': + description: Insufficient permissions + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '422': + description: Validation Failed + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + "/agents/repos/{owner}/{repo}/tasks/{task_id}": + get: + summary: Get a task by repo + description: Returns a task by ID scoped to an owner/repo path + tags: + - agent-tasks + operationId: agent-tasks/get-task-by-repo-and-id + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/agent-tasks/agent-tasks#get-a-task-by-repo + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + 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. + responses: + '200': + description: Task retrieved successfully + content: + application/json: + 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: + description: The entity who created this task + type: object + properties: + id: + type: integer + format: int64 + description: The unique identifier of the user + 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: + - github_resource + - branch + description: Discriminator for data shape + data: + oneOf: + - type: object + description: A GitHub resource (pull request, issue, + etc.) + properties: + id: + type: integer + format: int64 + description: GitHub resource ID + type: + type: string + description: Resource type (e.g., pull_request, + issue) + global_id: + type: string + description: GraphQL global ID + - type: object + description: A Git branch reference + 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 + format: date-time + nullable: true + 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 + remote_steerable: + type: boolean + description: Whether the latest session in this task supports + remote steering via Mission Control + - 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 + agent_id: + type: integer + format: int64 + description: Agent ID + agent_task_id: + type: string + description: Agent internal task ID + 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 + event_type: + type: string + description: Type of event that triggered this session + event_url: + type: string + description: URL of the triggering event + event_content: + type: string + description: Content of the triggering event + event_identifiers: + type: array + items: + type: string + description: Identifiers for tracking + resource_type: + type: string + description: Type of resource associated with this session + resource_id: + type: integer + format: int64 + description: Resource ID + resource_number: + type: integer + format: int32 + description: Resource number (e.g., PR number) + resource_global_id: + type: string + description: GraphQL global ID of the resource + resource_state: + type: string + description: State of the associated resource + head_ref: + type: string + description: Head branch name + base_ref: + type: string + description: Base branch name + workflow_run_id: + type: integer + format: int64 + description: GitHub Actions workflow run ID + model: + type: string + description: Model used for this session + premium_requests: + type: number + format: double + description: Premium request count + remote_steerable: + type: boolean + description: Whether this session supports remote steering + via Mission Control + error: + type: object + description: Error details for a failed session + properties: + message: + type: string + description: Error message + description: Sessions associated with this task + examples: + default: + value: + 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: github_resource + data: + id: 42 + type: pull_request + archived_at: + 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' + event_content: Fix the login button on the homepage + head_ref: copilot/fix-1 + base_ref: main + '400': + description: Bad request + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '401': + description: Authentication required + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '403': + description: Insufficient permissions + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '404': + description: Resource not found + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '422': + description: Validation Failed + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + "/agents/tasks": + get: + summary: List tasks + description: Returns a list of tasks for the authenticated user + tags: + - agent-tasks + operationId: agent-tasks/list-tasks + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/agent-tasks/agent-tasks#list-tasks + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + 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 + description: Filter by archived status. When `true`, returns only archived + tasks. When `false`, returns only non-archived tasks. + - name: since + in: query + schema: + type: string + format: date-time + description: Only show tasks updated at or after this time (ISO 8601 timestamp) + responses: + '200': + description: Tasks retrieved successfully + headers: + Link: + description: | + Pagination links. Contains rel="first" (always), + rel="next" (when more pages exist), and rel="last" (when on the final page). + schema: + type: string + example: ; rel="next", + ; rel="first" + content: + application/json: + 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: + description: The entity who created this task + type: object + properties: + id: + type: integer + format: int64 + description: The unique identifier of the user + 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: + - github_resource + - branch + description: Discriminator for data shape + data: + oneOf: + - type: object + description: A GitHub resource (pull request, issue, + etc.) + properties: + id: + type: integer + format: int64 + description: GitHub resource ID + type: + type: string + description: Resource type (e.g., pull_request, + issue) + global_id: + type: string + description: GraphQL global ID + - type: object + description: A Git branch reference + 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 + format: date-time + nullable: true + 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 + remote_steerable: + type: boolean + description: Whether the latest session in this task supports + remote steering via Mission Control + 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 + examples: + default: + value: + 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: github_resource + data: + id: 42 + type: pull_request + archived_at: + created_at: '2025-01-01T00:00:00Z' + updated_at: '2025-01-01T01:00:00Z' + '400': + description: Bad request + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '401': + description: Authentication required + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '403': + description: Insufficient permissions + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '422': + description: Validation Failed + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + "/agents/tasks/{task_id}": + get: + summary: Get a task by ID + description: Returns a task by ID with its associated sessions + tags: + - agent-tasks + operationId: agent-tasks/get-task-by-id + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/agent-tasks/agent-tasks#get-a-task-by-id + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: agent-tasks + subcategory: agent-tasks + parameters: + - name: task_id + in: path + required: true + schema: + type: string + description: The unique identifier of the task. + responses: + '200': + description: Task retrieved successfully + content: + application/json: + 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: + description: The entity who created this task + type: object + properties: + id: + type: integer + format: int64 + description: The unique identifier of the user + 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: + - github_resource + - branch + description: Discriminator for data shape + data: + oneOf: + - type: object + description: A GitHub resource (pull request, issue, + etc.) + properties: + id: + type: integer + format: int64 + description: GitHub resource ID + type: + type: string + description: Resource type (e.g., pull_request, + issue) + global_id: + type: string + description: GraphQL global ID + - type: object + description: A Git branch reference + 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 + format: date-time + nullable: true + 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 + remote_steerable: + type: boolean + description: Whether the latest session in this task supports + remote steering via Mission Control + - 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 + agent_id: + type: integer + format: int64 + description: Agent ID + agent_task_id: + type: string + description: Agent internal task ID + 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 + event_type: + type: string + description: Type of event that triggered this session + event_url: + type: string + description: URL of the triggering event + event_content: + type: string + description: Content of the triggering event + event_identifiers: + type: array + items: + type: string + description: Identifiers for tracking + resource_type: + type: string + description: Type of resource associated with this session + resource_id: + type: integer + format: int64 + description: Resource ID + resource_number: + type: integer + format: int32 + description: Resource number (e.g., PR number) + resource_global_id: + type: string + description: GraphQL global ID of the resource + resource_state: + type: string + description: State of the associated resource + head_ref: + type: string + description: Head branch name + base_ref: + type: string + description: Base branch name + workflow_run_id: + type: integer + format: int64 + description: GitHub Actions workflow run ID + model: + type: string + description: Model used for this session + premium_requests: + type: number + format: double + description: Premium request count + remote_steerable: + type: boolean + description: Whether this session supports remote steering + via Mission Control + error: + type: object + description: Error details for a failed session + properties: + message: + type: string + description: Error message + description: Sessions associated with this task + examples: + default: + value: + 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: github_resource + data: + id: 42 + type: pull_request + archived_at: + 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' + event_content: Fix the login button on the homepage + head_ref: copilot/fix-1 + base_ref: main + '400': + description: Problems parsing request + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '401': + description: Authentication required + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '403': + description: Insufficient permissions + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '404': + description: Resource not found + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '422': + description: Validation Failed + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation "/app": get: summary: Get the authenticated app @@ -7522,7 +10052,16 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/oidc-custom-sub" + title: Actions OIDC Subject customization + description: Actions OIDC Subject customization + type: object + properties: + include_claim_keys: + description: Array of unique strings. Each claim key can only contain + alphanumeric characters and underscores. + type: array + items: + type: string examples: default: "$ref": "#/components/examples/oidc-custom-sub" @@ -10522,7 +13061,20 @@ paths: default: "$ref": "#/components/examples/artifact-deployment-record-list" '403': - "$ref": "#/components/responses/forbidden" + description: Forbidden + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + examples: + insufficient_repo_permissions: + value: + message: + cause: artifact metadata write permission required on one or + more repositories + repositories: + - 123 + - 345 '404': "$ref": "#/components/responses/not_found" x-github: @@ -17384,7 +19936,7 @@ paths: To use this endpoint, the authenticated user must be one of: - An administrator for the organization. - - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization. + - An organization member (or a member of a team) assigned a custom organization role that includes the **View organization roles** (`read_organization_custom_org_role`) permission. For more information, see "[Permissions for organization access](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/permissions-of-custom-organization-roles#permissions-for-organization-access)." OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: @@ -17602,7 +20154,7 @@ paths: To use this endpoint, the authenticated user must be one of: - An administrator for the organization. - - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization. + - An organization member (or a member of a team) assigned a custom organization role that includes the **View organization roles** (`read_organization_custom_org_role`) permission. For more information, see "[Permissions for organization access](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/permissions-of-custom-organization-roles#permissions-for-organization-access)." OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: @@ -21958,6 +24510,19 @@ paths: must be specified in the list. items: type: string + failover_network_settings_ids: + type: array + minItems: 0 + maxItems: 1 + description: A list of identifiers of the failover network settings + resources to use for the network configuration. Exactly one resource + identifier must be specified in the list. + items: + type: string + failover_network_enabled: + type: boolean + description: Indicates whether the failover network resource is + enabled. required: - name - network_settings_ids @@ -22059,6 +24624,19 @@ paths: must be specified in the list. items: type: string + failover_network_settings_ids: + type: array + minItems: 0 + maxItems: 1 + description: A list of identifiers of the failover network settings + resources to use for the network configuration. Exactly one resource + identifier must be specified in the list. + items: + type: string + failover_network_enabled: + type: boolean + description: Indicates whether the failover network resource is + enabled. examples: default: value: @@ -77645,6 +80223,7 @@ components: - unknown - direct - transitive + - inconclusive security_advisory: "$ref": "#/components/schemas/dependabot-alert-security-advisory" security_vulnerability: @@ -89085,6 +91664,11 @@ components: commit_url: type: string description: The API URL to get the associated commit resource + html_url: + type: string + format: uri + description: The GitHub URL to get the associated commit resource. + example: https://github.com/octocat/Hello-World/blob/af5626b/example/secrets.txt#L1-L1 required: - path - start_line @@ -89155,6 +91739,11 @@ components: format: uri description: The API URL to get the issue where the secret was detected. example: https://api.github.com/repos/octocat/Hello-World/issues/1347 + html_url: + type: string + format: uri + description: The GitHub URL for the issue where the secret was detected. + example: https://github.com/octocat/Hello-World/issues/1 required: - issue_title_url secret-scanning-location-issue-body: @@ -89167,6 +91756,11 @@ components: format: uri description: The API URL to get the issue where the secret was detected. example: https://api.github.com/repos/octocat/Hello-World/issues/1347 + html_url: + type: string + format: uri + description: The GitHub URL for the issue where the secret was detected. + example: https://github.com/octocat/Hello-World/issues/1 required: - issue_body_url secret-scanning-location-issue-comment: @@ -89179,6 +91773,11 @@ components: format: uri description: The API URL to get the issue comment where the secret was detected. example: https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451 + html_url: + type: string + format: uri + description: The GitHub URL for the issue comment where the secret was detected. + example: https://github.com/octocat/Hello-World/issues/1#issuecomment-1081119451 required: - issue_comment_url secret-scanning-location-discussion-title: @@ -89229,6 +91828,11 @@ components: format: uri description: The API URL to get the pull request where the secret was detected. example: https://api.github.com/repos/octocat/Hello-World/pulls/2846 + html_url: + type: string + format: uri + description: The GitHub URL for the pull request where the secret was detected. + example: https://github.com/octocat/Hello-World/pull/2846 required: - pull_request_title_url secret-scanning-location-pull-request-body: @@ -89242,6 +91846,11 @@ components: format: uri description: The API URL to get the pull request where the secret was detected. example: https://api.github.com/repos/octocat/Hello-World/pulls/2846 + html_url: + type: string + format: uri + description: The GitHub URL for the pull request where the secret was detected. + example: https://github.com/octocat/Hello-World/pull/2846 required: - pull_request_body_url secret-scanning-location-pull-request-comment: @@ -89256,6 +91865,12 @@ components: description: The API URL to get the pull request comment where the secret was detected. example: https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451 + html_url: + type: string + format: uri + description: The GitHub URL for the pull request comment where the secret + was detected. + example: https://github.com/octocat/Hello-World/pull/2846#issuecomment-1081119451 required: - pull_request_comment_url secret-scanning-location-pull-request-review: @@ -89270,6 +91885,12 @@ components: description: The API URL to get the pull request review where the secret was detected. example: https://api.github.com/repos/octocat/Hello-World/pulls/2846/reviews/80 + html_url: + type: string + format: uri + description: The GitHub URL for the pull request review where the secret + was detected. + example: https://github.com/octocat/Hello-World/pull/2846#pullrequestreview-80 required: - pull_request_review_url secret-scanning-location-pull-request-review-comment: @@ -89284,6 +91905,12 @@ components: description: The API URL to get the pull request review comment where the secret was detected. example: https://api.github.com/repos/octocat/Hello-World/pulls/comments/12 + html_url: + type: string + format: uri + description: The GitHub URL for the pull request review comment where the + secret was detected. + example: https://github.com/octocat/Hello-World/pull/2846#discussion_r12 required: - pull_request_review_comment_url nullable-secret-scanning-first-detected-location: @@ -95495,6 +98122,7 @@ components: - unknown - direct - transitive + - inconclusive security_advisory: "$ref": "#/components/schemas/dependabot-alert-security-advisory" security_vulnerability: @@ -211416,7 +214044,7 @@ components: - cwe_id: CWE-400 name: Uncontrolled Resource Consumption epss: - - percentage: 0.00045 + percentage: 0.00045 percentile: 0.16001e0 credits: - user: @@ -214446,7 +217074,7 @@ components: vector_string: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N score: 8.7 epss: - - percentage: 0.00045 + percentage: 0.00045 percentile: 0.16001e0 cwes: - cwe_id: CWE-200 @@ -228721,7 +231349,7 @@ components: vector_string: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N score: 8.7 epss: - - percentage: 0.00045 + percentage: 0.00045 percentile: 0.16001e0 cwes: - cwe_id: CWE-200 @@ -228930,7 +231558,7 @@ components: vector_string: CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N score: 8.5 epss: - - percentage: 0.00045 + percentage: 0.00045 percentile: 0.16001e0 cwes: - cwe_id: CWE-532 diff --git a/descriptions/api.github.com/api.github.com.json b/descriptions/api.github.com/api.github.com.json index ddc4f2d845..aa8994f335 100644 --- a/descriptions/api.github.com/api.github.com.json +++ b/descriptions/api.github.com/api.github.com.json @@ -195,6 +195,10 @@ { "name": "projects", "description": "Endpoints to manage Projects using the REST API." + }, + { + "name": "agent-tasks", + "description": "Endpoints to manage and interact with agent tasks." } ], "servers": [ @@ -325,196 +329,3481 @@ "type": "string" } } - ] - } - }, - { - "name": "is_withdrawn", - "in": "query", - "description": "Whether to only return advisories that have been withdrawn.", - "schema": { - "type": "boolean" + ] + } + }, + { + "name": "is_withdrawn", + "in": "query", + "description": "Whether to only return advisories that have been withdrawn.", + "schema": { + "type": "boolean" + } + }, + { + "name": "affects", + "in": "query", + "description": "If specified, only return advisories that affect any of `package` or `package@version`. A maximum of 1000 packages can be specified.\nIf the query parameter causes the URL to exceed the maximum URL length supported by your client, you must specify fewer packages.\n\nExample: `affects=package1,package2@1.0.0,package3@2.0.0` or `affects[]=package1&affects[]=package2@1.0.0`", + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "maxItems": 1000, + "items": { + "type": "string" + } + } + ] + } + }, + { + "name": "published", + "in": "query", + "description": "If specified, only return advisories that were published on a date or date range.\n\nFor more information on the syntax of the date range, see \"[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates).\"", + "schema": { + "type": "string" + } + }, + { + "name": "updated", + "in": "query", + "description": "If specified, only return advisories that were updated on a date or date range.\n\nFor more information on the syntax of the date range, see \"[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates).\"", + "schema": { + "type": "string" + } + }, + { + "name": "modified", + "description": "If specified, only show advisories that were updated or published on a date or date range.\n\nFor more information on the syntax of the date range, see \"[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates).\"", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "epss_percentage", + "in": "query", + "description": "If specified, only return advisories that have an EPSS percentage score that matches the provided value.\nThe EPSS percentage represents the likelihood of a CVE being exploited.", + "schema": { + "type": "string" + } + }, + { + "name": "epss_percentile", + "in": "query", + "description": "If specified, only return advisories that have an EPSS percentile score that matches the provided value.\nThe EPSS percentile represents the relative rank of the CVE's likelihood of being exploited compared to other CVEs.", + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/pagination-before" + }, + { + "$ref": "#/components/parameters/pagination-after" + }, + { + "$ref": "#/components/parameters/direction" + }, + { + "name": "per_page", + "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 30 + } + }, + { + "name": "sort", + "description": "The property to sort the results by.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "updated", + "published", + "epss_percentage", + "epss_percentile" + ], + "default": "published" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/global-advisory" + } + }, + "examples": { + "default": { + "$ref": "#/components/examples/global-advisory-items" + } + } + } + } + }, + "429": { + "description": "Too many requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/basic-error" + } + } + } + }, + "422": { + "$ref": "#/components/responses/validation_failed_simple" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "security-advisories", + "subcategory": "global-advisories" + } + } + }, + "/advisories/{ghsa_id}": { + "get": { + "summary": "Get a global security advisory", + "description": "Gets a global security advisory using its GitHub Security Advisory (GHSA) identifier.", + "tags": [ + "security-advisories" + ], + "operationId": "security-advisories/get-global-advisory", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/security-advisories/global-advisories#get-a-global-security-advisory" + }, + "parameters": [ + { + "$ref": "#/components/parameters/ghsa_id" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/global-advisory" + }, + "examples": { + "default": { + "$ref": "#/components/examples/global-advisory" + } + } + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "security-advisories", + "subcategory": "global-advisories" + } + } + }, + "/agents/repos/{owner}/{repo}/tasks": { + "get": { + "summary": "List tasks for repository", + "description": "Returns a list of tasks for a specific repository", + "tags": [ + "agent-tasks" + ], + "operationId": "agent-tasks/list-tasks-for-repo", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/agent-tasks/agent-tasks#list-tasks-for-repository" + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "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" + }, + "description": "Filter by archived status. When `true`, returns only archived tasks. When `false`, returns only non-archived tasks." + }, + { + "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" + } + ], + "responses": { + "200": { + "description": "Tasks retrieved successfully", + "headers": { + "Link": { + "description": "Pagination links. Contains rel=\"first\" (always),\nrel=\"prev\" (when current page > 1),\nrel=\"next\" (when more pages exist), and rel=\"last\" (when on the final page).\n", + "schema": { + "type": "string" + }, + "example": "; rel=\"next\", ; rel=\"first\"" + } + }, + "content": { + "application/json": { + "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": { + "description": "The entity who created this task", + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "The unique identifier of the user" + } + } + }, + "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": [ + "github_resource", + "branch" + ], + "description": "Discriminator for data shape" + }, + "data": { + "oneOf": [ + { + "type": "object", + "description": "A GitHub resource (pull request, issue, etc.)", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "GitHub resource ID" + }, + "type": { + "type": "string", + "description": "Resource type (e.g., pull_request, issue)" + }, + "global_id": { + "type": "string", + "description": "GraphQL global ID" + } + } + }, + { + "type": "object", + "description": "A Git branch reference", + "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", + "format": "date-time", + "nullable": true, + "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" + }, + "remote_steerable": { + "type": "boolean", + "description": "Whether the latest session in this task supports remote steering via Mission Control" + } + } + }, + "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" + } + } + }, + "examples": { + "default": { + "value": { + "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": "github_resource", + "data": { + "id": 42, + "type": "pull_request" + } + } + ], + "archived_at": null, + "created_at": "2025-01-01T00:00:00Z", + "updated_at": "2025-01-01T01:00:00Z" + } + ] + } + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "403": { + "description": "Insufficient permissions", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "422": { + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + } + } + }, + "post": { + "summary": "Create a task", + "description": "Creates a new task for a repository", + "tags": [ + "agent-tasks" + ], + "operationId": "agent-tasks/create-task", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/agent-tasks/agent-tasks#create-a-task" + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "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." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "event_content" + ], + "properties": { + "agent_id": { + "type": "integer", + "format": "int64", + "description": "Agent ID (optional, defaults to coding agent)" + }, + "problem_statement": { + "type": "string", + "description": "Additional prompting for the agent" + }, + "event_content": { + "type": "string", + "description": "User's written prompt" + }, + "model": { + "type": "string", + "description": "Model identifier" + }, + "custom_agent": { + "type": "string", + "description": "Custom agent identifier" + }, + "create_pull_request": { + "type": "boolean", + "description": "Whether to create a PR" + }, + "base_ref": { + "type": "string", + "description": "Base ref for new branch/PR" + }, + "event_type": { + "type": "string", + "description": "Type of event" + }, + "event_url": { + "type": "string", + "description": "URL of the triggering event" + }, + "event_identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Identifiers for tracking" + } + } + }, + "examples": { + "default": { + "value": { + "event_content": "Fix the login button on the homepage", + "create_pull_request": true, + "base_ref": "main" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Task created successfully", + "content": { + "application/json": { + "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": { + "description": "The entity who created this task", + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "The unique identifier of the user" + } + } + }, + "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": [ + "github_resource", + "branch" + ], + "description": "Discriminator for data shape" + }, + "data": { + "oneOf": [ + { + "type": "object", + "description": "A GitHub resource (pull request, issue, etc.)", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "GitHub resource ID" + }, + "type": { + "type": "string", + "description": "Resource type (e.g., pull_request, issue)" + }, + "global_id": { + "type": "string", + "description": "GraphQL global ID" + } + } + }, + { + "type": "object", + "description": "A Git branch reference", + "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", + "format": "date-time", + "nullable": true, + "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" + }, + "remote_steerable": { + "type": "boolean", + "description": "Whether the latest session in this task supports remote steering via Mission Control" + } + } + }, + "examples": { + "default": { + "value": { + "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" + } + } + } + } + } + }, + "400": { + "description": "Problems parsing JSON", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "403": { + "description": "Insufficient permissions", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "422": { + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + } + } + } + }, + "/agents/repos/{owner}/{repo}/tasks/{task_id}": { + "get": { + "summary": "Get a task by repo", + "description": "Returns a task by ID scoped to an owner/repo path", + "tags": [ + "agent-tasks" + ], + "operationId": "agent-tasks/get-task-by-repo-and-id", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/agent-tasks/agent-tasks#get-a-task-by-repo" + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "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." + } + ], + "responses": { + "200": { + "description": "Task retrieved successfully", + "content": { + "application/json": { + "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": { + "description": "The entity who created this task", + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "The unique identifier of the user" + } + } + }, + "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": [ + "github_resource", + "branch" + ], + "description": "Discriminator for data shape" + }, + "data": { + "oneOf": [ + { + "type": "object", + "description": "A GitHub resource (pull request, issue, etc.)", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "GitHub resource ID" + }, + "type": { + "type": "string", + "description": "Resource type (e.g., pull_request, issue)" + }, + "global_id": { + "type": "string", + "description": "GraphQL global ID" + } + } + }, + { + "type": "object", + "description": "A Git branch reference", + "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", + "format": "date-time", + "nullable": true, + "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" + }, + "remote_steerable": { + "type": "boolean", + "description": "Whether the latest session in this task supports remote steering via Mission Control" + } + } + }, + { + "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" + } + } + }, + "agent_id": { + "type": "integer", + "format": "int64", + "description": "Agent ID" + }, + "agent_task_id": { + "type": "string", + "description": "Agent internal task ID" + }, + "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" + }, + "event_type": { + "type": "string", + "description": "Type of event that triggered this session" + }, + "event_url": { + "type": "string", + "description": "URL of the triggering event" + }, + "event_content": { + "type": "string", + "description": "Content of the triggering event" + }, + "event_identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Identifiers for tracking" + }, + "resource_type": { + "type": "string", + "description": "Type of resource associated with this session" + }, + "resource_id": { + "type": "integer", + "format": "int64", + "description": "Resource ID" + }, + "resource_number": { + "type": "integer", + "format": "int32", + "description": "Resource number (e.g., PR number)" + }, + "resource_global_id": { + "type": "string", + "description": "GraphQL global ID of the resource" + }, + "resource_state": { + "type": "string", + "description": "State of the associated resource" + }, + "head_ref": { + "type": "string", + "description": "Head branch name" + }, + "base_ref": { + "type": "string", + "description": "Base branch name" + }, + "workflow_run_id": { + "type": "integer", + "format": "int64", + "description": "GitHub Actions workflow run ID" + }, + "model": { + "type": "string", + "description": "Model used for this session" + }, + "premium_requests": { + "type": "number", + "format": "double", + "description": "Premium request count" + }, + "remote_steerable": { + "type": "boolean", + "description": "Whether this session supports remote steering via Mission Control" + }, + "error": { + "type": "object", + "description": "Error details for a failed session", + "properties": { + "message": { + "type": "string", + "description": "Error message" + } + } + } + } + }, + "description": "Sessions associated with this task" + } + } + } + ] + }, + "examples": { + "default": { + "value": { + "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": "github_resource", + "data": { + "id": 42, + "type": "pull_request" + } + } + ], + "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", + "event_content": "Fix the login button on the homepage", + "head_ref": "copilot/fix-1", + "base_ref": "main" + } + ] + } + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "403": { + "description": "Insufficient permissions", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } } }, - { - "name": "affects", - "in": "query", - "description": "If specified, only return advisories that affect any of `package` or `package@version`. A maximum of 1000 packages can be specified.\nIf the query parameter causes the URL to exceed the maximum URL length supported by your client, you must specify fewer packages.\n\nExample: `affects=package1,package2@1.0.0,package3@2.0.0` or `affects[]=package1&affects[]=package2@1.0.0`", - "schema": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "maxItems": 1000, - "items": { - "type": "string" + "422": { + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } } } - ] + } } - }, + } + } + } + }, + "/agents/tasks": { + "get": { + "summary": "List tasks", + "description": "Returns a list of tasks for the authenticated user", + "tags": [ + "agent-tasks" + ], + "operationId": "agent-tasks/list-tasks", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/agent-tasks/agent-tasks#list-tasks" + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "agent-tasks", + "subcategory": "agent-tasks" + }, + "parameters": [ { - "name": "published", + "name": "per_page", "in": "query", - "description": "If specified, only return advisories that were published on a date or date range.\n\nFor more information on the syntax of the date range, see \"[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates).\"", "schema": { - "type": "string" - } + "type": "integer", + "default": 30, + "minimum": 1, + "maximum": 100 + }, + "description": "The number of results per page (max 100)." }, { - "name": "updated", + "name": "page", "in": "query", - "description": "If specified, only return advisories that were updated on a date or date range.\n\nFor more information on the syntax of the date range, see \"[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates).\"", "schema": { - "type": "string" - } + "type": "integer", + "default": 1, + "minimum": 1 + }, + "description": "The page number of the results to fetch." }, { - "name": "modified", - "description": "If specified, only show advisories that were updated or published on a date or date range.\n\nFor more information on the syntax of the date range, see \"[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates).\"", + "name": "sort", "in": "query", "schema": { - "type": "string" - } + "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": "epss_percentage", + "name": "direction", "in": "query", - "description": "If specified, only return advisories that have an EPSS percentage score that matches the provided value.\nThe EPSS percentage represents the likelihood of a CVE being exploited.", "schema": { - "type": "string" - } + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ] + }, + "description": "The direction to sort results. Can be `asc` or `desc`." }, { - "name": "epss_percentile", + "name": "state", "in": "query", - "description": "If specified, only return advisories that have an EPSS percentile score that matches the provided value.\nThe EPSS percentile represents the relative rank of the CVE's likelihood of being exploited compared to other CVEs.", "schema": { "type": "string" - } - }, - { - "$ref": "#/components/parameters/pagination-before" - }, - { - "$ref": "#/components/parameters/pagination-after" - }, - { - "$ref": "#/components/parameters/direction" + }, + "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": "per_page", - "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "name": "is_archived", "in": "query", "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 30 - } + "type": "boolean" + }, + "description": "Filter by archived status. When `true`, returns only archived tasks. When `false`, returns only non-archived tasks." }, { - "name": "sort", - "description": "The property to sort the results by.", + "name": "since", "in": "query", - "required": false, "schema": { "type": "string", - "enum": [ - "updated", - "published", - "epss_percentage", - "epss_percentile" - ], - "default": "published" - } + "format": "date-time" + }, + "description": "Only show tasks updated at or after this time (ISO 8601 timestamp)" } ], "responses": { "200": { - "description": "Response", + "description": "Tasks retrieved successfully", + "headers": { + "Link": { + "description": "Pagination links. Contains rel=\"first\" (always),\nrel=\"next\" (when more pages exist), and rel=\"last\" (when on the final page).\n", + "schema": { + "type": "string" + }, + "example": "; rel=\"next\", ; rel=\"first\"" + } + }, "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/global-advisory" + "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": { + "description": "The entity who created this task", + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "The unique identifier of the user" + } + } + }, + "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": [ + "github_resource", + "branch" + ], + "description": "Discriminator for data shape" + }, + "data": { + "oneOf": [ + { + "type": "object", + "description": "A GitHub resource (pull request, issue, etc.)", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "GitHub resource ID" + }, + "type": { + "type": "string", + "description": "Resource type (e.g., pull_request, issue)" + }, + "global_id": { + "type": "string", + "description": "GraphQL global ID" + } + } + }, + { + "type": "object", + "description": "A Git branch reference", + "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", + "format": "date-time", + "nullable": true, + "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" + }, + "remote_steerable": { + "type": "boolean", + "description": "Whether the latest session in this task supports remote steering via Mission Control" + } + } + }, + "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" + } } }, "examples": { "default": { - "$ref": "#/components/examples/global-advisory-items" + "value": { + "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": "github_resource", + "data": { + "id": 42, + "type": "pull_request" + } + } + ], + "archived_at": null, + "created_at": "2025-01-01T00:00:00Z", + "updated_at": "2025-01-01T01:00:00Z" + } + ] + } } } } } }, - "429": { - "description": "Too many requests", + "400": { + "description": "Bad request", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/basic-error" + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "403": { + "description": "Insufficient permissions", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } } } } }, "422": { - "$ref": "#/components/responses/validation_failed_simple" + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } } - }, - "x-github": { - "githubCloudOnly": false, - "enabledForGitHubApps": true, - "category": "security-advisories", - "subcategory": "global-advisories" } } }, - "/advisories/{ghsa_id}": { + "/agents/tasks/{task_id}": { "get": { - "summary": "Get a global security advisory", - "description": "Gets a global security advisory using its GitHub Security Advisory (GHSA) identifier.", + "summary": "Get a task by ID", + "description": "Returns a task by ID with its associated sessions", "tags": [ - "security-advisories" + "agent-tasks" ], - "operationId": "security-advisories/get-global-advisory", + "operationId": "agent-tasks/get-task-by-id", "externalDocs": { "description": "API method documentation", - "url": "https://docs.github.com/rest/security-advisories/global-advisories#get-a-global-security-advisory" + "url": "https://docs.github.com/rest/agent-tasks/agent-tasks#get-a-task-by-id" + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "agent-tasks", + "subcategory": "agent-tasks" }, "parameters": [ { - "$ref": "#/components/parameters/ghsa_id" + "name": "task_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The unique identifier of the task." } ], "responses": { "200": { - "description": "Response", + "description": "Task retrieved successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/global-advisory" + "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": { + "description": "The entity who created this task", + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "The unique identifier of the user" + } + } + }, + "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": [ + "github_resource", + "branch" + ], + "description": "Discriminator for data shape" + }, + "data": { + "oneOf": [ + { + "type": "object", + "description": "A GitHub resource (pull request, issue, etc.)", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "GitHub resource ID" + }, + "type": { + "type": "string", + "description": "Resource type (e.g., pull_request, issue)" + }, + "global_id": { + "type": "string", + "description": "GraphQL global ID" + } + } + }, + { + "type": "object", + "description": "A Git branch reference", + "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", + "format": "date-time", + "nullable": true, + "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" + }, + "remote_steerable": { + "type": "boolean", + "description": "Whether the latest session in this task supports remote steering via Mission Control" + } + } + }, + { + "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" + } + } + }, + "agent_id": { + "type": "integer", + "format": "int64", + "description": "Agent ID" + }, + "agent_task_id": { + "type": "string", + "description": "Agent internal task ID" + }, + "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" + }, + "event_type": { + "type": "string", + "description": "Type of event that triggered this session" + }, + "event_url": { + "type": "string", + "description": "URL of the triggering event" + }, + "event_content": { + "type": "string", + "description": "Content of the triggering event" + }, + "event_identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Identifiers for tracking" + }, + "resource_type": { + "type": "string", + "description": "Type of resource associated with this session" + }, + "resource_id": { + "type": "integer", + "format": "int64", + "description": "Resource ID" + }, + "resource_number": { + "type": "integer", + "format": "int32", + "description": "Resource number (e.g., PR number)" + }, + "resource_global_id": { + "type": "string", + "description": "GraphQL global ID of the resource" + }, + "resource_state": { + "type": "string", + "description": "State of the associated resource" + }, + "head_ref": { + "type": "string", + "description": "Head branch name" + }, + "base_ref": { + "type": "string", + "description": "Base branch name" + }, + "workflow_run_id": { + "type": "integer", + "format": "int64", + "description": "GitHub Actions workflow run ID" + }, + "model": { + "type": "string", + "description": "Model used for this session" + }, + "premium_requests": { + "type": "number", + "format": "double", + "description": "Premium request count" + }, + "remote_steerable": { + "type": "boolean", + "description": "Whether this session supports remote steering via Mission Control" + }, + "error": { + "type": "object", + "description": "Error details for a failed session", + "properties": { + "message": { + "type": "string", + "description": "Error message" + } + } + } + } + }, + "description": "Sessions associated with this task" + } + } + } + ] }, "examples": { "default": { - "$ref": "#/components/examples/global-advisory" + "value": { + "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": "github_resource", + "data": { + "id": 42, + "type": "pull_request" + } + } + ], + "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", + "event_content": "Fix the login button on the homepage", + "head_ref": "copilot/fix-1", + "base_ref": "main" + } + ] + } + } + } + } + } + }, + "400": { + "description": "Problems parsing request", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "403": { + "description": "Insufficient permissions", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } } } } } }, "404": { - "$ref": "#/components/responses/not_found" + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } + }, + "422": { + "description": "Validation Failed", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string", + "description": "Summary message (e.g. \"Validation Failed\", \"Not Found\")" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "description": "A single validation error", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "missing", + "missing_field", + "invalid", + "already_exists", + "unprocessable", + "custom" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable message (populated when code is \"custom\")" + } + } + }, + "description": "List of validation errors (present only for 422 responses)" + }, + "documentation_url": { + "type": "string", + "description": "URL to relevant API documentation" + } + } + } + } + } } - }, - "x-github": { - "githubCloudOnly": false, - "enabledForGitHubApps": true, - "category": "security-advisories", - "subcategory": "global-advisories" } } }, @@ -10551,7 +13840,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/oidc-custom-sub" + "title": "Actions OIDC Subject customization", + "description": "Actions OIDC Subject customization", + "type": "object", + "properties": { + "include_claim_keys": { + "description": "Array of unique strings. Each claim key can only contain alphanumeric characters and underscores.", + "type": "array", + "items": { + "type": "string" + } + } + } }, "examples": { "default": { @@ -14378,206 +17678,226 @@ } }, "403": { - "$ref": "#/components/responses/forbidden" - }, - "404": { - "$ref": "#/components/responses/not_found" - } - }, - "x-github": { - "githubCloudOnly": false, - "enabledForGitHubApps": true, - "category": "orgs", - "subcategory": "artifact-metadata" - } - } - }, - "/orgs/{org}/artifacts/metadata/deployment-record/cluster/{cluster}": { - "post": { - "summary": "Set cluster deployment records", - "description": "Set deployment records for a given cluster.\nIf proposed records in the 'deployments' field have identical 'cluster', 'logical_environment',\n'physical_environment', and 'deployment_name' values as existing records, the existing records will be updated.\nIf no existing records match, new records will be created.", - "tags": [ - "orgs" - ], - "operationId": "orgs/set-cluster-deployment-records", - "externalDocs": { - "description": "API method documentation", - "url": "https://docs.github.com/rest/orgs/artifact-metadata#set-cluster-deployment-records" - }, - "parameters": [ - { - "$ref": "#/components/parameters/org" - }, - { - "name": "cluster", - "in": "path", - "description": "The cluster name.", - "required": true, - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 128, - "pattern": "^[a-zA-Z0-9._-]+$" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "logical_environment": { - "type": "string", - "description": "The stage of the deployment.", - "minLength": 1, - "maxLength": 128 - }, - "physical_environment": { - "type": "string", - "description": "The physical region of the deployment.", - "maxLength": 128 - }, - "deployments": { - "type": "array", - "description": "The list of deployments to record.", - "maxItems": 1000, - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the artifact. Note that if multiple deployments have identical 'digest' parameter values,\nthe name parameter must also be identical across all entries.\n", - "minLength": 1, - "maxLength": 256 - }, - "digest": { - "type": "string", - "description": "The hex encoded digest of the artifact. Note that if multiple deployments have identical 'digest' parameter values,\nthe name and version parameters must also be identical across all entries.\n", - "minLength": 71, - "maxLength": 71, - "pattern": "^sha256:[a-f0-9]{64}$" - }, - "version": { - "type": "string", - "description": "The artifact version. Note that if multiple deployments have identical 'digest' parameter values,\nthe version parameter must also be identical across all entries.\n", - "maxLength": 100, - "x-multi-segment": true, - "example": "1.2.3" - }, - "status": { - "type": "string", - "description": "The deployment status of the artifact.", - "default": "deployed", - "enum": [ - "deployed", - "decommissioned" - ] - }, - "deployment_name": { - "type": "string", - "description": "The unique identifier for the deployment represented by the new record. To accommodate differing\ncontainers and namespaces within a record set, the following format is recommended:\n{namespaceName}-{deploymentName}-{containerName}.\nThe deployment_name must be unique across all entries in the deployments array.\n", - "minLength": 1, - "maxLength": 256 - }, - "github_repository": { - "type": "string", - "description": "The name of the GitHub repository associated with the artifact. This should be used\nwhen there are no provenance attestations available for the artifact. The repository\nmust belong to the organization specified in the path parameter.\n\nIf a provenance attestation is available for the artifact, the API will use\nthe repository information from the attestation instead of this parameter.", - "maxLength": 100, - "pattern": "^[A-Za-z0-9.\\-_]+$", - "example": "my-github-repo" - }, - "tags": { - "type": "object", - "description": "Key-value pairs to tag the deployment record.", - "additionalProperties": { - "type": "string" - } - }, - "runtime_risks": { - "type": "array", - "description": "A list of runtime risks associated with the deployment.", - "maxItems": 4, - "uniqueItems": true, - "items": { - "type": "string", - "enum": [ - "critical-resource", - "internet-exposed", - "lateral-movement", - "sensitive-data" - ] - } - } - }, - "required": [ - "name", - "deployment_name", - "digest" - ] - } - } - }, - "required": [ - "logical_environment", - "deployments" - ] - }, - "examples": { - "default": { - "value": { - "logical_environment": "prod", - "physical_environment": "pacific-east", - "deployments": [ - { - "name": "awesome-image", - "digest": "sha256:1bb1e949e55dcefc6353e7b36c8897d2a107d8e8dca49d4e3c0ea8493fc0bc72", - "version": "2.1.0", - "status": "deployed", - "deployment_name": "deployment-pod", - "tags": { - "runtime-risk": "sensitive-data" - } - } - ] - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Deployment records created or updated successfully.\n", + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "orgs", + "subcategory": "artifact-metadata" + } + } + }, + "/orgs/{org}/artifacts/metadata/deployment-record/cluster/{cluster}": { + "post": { + "summary": "Set cluster deployment records", + "description": "Set deployment records for a given cluster.\nIf proposed records in the 'deployments' field have identical 'cluster', 'logical_environment',\n'physical_environment', and 'deployment_name' values as existing records, the existing records will be updated.\nIf no existing records match, new records will be created.", + "tags": [ + "orgs" + ], + "operationId": "orgs/set-cluster-deployment-records", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/orgs/artifact-metadata#set-cluster-deployment-records" + }, + "parameters": [ + { + "$ref": "#/components/parameters/org" + }, + { + "name": "cluster", + "in": "path", + "description": "The cluster name.", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 128, + "pattern": "^[a-zA-Z0-9._-]+$" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "logical_environment": { + "type": "string", + "description": "The stage of the deployment.", + "minLength": 1, + "maxLength": 128 + }, + "physical_environment": { + "type": "string", + "description": "The physical region of the deployment.", + "maxLength": 128 + }, + "deployments": { + "type": "array", + "description": "The list of deployments to record.", + "maxItems": 1000, + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the artifact. Note that if multiple deployments have identical 'digest' parameter values,\nthe name parameter must also be identical across all entries.\n", + "minLength": 1, + "maxLength": 256 + }, + "digest": { + "type": "string", + "description": "The hex encoded digest of the artifact. Note that if multiple deployments have identical 'digest' parameter values,\nthe name and version parameters must also be identical across all entries.\n", + "minLength": 71, + "maxLength": 71, + "pattern": "^sha256:[a-f0-9]{64}$" + }, + "version": { + "type": "string", + "description": "The artifact version. Note that if multiple deployments have identical 'digest' parameter values,\nthe version parameter must also be identical across all entries.\n", + "maxLength": 100, + "x-multi-segment": true, + "example": "1.2.3" + }, + "status": { + "type": "string", + "description": "The deployment status of the artifact.", + "default": "deployed", + "enum": [ + "deployed", + "decommissioned" + ] + }, + "deployment_name": { + "type": "string", + "description": "The unique identifier for the deployment represented by the new record. To accommodate differing\ncontainers and namespaces within a record set, the following format is recommended:\n{namespaceName}-{deploymentName}-{containerName}.\nThe deployment_name must be unique across all entries in the deployments array.\n", + "minLength": 1, + "maxLength": 256 + }, + "github_repository": { + "type": "string", + "description": "The name of the GitHub repository associated with the artifact. This should be used\nwhen there are no provenance attestations available for the artifact. The repository\nmust belong to the organization specified in the path parameter.\n\nIf a provenance attestation is available for the artifact, the API will use\nthe repository information from the attestation instead of this parameter.", + "maxLength": 100, + "pattern": "^[A-Za-z0-9.\\-_]+$", + "example": "my-github-repo" + }, + "tags": { + "type": "object", + "description": "Key-value pairs to tag the deployment record.", + "additionalProperties": { + "type": "string" + } + }, + "runtime_risks": { + "type": "array", + "description": "A list of runtime risks associated with the deployment.", + "maxItems": 4, + "uniqueItems": true, + "items": { + "type": "string", + "enum": [ + "critical-resource", + "internet-exposed", + "lateral-movement", + "sensitive-data" + ] + } + } + }, + "required": [ + "name", + "deployment_name", + "digest" + ] + } + } + }, + "required": [ + "logical_environment", + "deployments" + ] + }, + "examples": { + "default": { + "value": { + "logical_environment": "prod", + "physical_environment": "pacific-east", + "deployments": [ + { + "name": "awesome-image", + "digest": "sha256:1bb1e949e55dcefc6353e7b36c8897d2a107d8e8dca49d4e3c0ea8493fc0bc72", + "version": "2.1.0", + "status": "deployed", + "deployment_name": "deployment-pod", + "tags": { + "runtime-risk": "sensitive-data" + } + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Deployment records created or updated successfully.\n", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "total_count": { + "description": "The number of deployment records created", + "type": "integer" + }, + "deployment_records": { + "type": "array", + "items": { + "$ref": "#/components/schemas/artifact-deployment-record" + } + } + } + }, + "examples": { + "default": { + "$ref": "#/components/examples/artifact-deployment-record-list" + } + } + } + } + }, + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "total_count": { - "description": "The number of deployment records created", - "type": "integer" - }, - "deployment_records": { - "type": "array", - "items": { - "$ref": "#/components/schemas/artifact-deployment-record" - } - } - } + "$ref": "#/components/schemas/basic-error" }, "examples": { - "default": { - "$ref": "#/components/examples/artifact-deployment-record-list" + "insufficient_repo_permissions": { + "value": { + "message": { + "cause": "artifact metadata write permission required on one or more repositories", + "repositories": [ + 123, + 345 + ] + } + } } } } } }, - "403": { - "$ref": "#/components/responses/forbidden" - }, "404": { "$ref": "#/components/responses/not_found" } @@ -24102,7 +27422,7 @@ "/orgs/{org}/organization-roles": { "get": { "summary": "Get all organization roles for an organization", - "description": "Lists the organization roles available in this organization. For more information on organization roles, see \"[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles).\"\n\nTo use this endpoint, the authenticated user must be one of:\n\n- An administrator for the organization.\n- A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization.\n\nOAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.", + "description": "Lists the organization roles available in this organization. For more information on organization roles, see \"[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles).\"\n\nTo use this endpoint, the authenticated user must be one of:\n\n- An administrator for the organization.\n- An organization member (or a member of a team) assigned a custom organization role that includes the **View organization roles** (`read_organization_custom_org_role`) permission. For more information, see \"[Permissions for organization access](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/permissions-of-custom-organization-roles#permissions-for-organization-access).\"\n\nOAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.", "tags": [ "orgs" ], @@ -24381,7 +27701,7 @@ "/orgs/{org}/organization-roles/{role_id}": { "get": { "summary": "Get an organization role", - "description": "Gets an organization role that is available to this organization. For more information on organization roles, see \"[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles).\"\n\nTo use this endpoint, the authenticated user must be one of:\n\n- An administrator for the organization.\n- A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization.\n\nOAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.", + "description": "Gets an organization role that is available to this organization. For more information on organization roles, see \"[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles).\"\n\nTo use this endpoint, the authenticated user must be one of:\n\n- An administrator for the organization.\n- An organization member (or a member of a team) assigned a custom organization role that includes the **View organization roles** (`read_organization_custom_org_role`) permission. For more information, see \"[Permissions for organization access](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/permissions-of-custom-organization-roles#permissions-for-organization-access).\"\n\nOAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.", "tags": [ "orgs" ], @@ -30496,6 +33816,19 @@ "items": { "type": "string" } + }, + "failover_network_settings_ids": { + "type": "array", + "minItems": 0, + "maxItems": 1, + "description": "A list of identifiers of the failover network settings resources to use for the network configuration. Exactly one resource identifier must be specified in the list.", + "items": { + "type": "string" + } + }, + "failover_network_enabled": { + "type": "boolean", + "description": "Indicates whether the failover network resource is enabled." } }, "required": [ @@ -30637,6 +33970,19 @@ "items": { "type": "string" } + }, + "failover_network_settings_ids": { + "type": "array", + "minItems": 0, + "maxItems": 1, + "description": "A list of identifiers of the failover network settings resources to use for the network configuration. Exactly one resource identifier must be specified in the list.", + "items": { + "type": "string" + } + }, + "failover_network_enabled": { + "type": "boolean", + "description": "Indicates whether the failover network resource is enabled." } } }, @@ -107740,7 +111086,8 @@ "enum": [ "unknown", "direct", - "transitive" + "transitive", + "inconclusive" ] } } @@ -122993,6 +126340,12 @@ "commit_url": { "type": "string", "description": "The API URL to get the associated commit resource" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL to get the associated commit resource.", + "example": "https://github.com/octocat/Hello-World/blob/af5626b/example/secrets.txt#L1-L1" } }, "required": [ @@ -123074,6 +126427,12 @@ "format": "uri", "description": "The API URL to get the issue where the secret was detected.", "example": "https://api.github.com/repos/octocat/Hello-World/issues/1347" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL for the issue where the secret was detected.", + "example": "https://github.com/octocat/Hello-World/issues/1" } }, "required": [ @@ -123089,6 +126448,12 @@ "format": "uri", "description": "The API URL to get the issue where the secret was detected.", "example": "https://api.github.com/repos/octocat/Hello-World/issues/1347" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL for the issue where the secret was detected.", + "example": "https://github.com/octocat/Hello-World/issues/1" } }, "required": [ @@ -123104,6 +126469,12 @@ "format": "uri", "description": "The API URL to get the issue comment where the secret was detected.", "example": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL for the issue comment where the secret was detected.", + "example": "https://github.com/octocat/Hello-World/issues/1#issuecomment-1081119451" } }, "required": [ @@ -123164,6 +126535,12 @@ "format": "uri", "description": "The API URL to get the pull request where the secret was detected.", "example": "https://api.github.com/repos/octocat/Hello-World/pulls/2846" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL for the pull request where the secret was detected.", + "example": "https://github.com/octocat/Hello-World/pull/2846" } }, "required": [ @@ -123179,6 +126556,12 @@ "format": "uri", "description": "The API URL to get the pull request where the secret was detected.", "example": "https://api.github.com/repos/octocat/Hello-World/pulls/2846" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL for the pull request where the secret was detected.", + "example": "https://github.com/octocat/Hello-World/pull/2846" } }, "required": [ @@ -123194,6 +126577,12 @@ "format": "uri", "description": "The API URL to get the pull request comment where the secret was detected.", "example": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL for the pull request comment where the secret was detected.", + "example": "https://github.com/octocat/Hello-World/pull/2846#issuecomment-1081119451" } }, "required": [ @@ -123209,6 +126598,12 @@ "format": "uri", "description": "The API URL to get the pull request review where the secret was detected.", "example": "https://api.github.com/repos/octocat/Hello-World/pulls/2846/reviews/80" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL for the pull request review where the secret was detected.", + "example": "https://github.com/octocat/Hello-World/pull/2846#pullrequestreview-80" } }, "required": [ @@ -123224,6 +126619,12 @@ "format": "uri", "description": "The API URL to get the pull request review comment where the secret was detected.", "example": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/12" + }, + "html_url": { + "type": "string", + "format": "uri", + "description": "The GitHub URL for the pull request review comment where the secret was detected.", + "example": "https://github.com/octocat/Hello-World/pull/2846#discussion_r12" } }, "required": [ @@ -131431,7 +134832,8 @@ "enum": [ "unknown", "direct", - "transitive" + "transitive", + "inconclusive" ] } } @@ -286490,12 +289892,10 @@ "name": "Uncontrolled Resource Consumption" } ], - "epss": [ - { - "percentage": 0.00045, - "percentile": "0.16001e0" - } - ], + "epss": { + "percentage": 0.00045, + "percentile": "0.16001e0" + }, "credits": [ { "user": { @@ -289645,12 +293045,10 @@ "score": 8.7 } }, - "epss": [ - { - "percentage": 0.00045, - "percentile": "0.16001e0" - } - ], + "epss": { + "percentage": 0.00045, + "percentile": "0.16001e0" + }, "cwes": [ { "cwe_id": "CWE-200", @@ -306380,12 +309778,10 @@ "score": 8.7 } }, - "epss": [ - { - "percentage": 0.00045, - "percentile": "0.16001e0" - } - ], + "epss": { + "percentage": 0.00045, + "percentile": "0.16001e0" + }, "cwes": [ { "cwe_id": "CWE-200", @@ -306673,12 +310069,10 @@ "score": 8.5 } }, - "epss": [ - { - "percentage": 0.00045, - "percentile": "0.16001e0" - } - ], + "epss": { + "percentage": 0.00045, + "percentile": "0.16001e0" + }, "cwes": [ { "cwe_id": "CWE-532", diff --git a/descriptions/api.github.com/api.github.com.yaml b/descriptions/api.github.com/api.github.com.yaml index 3e340ede77..f5f933a8cb 100644 --- a/descriptions/api.github.com/api.github.com.yaml +++ b/descriptions/api.github.com/api.github.com.yaml @@ -103,6 +103,8 @@ tags: description: Endpoints to manage campaigns via the REST API. - name: projects description: Endpoints to manage Projects using the REST API. +- name: agent-tasks + description: Endpoints to manage and interact with agent tasks. servers: - url: https://api.github.com externalDocs: @@ -336,6 +338,2534 @@ paths: enabledForGitHubApps: true category: security-advisories subcategory: global-advisories + "/agents/repos/{owner}/{repo}/tasks": + get: + summary: List tasks for repository + description: Returns a list of tasks for a specific repository + tags: + - agent-tasks + operationId: agent-tasks/list-tasks-for-repo + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/agent-tasks/agent-tasks#list-tasks-for-repository + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + 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 + description: Filter by archived status. When `true`, returns only archived + tasks. When `false`, returns only non-archived tasks. + - 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 + responses: + '200': + description: Tasks retrieved successfully + headers: + Link: + description: | + Pagination links. Contains rel="first" (always), + rel="prev" (when current page > 1), + rel="next" (when more pages exist), and rel="last" (when on the final page). + schema: + type: string + example: ; + rel="next", ; + rel="first" + content: + application/json: + 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: + description: The entity who created this task + type: object + properties: + id: + type: integer + format: int64 + description: The unique identifier of the user + 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: + - github_resource + - branch + description: Discriminator for data shape + data: + oneOf: + - type: object + description: A GitHub resource (pull request, issue, + etc.) + properties: + id: + type: integer + format: int64 + description: GitHub resource ID + type: + type: string + description: Resource type (e.g., pull_request, + issue) + global_id: + type: string + description: GraphQL global ID + - type: object + description: A Git branch reference + 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 + format: date-time + nullable: true + 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 + remote_steerable: + type: boolean + description: Whether the latest session in this task supports + remote steering via Mission Control + 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 + examples: + default: + value: + 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: github_resource + data: + id: 42 + type: pull_request + archived_at: + created_at: '2025-01-01T00:00:00Z' + updated_at: '2025-01-01T01:00:00Z' + '400': + description: Bad request + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '401': + description: Authentication required + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '403': + description: Insufficient permissions + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '404': + description: Resource not found + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '422': + description: Validation Failed + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + post: + summary: Create a task + description: Creates a new task for a repository + tags: + - agent-tasks + operationId: agent-tasks/create-task + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/agent-tasks/agent-tasks#create-a-task + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + 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. + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - event_content + properties: + agent_id: + type: integer + format: int64 + description: Agent ID (optional, defaults to coding agent) + problem_statement: + type: string + description: Additional prompting for the agent + event_content: + type: string + description: User's written prompt + model: + type: string + description: Model identifier + custom_agent: + type: string + description: Custom agent identifier + create_pull_request: + type: boolean + description: Whether to create a PR + base_ref: + type: string + description: Base ref for new branch/PR + event_type: + type: string + description: Type of event + event_url: + type: string + description: URL of the triggering event + event_identifiers: + type: array + items: + type: string + description: Identifiers for tracking + examples: + default: + value: + event_content: Fix the login button on the homepage + create_pull_request: true + base_ref: main + responses: + '201': + description: Task created successfully + content: + application/json: + 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: + description: The entity who created this task + type: object + properties: + id: + type: integer + format: int64 + description: The unique identifier of the user + 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: + - github_resource + - branch + description: Discriminator for data shape + data: + oneOf: + - type: object + description: A GitHub resource (pull request, issue, etc.) + properties: + id: + type: integer + format: int64 + description: GitHub resource ID + type: + type: string + description: Resource type (e.g., pull_request, issue) + global_id: + type: string + description: GraphQL global ID + - type: object + description: A Git branch reference + 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 + format: date-time + nullable: true + 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 + remote_steerable: + type: boolean + description: Whether the latest session in this task supports + remote steering via Mission Control + examples: + default: + value: + 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: + created_at: '2025-01-01T00:00:00Z' + updated_at: '2025-01-01T00:00:00Z' + '400': + description: Problems parsing JSON + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '401': + description: Authentication required + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '403': + description: Insufficient permissions + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '422': + description: Validation Failed + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + "/agents/repos/{owner}/{repo}/tasks/{task_id}": + get: + summary: Get a task by repo + description: Returns a task by ID scoped to an owner/repo path + tags: + - agent-tasks + operationId: agent-tasks/get-task-by-repo-and-id + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/agent-tasks/agent-tasks#get-a-task-by-repo + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + 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. + responses: + '200': + description: Task retrieved successfully + content: + application/json: + 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: + description: The entity who created this task + type: object + properties: + id: + type: integer + format: int64 + description: The unique identifier of the user + 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: + - github_resource + - branch + description: Discriminator for data shape + data: + oneOf: + - type: object + description: A GitHub resource (pull request, issue, + etc.) + properties: + id: + type: integer + format: int64 + description: GitHub resource ID + type: + type: string + description: Resource type (e.g., pull_request, + issue) + global_id: + type: string + description: GraphQL global ID + - type: object + description: A Git branch reference + 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 + format: date-time + nullable: true + 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 + remote_steerable: + type: boolean + description: Whether the latest session in this task supports + remote steering via Mission Control + - 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 + agent_id: + type: integer + format: int64 + description: Agent ID + agent_task_id: + type: string + description: Agent internal task ID + 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 + event_type: + type: string + description: Type of event that triggered this session + event_url: + type: string + description: URL of the triggering event + event_content: + type: string + description: Content of the triggering event + event_identifiers: + type: array + items: + type: string + description: Identifiers for tracking + resource_type: + type: string + description: Type of resource associated with this session + resource_id: + type: integer + format: int64 + description: Resource ID + resource_number: + type: integer + format: int32 + description: Resource number (e.g., PR number) + resource_global_id: + type: string + description: GraphQL global ID of the resource + resource_state: + type: string + description: State of the associated resource + head_ref: + type: string + description: Head branch name + base_ref: + type: string + description: Base branch name + workflow_run_id: + type: integer + format: int64 + description: GitHub Actions workflow run ID + model: + type: string + description: Model used for this session + premium_requests: + type: number + format: double + description: Premium request count + remote_steerable: + type: boolean + description: Whether this session supports remote steering + via Mission Control + error: + type: object + description: Error details for a failed session + properties: + message: + type: string + description: Error message + description: Sessions associated with this task + examples: + default: + value: + 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: github_resource + data: + id: 42 + type: pull_request + archived_at: + 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' + event_content: Fix the login button on the homepage + head_ref: copilot/fix-1 + base_ref: main + '400': + description: Bad request + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '401': + description: Authentication required + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '403': + description: Insufficient permissions + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '404': + description: Resource not found + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '422': + description: Validation Failed + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + "/agents/tasks": + get: + summary: List tasks + description: Returns a list of tasks for the authenticated user + tags: + - agent-tasks + operationId: agent-tasks/list-tasks + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/agent-tasks/agent-tasks#list-tasks + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + 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 + description: Filter by archived status. When `true`, returns only archived + tasks. When `false`, returns only non-archived tasks. + - name: since + in: query + schema: + type: string + format: date-time + description: Only show tasks updated at or after this time (ISO 8601 timestamp) + responses: + '200': + description: Tasks retrieved successfully + headers: + Link: + description: | + Pagination links. Contains rel="first" (always), + rel="next" (when more pages exist), and rel="last" (when on the final page). + schema: + type: string + example: ; rel="next", + ; rel="first" + content: + application/json: + 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: + description: The entity who created this task + type: object + properties: + id: + type: integer + format: int64 + description: The unique identifier of the user + 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: + - github_resource + - branch + description: Discriminator for data shape + data: + oneOf: + - type: object + description: A GitHub resource (pull request, issue, + etc.) + properties: + id: + type: integer + format: int64 + description: GitHub resource ID + type: + type: string + description: Resource type (e.g., pull_request, + issue) + global_id: + type: string + description: GraphQL global ID + - type: object + description: A Git branch reference + 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 + format: date-time + nullable: true + 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 + remote_steerable: + type: boolean + description: Whether the latest session in this task supports + remote steering via Mission Control + 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 + examples: + default: + value: + 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: github_resource + data: + id: 42 + type: pull_request + archived_at: + created_at: '2025-01-01T00:00:00Z' + updated_at: '2025-01-01T01:00:00Z' + '400': + description: Bad request + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '401': + description: Authentication required + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '403': + description: Insufficient permissions + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '422': + description: Validation Failed + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + "/agents/tasks/{task_id}": + get: + summary: Get a task by ID + description: Returns a task by ID with its associated sessions + tags: + - agent-tasks + operationId: agent-tasks/get-task-by-id + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/agent-tasks/agent-tasks#get-a-task-by-id + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: agent-tasks + subcategory: agent-tasks + parameters: + - name: task_id + in: path + required: true + schema: + type: string + description: The unique identifier of the task. + responses: + '200': + description: Task retrieved successfully + content: + application/json: + 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: + description: The entity who created this task + type: object + properties: + id: + type: integer + format: int64 + description: The unique identifier of the user + 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: + - github_resource + - branch + description: Discriminator for data shape + data: + oneOf: + - type: object + description: A GitHub resource (pull request, issue, + etc.) + properties: + id: + type: integer + format: int64 + description: GitHub resource ID + type: + type: string + description: Resource type (e.g., pull_request, + issue) + global_id: + type: string + description: GraphQL global ID + - type: object + description: A Git branch reference + 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 + format: date-time + nullable: true + 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 + remote_steerable: + type: boolean + description: Whether the latest session in this task supports + remote steering via Mission Control + - 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 + agent_id: + type: integer + format: int64 + description: Agent ID + agent_task_id: + type: string + description: Agent internal task ID + 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 + event_type: + type: string + description: Type of event that triggered this session + event_url: + type: string + description: URL of the triggering event + event_content: + type: string + description: Content of the triggering event + event_identifiers: + type: array + items: + type: string + description: Identifiers for tracking + resource_type: + type: string + description: Type of resource associated with this session + resource_id: + type: integer + format: int64 + description: Resource ID + resource_number: + type: integer + format: int32 + description: Resource number (e.g., PR number) + resource_global_id: + type: string + description: GraphQL global ID of the resource + resource_state: + type: string + description: State of the associated resource + head_ref: + type: string + description: Head branch name + base_ref: + type: string + description: Base branch name + workflow_run_id: + type: integer + format: int64 + description: GitHub Actions workflow run ID + model: + type: string + description: Model used for this session + premium_requests: + type: number + format: double + description: Premium request count + remote_steerable: + type: boolean + description: Whether this session supports remote steering + via Mission Control + error: + type: object + description: Error details for a failed session + properties: + message: + type: string + description: Error message + description: Sessions associated with this task + examples: + default: + value: + 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: github_resource + data: + id: 42 + type: pull_request + archived_at: + 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' + event_content: Fix the login button on the homepage + head_ref: copilot/fix-1 + base_ref: main + '400': + description: Problems parsing request + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '401': + description: Authentication required + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '403': + description: Insufficient permissions + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '404': + description: Resource not found + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation + '422': + description: Validation Failed + content: + application/json: + schema: + type: object + description: |- + Structured error response following GitHub REST API conventions. + For 422 Unprocessable Entity the errors array contains validation + details; for other error status codes only message and + documentation_url are returned. + required: + - message + - documentation_url + properties: + message: + type: string + description: Summary message (e.g. "Validation Failed", "Not Found") + errors: + type: array + items: + type: object + description: A single validation error + required: + - code + properties: + code: + type: string + enum: + - missing + - missing_field + - invalid + - already_exists + - unprocessable + - custom + description: Machine-readable error code + message: + type: string + description: Human-readable message (populated when code + is "custom") + description: List of validation errors (present only for 422 responses) + documentation_url: + type: string + description: URL to relevant API documentation "/app": get: summary: Get the authenticated app @@ -7549,7 +10079,16 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/oidc-custom-sub" + title: Actions OIDC Subject customization + description: Actions OIDC Subject customization + type: object + properties: + include_claim_keys: + description: Array of unique strings. Each claim key can only contain + alphanumeric characters and underscores. + type: array + items: + type: string examples: default: "$ref": "#/components/examples/oidc-custom-sub" @@ -10549,7 +13088,20 @@ paths: default: "$ref": "#/components/examples/artifact-deployment-record-list" '403': - "$ref": "#/components/responses/forbidden" + description: Forbidden + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + examples: + insufficient_repo_permissions: + value: + message: + cause: artifact metadata write permission required on one or + more repositories + repositories: + - 123 + - 345 '404': "$ref": "#/components/responses/not_found" x-github: @@ -17513,7 +20065,7 @@ paths: To use this endpoint, the authenticated user must be one of: - An administrator for the organization. - - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization. + - An organization member (or a member of a team) assigned a custom organization role that includes the **View organization roles** (`read_organization_custom_org_role`) permission. For more information, see "[Permissions for organization access](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/permissions-of-custom-organization-roles#permissions-for-organization-access)." OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: @@ -17731,7 +20283,7 @@ paths: To use this endpoint, the authenticated user must be one of: - An administrator for the organization. - - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization. + - An organization member (or a member of a team) assigned a custom organization role that includes the **View organization roles** (`read_organization_custom_org_role`) permission. For more information, see "[Permissions for organization access](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/permissions-of-custom-organization-roles#permissions-for-organization-access)." OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: @@ -22092,6 +24644,19 @@ paths: must be specified in the list. items: type: string + failover_network_settings_ids: + type: array + minItems: 0 + maxItems: 1 + description: A list of identifiers of the failover network settings + resources to use for the network configuration. Exactly one resource + identifier must be specified in the list. + items: + type: string + failover_network_enabled: + type: boolean + description: Indicates whether the failover network resource is + enabled. required: - name - network_settings_ids @@ -22193,6 +24758,19 @@ paths: must be specified in the list. items: type: string + failover_network_settings_ids: + type: array + minItems: 0 + maxItems: 1 + description: A list of identifiers of the failover network settings + resources to use for the network configuration. Exactly one resource + identifier must be specified in the list. + items: + type: string + failover_network_enabled: + type: boolean + description: Indicates whether the failover network resource is + enabled. examples: default: value: @@ -78208,6 +80786,7 @@ components: - unknown - direct - transitive + - inconclusive security_advisory: "$ref": "#/components/schemas/dependabot-alert-security-advisory" security_vulnerability: @@ -90191,6 +92770,11 @@ components: commit_url: type: string description: The API URL to get the associated commit resource + html_url: + type: string + format: uri + description: The GitHub URL to get the associated commit resource. + example: https://github.com/octocat/Hello-World/blob/af5626b/example/secrets.txt#L1-L1 required: - path - start_line @@ -90261,6 +92845,11 @@ components: format: uri description: The API URL to get the issue where the secret was detected. example: https://api.github.com/repos/octocat/Hello-World/issues/1347 + html_url: + type: string + format: uri + description: The GitHub URL for the issue where the secret was detected. + example: https://github.com/octocat/Hello-World/issues/1 required: - issue_title_url secret-scanning-location-issue-body: @@ -90273,6 +92862,11 @@ components: format: uri description: The API URL to get the issue where the secret was detected. example: https://api.github.com/repos/octocat/Hello-World/issues/1347 + html_url: + type: string + format: uri + description: The GitHub URL for the issue where the secret was detected. + example: https://github.com/octocat/Hello-World/issues/1 required: - issue_body_url secret-scanning-location-issue-comment: @@ -90285,6 +92879,11 @@ components: format: uri description: The API URL to get the issue comment where the secret was detected. example: https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451 + html_url: + type: string + format: uri + description: The GitHub URL for the issue comment where the secret was detected. + example: https://github.com/octocat/Hello-World/issues/1#issuecomment-1081119451 required: - issue_comment_url secret-scanning-location-discussion-title: @@ -90335,6 +92934,11 @@ components: format: uri description: The API URL to get the pull request where the secret was detected. example: https://api.github.com/repos/octocat/Hello-World/pulls/2846 + html_url: + type: string + format: uri + description: The GitHub URL for the pull request where the secret was detected. + example: https://github.com/octocat/Hello-World/pull/2846 required: - pull_request_title_url secret-scanning-location-pull-request-body: @@ -90348,6 +92952,11 @@ components: format: uri description: The API URL to get the pull request where the secret was detected. example: https://api.github.com/repos/octocat/Hello-World/pulls/2846 + html_url: + type: string + format: uri + description: The GitHub URL for the pull request where the secret was detected. + example: https://github.com/octocat/Hello-World/pull/2846 required: - pull_request_body_url secret-scanning-location-pull-request-comment: @@ -90362,6 +92971,12 @@ components: description: The API URL to get the pull request comment where the secret was detected. example: https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451 + html_url: + type: string + format: uri + description: The GitHub URL for the pull request comment where the secret + was detected. + example: https://github.com/octocat/Hello-World/pull/2846#issuecomment-1081119451 required: - pull_request_comment_url secret-scanning-location-pull-request-review: @@ -90376,6 +92991,12 @@ components: description: The API URL to get the pull request review where the secret was detected. example: https://api.github.com/repos/octocat/Hello-World/pulls/2846/reviews/80 + html_url: + type: string + format: uri + description: The GitHub URL for the pull request review where the secret + was detected. + example: https://github.com/octocat/Hello-World/pull/2846#pullrequestreview-80 required: - pull_request_review_url secret-scanning-location-pull-request-review-comment: @@ -90390,6 +93011,12 @@ components: description: The API URL to get the pull request review comment where the secret was detected. example: https://api.github.com/repos/octocat/Hello-World/pulls/comments/12 + html_url: + type: string + format: uri + description: The GitHub URL for the pull request review comment where the + secret was detected. + example: https://github.com/octocat/Hello-World/pull/2846#discussion_r12 required: - pull_request_review_comment_url nullable-secret-scanning-first-detected-location: @@ -96767,6 +99394,7 @@ components: - unknown - direct - transitive + - inconclusive security_advisory: "$ref": "#/components/schemas/dependabot-alert-security-advisory" security_vulnerability: @@ -213470,7 +216098,7 @@ components: - cwe_id: CWE-400 name: Uncontrolled Resource Consumption epss: - - percentage: 0.00045 + percentage: 0.00045 percentile: 0.16001e0 credits: - user: @@ -216500,7 +219128,7 @@ components: vector_string: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N score: 8.7 epss: - - percentage: 0.00045 + percentage: 0.00045 percentile: 0.16001e0 cwes: - cwe_id: CWE-200 @@ -230782,7 +233410,7 @@ components: vector_string: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N score: 8.7 epss: - - percentage: 0.00045 + percentage: 0.00045 percentile: 0.16001e0 cwes: - cwe_id: CWE-200 @@ -230991,7 +233619,7 @@ components: vector_string: CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N score: 8.5 epss: - - percentage: 0.00045 + percentage: 0.00045 percentile: 0.16001e0 cw{"code":"deadline_exceeded","msg":"operation timed out"}