REST API endpoints for Copilot cloud agent repository management
Use the REST API to manage repository-level settings for agente en la nube de 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 acceso granulares para "Get Copilot cloud agent configuration for a repository"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
- tokens de acceso de usuario de la aplicación de GitHub
- tokens de acceso de la aplicación de GitHub
- Tokens de acceso personal granulares
El token pormenorizado debe tener el siguiente conjunto de permisos:
- "Copilot agent settings" repository permissions (read)
Parámetros para "Get Copilot cloud agent configuration for a repository"
| Nombre, Tipo, Descripción |
|---|
accept string Setting to |
| Nombre, Tipo, Descripción |
|---|
owner string ObligatorioThe account owner of the repository. The name is not case sensitive. |
repo string ObligatorioThe name of the repository without the |
Códigos de estado de respuesta HTTP para "Get Copilot cloud agent configuration for a repository"
| código de estado | Descripción |
|---|---|
200 | OK |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
500 | Internal Error |
Ejemplos de código para "Get Copilot cloud agent configuration for a repository"
Si accede a GitHub en GHE.com, reemplace api.github.com por el subdominio dedicado de la empresa en api.SUBDOMAIN.ghe.com.
Ejemplos de solicitud
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/configurationDefault 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": []
}