Skip to main content
A API REST agora é versionada. Para obter mais informações, confira "Sobre o controle de versão da API".

REST API endpoints for Copilot cloud agent repository management

Use the REST API to manage repository-level settings for agente de nuvem Copilot.

Get Copilot cloud agent configuration for a repository

Note

This endpoint is in public preview and is subject to change.

Gets the Copilot cloud agent configuration for a repository, including MCP server configuration, enabled review tools, Actions workflow approval settings, and firewall configuration.

OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.

Tokens de acesso granulares para "Get Copilot cloud agent configuration for a repository"

Este endpoint funciona com os seguintes tipos de token granulares:

O token refinado deve ter os seguintes conjuntos de permissões:

  • "Copilot agent settings" repository permissions (read)

Parâmetros para "Get Copilot cloud agent configuration for a repository"

Cabeçalhos
Nome, Tipo, Descrição
accept string

Setting to application/vnd.github+json is recommended.

Parâmetros de caminho
Nome, Tipo, Descrição
owner string Obrigatório

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

repo string Obrigatório

The name of the repository without the .git extension. The name is not case sensitive.

Códigos de status de resposta HTTP para "Get Copilot cloud agent configuration for a repository"

Código de statusDescrição
200

OK

401

Requires authentication

403

Forbidden

404

Resource not found

500

Internal Error

Exemplos de código para "Get Copilot cloud agent configuration for a repository"

Exemplos de solicitação

get/repos/{owner}/{repo}/copilot/cloud-agent/configuration
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/repos/OWNER/REPO/copilot/cloud-agent/configuration

Default configuration

Status: 200
{ "mcp_configuration": null, "enabled_tools": { "codeql": true, "copilot_code_review": true, "secret_scanning": true, "dependency_vulnerability_checks": true }, "require_actions_workflow_approval": true, "is_firewall_enabled": true, "is_firewall_recommended_allowlist_enabled": true, "custom_allowlist": [] }