Skip to main content
REST API теперь версия. Дополнительные сведения см. в разделе "О управлении версиями API".

Конечные точки REST API для доступа к репозиторию Dependabot

Используйте REST API для управления доступом к репозиториям Dependabot в организации.

О доступе к репозиторию Dependabot

Вы можете перечислить репозитории, к которым у Dependabot уже есть доступ к и задать уровень доступа к репозиторию по умолчанию для Dependabot.

Lists the repositories Dependabot can access in an enterprise

Lists repositories that enterprise admins have allowed Dependabot to access when updating dependencies across organizations in the enterprise.

The authenticated user must be an enterprise owner to use this endpoint.

Детализированные токены доступа для «Lists the repositories Dependabot can access in an enterprise»

Эта конечная точка работает со следующими точными типами маркеров:

Маркер с точной детализацией должен иметь следующий набор разрешений.:

  • "Enterprise administration" enterprise permissions (read)

Параметры для «Lists the repositories Dependabot can access in an enterprise»

Заголовки
Имя., Тип, Description
accept string

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

Параметры пути
Имя., Тип, Description
enterprise string Обязательное поле

The slug version of the enterprise name.

Параметры запроса
Имя., Тип, Description
page integer

The page number of results to fetch.

По умолчанию.: 1

per_page integer

Number of results per page.

По умолчанию.: 30

HTTP-коды статуса ответа для «Lists the repositories Dependabot can access in an enterprise»

Код состоянияDescription
200

OK

403

Forbidden

404

Resource not found

Примеры кода для «Lists the repositories Dependabot can access in an enterprise»

Пример запроса

get/enterprises/{enterprise}/dependabot/repository-access
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/enterprises/ENTERPRISE/dependabot/repository-access

Response

Status: 200
{ "default_level": "public", "accessible_repositories": [ { "id": 123456, "node_id": "MDEwOlJlcG9zaXRvcnkxMjM0NTY=", "name": "example-repo", "full_name": "octocat/example-repo", "owner": { "name": "octocat", "email": "octo@github.com", "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://avatars.githubusercontent.com/u/1?v=4", "gravatar_id": 1, "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat/example-repo", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false, "starred_at": "\"2020-07-09T00:17:55Z\"", "user_view_type": "default" }, "private": false, "html_url": "https://github.com/octocat/example-repo", "description": "This is an example repository.", "fork": false, "url": "https://api.github.com/repos/octocat/example-repo", "archive_url": "https://api.github.com/repos/octocat/example-repo/{archive_format}{/ref}", "assignees_url": "https://api.github.com/repos/octocat/example-repo/assignees{/user}", "blobs_url": "https://api.github.com/repos/octocat/example-repo/git/blobs{/sha}", "branches_url": "https://api.github.com/repos/octocat/example-repo/branches{/branch}", "collaborators_url": "https://api.github.com/repos/octocat/example-repo/collaborators{/collaborator}", "comments_url": "https://api.github.com/repos/octocat/example-repo/comments{/number}", "commits_url": "https://api.github.com/repos/octocat/example-repo/commits{/sha}", "compare_url": "https://api.github.com/repos/octocat/example-repo/compare/{base}...{head}", "contents_url": "https://api.github.com/repos/octocat/example-repo/contents/{+path}", "contributors_url": "https://api.github.com/repos/octocat/example-repo/contributors", "deployments_url": "https://api.github.com/repos/octocat/example-repo/deployments", "downloads_url": "https://api.github.com/repos/octocat/example-repo/downloads", "events_url": "https://api.github.com/repos/octocat/example-repo/events", "forks_url": "https://api.github.com/repos/octocat/example-repo/forks", "git_commits_url": "https://api.github.com/repos/octocat/example-repo/git/commits{/sha}", "git_refs_url": "https://api.github.com/repos/octocat/example-repo/git/refs{/sha}", "git_tags_url": "https://api.github.com/repos/octocat/example-repo/git/tags{/sha}", "issue_comment_url": "https://api.github.com/repos/octocat/example-repo/issues/comments{/number}", "issue_events_url": "https://api.github.com/repos/octocat/example-repo/issues/events{/number}", "issues_url": "https://api.github.com/repos/octocat/example-repo/issues{/number}", "keys_url": "https://api.github.com/repos/octocat/example-repo/keys{/key_id}", "labels_url": "https://api.github.com/repos/octocat/example-repo/labels{/name}", "languages_url": "https://api.github.com/repos/octocat/example-repo/languages", "merges_url": "https://api.github.com/repos/octocat/example-repo/merges", "milestones_url": "https://api.github.com/repos/octocat/example-repo/milestones{/number}", "notifications_url": "https://api.github.com/repos/octocat/example-repo/notifications{?since,all,participating}", "pulls_url": "https://api.github.com/repos/octocat/example-repo/pulls{/number}", "releases_url": "https://api.github.com/repos/octocat/example-repo/releases{/id}", "stargazers_url": "https://api.github.com/repos/octocat/example-repo/stargazers", "statuses_url": "https://api.github.com/repos/octocat/example-repo/statuses/{sha}", "subscribers_url": "https://api.github.com/repos/octocat/example-repo/subscribers", "subscription_url": "https://api.github.com/repos/octocat/example-repo/subscription", "tags_url": "https://api.github.com/repos/octocat/example-repo/tags", "teams_url": "https://api.github.com/repos/octocat/example-repo/teams", "trees_url": "https://api.github.com/repos/octocat/example-repo/git/trees{/sha}", "hooks_url": "https://api.github.com/repos/octocat/example-repo/hooks" } ] }

