REST API endpoints for Dependabot runner settings
Use the REST API to get and set Dependabot runner settings.
Get repository Dependabot runner settings
Gets the runner Dependabot uses for this repository: standard GitHub-hosted runners, or labeled runners with their labels and optional runner group. The response matches the repository's code security settings page.
Labeled runners take effect only for private and internal repositories with
GitHub Actions enabled. Otherwise, the response shows standard.
Repository administrators and users who can manage security products for the
repository can use this endpoint. OAuth app tokens and personal access tokens
(classic) require the repo scope for both public and private repositories.
GitHub App tokens and fine-grained personal access tokens require repository
Administration read permission. Workflow GITHUB_TOKEN access is not supported.
Tokens de acesso granulares para "Get repository Dependabot runner settings"
Este endpoint funciona com os seguintes tipos de token granulares:
- tokens de acesso do usuário do aplicativo GitHub
- tokens de acesso à instalação do aplicativo GitHub
- Tokens de acesso pessoal refinados
O token refinado deve ter os seguintes conjuntos de permissões:
- "Administration" repository permissions (read)
Parâmetros para "Get repository Dependabot runner settings"
| Nome, Tipo, Descrição |
|---|
accept string Setting to |
| Nome, Tipo, Descrição |
|---|
owner string ObrigatórioThe account owner of the repository. The name is not case sensitive. |
repo string ObrigatórioThe name of the repository without the |
Códigos de status de resposta HTTP para "Get repository Dependabot runner settings"
| Código de status | Descrição |
|---|---|
200 | OK |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
Exemplos de código para "Get repository Dependabot runner settings"
Se você acessar GitHub em GHE.com, substitua api.github.com pelo subdomínio dedicado da sua empresa em api.SUBDOMAIN.ghe.com.
Exemplo de solicitação
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/dependabot/runner-settingsLabeled runner with a runner group
Status: 200{
"runner_type": "labeled",
"runner_labels": [
"dependabot"
],
"runner_group": "dependabot-runners"
}Set repository Dependabot runner settings
Sets the runner Dependabot uses for this repository. This is the same setting as on the repository's code security settings page.
labeled turns on labeled runners with exactly one runner label and an optional
runner group. standard turns them off and clears the label and group.
Labeled runners are only available for private and internal repositories with GitHub Actions enabled. The response returns the settings after the change.
Repository administrators and users who can manage security products for the
repository can use this endpoint, subject to enterprise policy. OAuth app tokens
and personal access tokens (classic) require the repo scope. GitHub App tokens
and fine-grained personal access tokens require repository Administration write
permission. Workflow GITHUB_TOKEN access is not supported.
Tokens de acesso granulares para "Set repository Dependabot runner settings"
Este endpoint funciona com os seguintes tipos de token granulares:
- tokens de acesso do usuário do aplicativo GitHub
- tokens de acesso à instalação do aplicativo GitHub
- Tokens de acesso pessoal refinados
O token refinado deve ter os seguintes conjuntos de permissões:
- "Administration" repository permissions (write)
Parâmetros para "Set repository Dependabot runner settings"
| Nome, Tipo, Descrição |
|---|
accept string Setting to |
| Nome, Tipo, Descrição |
|---|
owner string ObrigatórioThe account owner of the repository. The name is not case sensitive. |
repo string ObrigatórioThe name of the repository without the |
| Nome, Tipo, Descrição |
|---|
runner_type string Obrigatório
Pode ser um dos: |
runner_labels array of strings Required for |
runner_group string or null Optional for |
Códigos de status de resposta HTTP para "Set repository Dependabot runner settings"
| Código de status | Descrição |
|---|---|
200 | OK |
400 | Bad Request |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
Exemplos de código para "Set repository Dependabot runner settings"
Se você acessar GitHub em GHE.com, substitua api.github.com pelo subdomínio dedicado da sua empresa em api.SUBDOMAIN.ghe.com.
Exemplo de solicitação
curl -L \
-X PUT \
-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/dependabot/runner-settings \
-d '{"runner_type":"labeled","runner_labels":["dependabot"],"runner_group":"dependabot-runners"}'Labeled runner with a runner group
Status: 200{
"runner_type": "labeled",
"runner_labels": [
"dependabot"
],
"runner_group": "dependabot-runners"
}