REST API endpoints for Copilot cloud agent repository management
Use the REST API to manage repository-level settings for Agent cloud 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.
Jetons d'accès granulaires pour «Get Copilot cloud agent configuration for a repository»
Ce point de terminaison fonctionne avec les types de tokens à granularité fine suivants:
- jetons d’accès utilisateur de l’application GitHub
- jetons d’accès d’installation de l’application GitHub
- Tokens d’accès personnel à granularité fine
Le token à granularité fine doit disposer de l’ensemble d’autorisations suivant:
- "Copilot agent settings" repository permissions (read)
Paramètres pour «Get Copilot cloud agent configuration for a repository »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
owner string RequisThe account owner of the repository. The name is not case sensitive. |
repo string RequisThe name of the repository without the |
Codes d’état de réponse HTTP pour «Get Copilot cloud agent configuration for a repository »
| Code de statut | Description |
|---|---|
200 | OK |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
500 | Internal Error |
Exemples de code pour «Get Copilot cloud agent configuration for a repository »
Si vous accédez à GitHub à GHE.com, remplacez api.github.com par le sous-domaine dédié de votre entreprise à api.SUBDOMAIN.ghe.com.
Exemples de requête
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": []
}