Updates Dependabot's repository access list for an enterprise

Updates repositories according to the list of repositories that enterprise admins have given Dependabot access to when they've updated dependencies across organizations in the enterprise.

The authenticated user must be an enterprise owner to use this endpoint.

Example request body:

{
  "repository_ids_to_add": [123, 456],
  "repository_ids_to_remove": [789]
}

Детализированные токены доступа для «Updates Dependabot's repository access list for an enterprise»

Эта конечная точка работает со следующими точными типами маркеров:

Маркер с точной детализацией должен иметь следующий набор разрешений.:

  • "Enterprise administration" enterprise permissions (write)

Параметры для «Updates Dependabot's repository access list for an enterprise»

Заголовки
Имя., Тип, Description
accept string

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

Параметры пути
Имя., Тип, Description
enterprise string Обязательное поле

The slug version of the enterprise name.

Параметры запроса
Имя., Тип, Description
repository_ids_to_add array of integers

List of repository IDs to add.

repository_ids_to_remove array of integers

List of repository IDs to remove.

HTTP-коды статуса ответа для «Updates Dependabot's repository access list for an enterprise»

Код состоянияDescription
204

No Content

403

Forbidden

404

Resource not found

Примеры кода для «Updates Dependabot's repository access list for an enterprise»

Пример запроса

patch/enterprises/{enterprise}/dependabot/repository-access
curl -L \ -X PATCH \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/enterprises/ENTERPRISE/dependabot/repository-access

Response

Status: 204

Set the default repository access level for Dependabot in an enterprise

Sets the default level of repository access Dependabot will have while performing an update across organizations in the enterprise. Available values are:

  • 'public' - Dependabot will only have access to public repositories, unless access is explicitly granted to non-public repositories.
  • 'internal' - Dependabot will only have access to public and internal repositories, unless access is explicitly granted to private repositories.

The authenticated user must be an enterprise owner to use this endpoint.

Детализированные токены доступа для «Set the default repository access level for Dependabot in an enterprise»

Эта конечная точка работает со следующими точными типами маркеров:

Маркер с точной детализацией должен иметь следующий набор разрешений.:

  • "Enterprise administration" enterprise permissions (write)

Параметры для «Set the default repository access level for Dependabot in an enterprise»

Заголовки
Имя., Тип, Description
accept string

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

Параметры пути
Имя., Тип, Description
enterprise string Обязательное поле

The slug version of the enterprise name.

Параметры запроса
Имя., Тип, Description
default_level string Обязательное поле

The default repository access level for Dependabot updates.

Возможные значения: public, internal

HTTP-коды статуса ответа для «Set the default repository access level for Dependabot in an enterprise»

Код состоянияDescription
204

No Content

403

Forbidden

404

