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

Конечные точки REST API для диспетчеров безопасности

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

Сведения о диспетчерах безопасности

Примечание. Роль диспетчера безопасности находится на этапе общедоступной бета-версии и может быть изменена.

Менеджер по безопасности — это роль уровня организации, которую владельцы организации могут назначать любой команде в организации. При применении он предоставляет каждому участнику команды разрешения на просмотр оповещений системы безопасности и управление параметрами безопасности кода в организации, а также разрешения на чтение для всех репозиториев в организации.

List security manager teams

Lists teams that are security managers for an organization. For more information, see "Managing security managers in your organization."

The authenticated user must be an administrator or security manager for the organization to use this endpoint.

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

Подробные маркеры доступа для "List security manager teams

This endpoint works with the following fine-grained token types:

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

  • "Administration" organization permissions (read)

Параметры для "List security manager teams"

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

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

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

The organization name. The name is not case sensitive.

Коды состояния http-ответа для "List security manager teams"

Код состоянияОписание
200

OK

Примеры кода для "List security manager teams"

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

get/orgs/{org}/security-managers
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/ORG/security-managers

Response

Status: 200
[ { "id": 1, "node_id": "MDQ6VGVhbTE=", "url": "https://api.github.com/teams/1", "html_url": "https://github.com/orgs/github/teams/justice-league", "name": "Justice League", "slug": "justice-league", "description": "A great team.", "privacy": "closed", "notification_setting": "notifications_enabled", "permission": "admin", "members_url": "https://api.github.com/teams/1/members{/member}", "repositories_url": "https://api.github.com/teams/1/repos", "parent": null } ]

Add a security manager team

Adds a team as a security manager for an organization. For more information, see "Managing security for an organization for an organization."

The authenticated user must be an administrator for the organization to use this endpoint.

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

Подробные маркеры доступа для "Add a security manager team

This endpoint works with the following fine-grained token types:

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

  • "Administration" organization permissions (write)

Параметры для "Add a security manager team"

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

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

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

The organization name. The name is not case sensitive.

team_slug string Обязательное поле

The slug of the team name.

Коды состояния http-ответа для "Add a security manager team"

Код состоянияОписание
204

No Content

409

The organization has reached the maximum number of security manager teams.

Примеры кода для "Add a security manager team"

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

put/orgs/{org}/security-managers/teams/{team_slug}
curl -L \ -X PUT \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/ORG/security-managers/teams/TEAM_SLUG

Response

Status: 204

Remove a security manager team

Removes the security manager role from a team for an organization. For more information, see "Managing security managers in your organization team from an organization."

The authenticated user must be an administrator for the organization to use this endpoint.

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

Подробные маркеры доступа для "Remove a security manager team

This endpoint works with the following fine-grained token types:

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

  • "Administration" organization permissions (write)

Параметры для "Remove a security manager team"

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

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

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

The organization name. The name is not case sensitive.

team_slug string Обязательное поле

The slug of the team name.

Коды состояния http-ответа для "Remove a security manager team"

Код состоянияОписание
204

No Content

Примеры кода для "Remove a security manager team"

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

delete/orgs/{org}/security-managers/teams/{team_slug}
curl -L \ -X DELETE \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/ORG/security-managers/teams/TEAM_SLUG

Response

Status: 204