Resource not found

Примеры кода для «Set the default repository access level for Dependabot in an enterprise»

Пример запроса

put/enterprises/{enterprise}/dependabot/repository-access/default-level
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/enterprises/ENTERPRISE/dependabot/repository-access/default-level \ -d '{"default_level":"public"}'

Response

Status: 204

Lists the repositories Dependabot can access in an organization

Lists repositories that organization admins have allowed Dependabot to access when updating dependencies.

Note

This operation supports both server-to-server and user-to-server access. Unauthorized users will not see the existence of this endpoint.

Детализированные токены доступа для «Lists the repositories Dependabot can access in an organization»

Эта конечная точка работает со следующими точными типами маркеров:

Маркер с точной детализацией должен иметь следующий набор разрешений.:

  • "Administration" organization permissions (read)

Параметры для «Lists the repositories Dependabot can access in an organization»

Заголовки
Имя., Тип, Description
accept string

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

Параметры пути
Имя., Тип, Description
org string Обязательное поле

The organization name. The name is not case sensitive.

Параметры запроса
Имя., Тип, Description
page integer

The page number of results to fetch.

По умолчанию.: 1

per_page integer

Number of results per page.

По умолчанию.: 30

HTTP-коды статуса ответа для «Lists the repositories Dependabot can access in an organization»

Код состоянияDescription
200

OK

403

Forbidden

404

Resource not found

Примеры кода для «Lists the repositories Dependabot can access in an organization»

Пример запроса

get/orgs/{org}/dependabot/repository-access
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/orgs/ORG/dependabot/repository-access

Response

Status: 200
{ "default_level": "public", "accessible_repositories": [ { "id": 123456, "node_id": "MDEwOlJlcG9zaXRvcnkxMjM0NTY=", "name": "example-repo", "full_name": "octocat/example-repo", "owner": { "name": "octocat", "email": "octo@github.com", "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://avatars.githubusercontent.com/u/1?v=4", "gravatar_id": 1, "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat/example-repo", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false, "starred_at": "\"2020-07-09T00:17:55Z\"", "user_view_type": "default" }, "private": false, "html_url": "https://github.com/octocat/example-repo", "description": "This is an example repository.", "fork": false, "url": "https://api.github.com/repos/octocat/example-repo", "archive_url": "https://api.github.com/repos/octocat/example-repo/{archive_format}{/ref}", "assignees_url": "https://api.github.com/repos/octocat/example-repo/assignees{/user}", "blobs_url": "https://api.github.com/repos/octocat/example-repo/git/blobs{/sha}", "branches_url": "https://api.github.com/repos/octocat/example-repo/branches{/branch}", "collaborators_url": "https://api.github.com/repos/octocat/example-repo/collaborators{/collaborator}", "comments_url": "https://api.github.com/repos/octocat/example-repo/comments{/number}", "commits_url": "https://api.github.com/repos/octocat/example-repo/commits{/sha}", "compare_url": "https://api.github.com/repos/octocat/example-repo/compare/{base}...{head}", "contents_url": "https://api.github.com/repos/octocat/example-repo/contents/{+path}", "contributors_url": "https://api.github.com/repos/octocat/example-repo/contributors", "deployments_url": "https://api.github.com/repos/octocat/example-repo/deployments", "downloads_url": "https://api.github.com/repos/octocat/example-repo/downloads", "events_url": "https://api.github.com/repos/octocat/example-repo/events", "forks_url": "https://api.github.com/repos/octocat/example-repo/forks", "git_commits_url": "https://api.github.com/repos/octocat/example-repo/git/commits{/sha}", "git_refs_url": "https://api.github.com/repos/octocat/example-repo/git/refs{/sha}", "git_tags_url": "https://api.github.com/repos/octocat/example-repo/git/tags{/sha}", "issue_comment_url": "https://api.github.com/repos/octocat/example-repo/issues/comments{/number}", "issue_events_url": "https://api.github.com/repos/octocat/example-repo/issues/events{/number}", "issues_url": "https://api.github.com/repos/octocat/example-repo/issues{/number}", "keys_url": "https://api.github.com/repos/octocat/example-repo/keys{/key_id}", "labels_url": "https://api.github.com/repos/octocat/example-repo/labels{/name}", "languages_url": "https://api.github.com/repos/octocat/example-repo/languages", "merges_url": "https://api.github.com/repos/octocat/example-repo/merges", "milestones_url": "https://api.github.com/repos/octocat/example-repo/milestones{/number}", "notifications_url": "https://api.github.com/repos/octocat/example-repo/notifications{?since,all,participating}", "pulls_url": "https://api.github.com/repos/octocat/example-repo/pulls{/number}", "releases_url": "https://api.github.com/repos/octocat/example-repo/releases{/id}", "stargazers_url": "https://api.github.com/repos/octocat/example-repo/stargazers", "statuses_url": "https://api.github.com/repos/octocat/example-repo/statuses/{sha}", "subscribers_url": "https://api.github.com/repos/octocat/example-repo/subscribers", "subscription_url": "https://api.github.com/repos/octocat/example-repo/subscription", "tags_url": "https://api.github.com/repos/octocat/example-repo/tags", "teams_url": "https://api.github.com/repos/octocat/example-repo/teams", "trees_url": "https://api.github.com/repos/octocat/example-repo/git/trees{/sha}", "hooks_url": "https://api.github.com/repos/octocat/example-repo/hooks" } ] }

Updates Dependabot's repository access list for an organization

Updates repositories according to the list of repositories that organization admins have given Dependabot access to when they've updated dependencies.

Note

This operation supports both server-to-server and user-to-server access. Unauthorized users will not see the existence of this endpoint.

Example request body:

{
  "repository_ids_to_add": [123, 456],
  "repository_ids_to_remove": [789]
}

Детализированные токены доступа для «Updates Dependabot's repository access list for an organization»

Эта конечная точка работает со следующими точными типами маркеров:

Маркер с точной детализацией должен иметь следующий набор разрешений.:

  • "Administration" organization permissions (write)

Параметры для «Updates Dependabot's repository access list for an organization»

Заголовки
Имя., Тип, Description
accept string

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

Параметры пути
Имя., Тип, Description
org string Обязательное поле

The organization name. The name is not case sensitive.

Параметры запроса
Имя., Тип, Description
repository_ids_to_add array of integers

List of repository IDs to add.

repository_ids_to_remove array of integers

List of repository IDs to remove.

HTTP-коды статуса ответа для «Updates Dependabot's repository access list for an organization»

Код состоянияDescription
204

No Content

403

Forbidden

404

Resource not found

Примеры кода для «Updates Dependabot's repository access list for an organization»

Пример запроса

patch/orgs/{org}/dependabot/repository-access
curl -L \ -X PATCH \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/orgs/ORG/dependabot/repository-access

Response

Status: 204

Set the default repository access level for Dependabot

Sets the default level of repository access Dependabot will have while performing an update. Available values are:

  • 'public' - Dependabot will only have access to public repositories, unless access is explicitly granted to non-public repositories.
  • 'internal' - Dependabot will only have access to public and internal repositories, unless access is explicitly granted to private repositories.

Unauthorized users will not see the existence of this endpoint.

This operation supports both server-to-server and user-to-server access.

Детализированные токены доступа для «Set the default repository access level for Dependabot»

Эта конечная точка работает со следующими точными типами маркеров:

Маркер с точной детализацией должен иметь следующий набор разрешений.:

  • "Administration" organization permissions (write)

Параметры для «Set the default repository access level for Dependabot»

Заголовки
Имя., Тип, Description
accept string

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

Параметры пути
Имя., Тип, Description
org string Обязательное поле

The organization name. The name is not case sensitive.

Параметры запроса
Имя., Тип, Description
default_level string Обязательное поле

The default repository access level for Dependabot updates.

Возможные значения: public, internal

HTTP-коды статуса ответа для «Set the default repository access level for Dependabot»

Код состоянияDescription
204

No Content

403

Forbidden

404

Resource not found

Примеры кода для «Set the default repository access level for Dependabot»

Пример запроса

put/orgs/{org}/dependabot/repository-access/default-level
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/orgs/ORG/dependabot/repository-access/default-level \ -d '{"default_level":"public"}'

Response

Status: 204