Эта версия GitHub Enterprise Server была прекращена 2026-04-09. Исправления выпускаться не будут даже при критических проблемах безопасности. Для повышения производительности, повышения безопасности и новых функций выполните обновление до последней версии GitHub Enterprise Server. Чтобы получить справку по обновлению, обратитесь в службу поддержки GitHub Enterprise.
Конечные точки REST API для диспетчеров безопасности
Используйте REST API для управления диспетчерами безопасности в организации.
Сведения о диспетчерах безопасности
Примечание.
Роль диспетчера безопасности находится в beta и подлежит изменению.
Менеджер по безопасности — это роль уровня организации, которую владельцы организации могут назначать любой команде в организации. При применении он предоставляет каждому участнику команды разрешение на просмотр оповещений системы безопасности и управление параметрами для функций безопасности в организации, а также разрешение на чтение для всех репозиториев в организации.
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»
Эта конечная точка работает со следующими точными типами маркеров:
- Жетоны доступа пользователей приложения GitHub
- Токены доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Administration" organization permissions (read)
Параметры для «List security manager teams»
| Имя., Тип, Description |
|---|
accept string Setting to |
| Имя., Тип, Description |
|---|
org string Обязательное полеThe organization name. The name is not case sensitive. |
HTTP-коды статуса ответа для «List security manager teams»
| Код состояния | Description |
|---|---|
200 | OK |
Примеры кода для «List security manager teams»
Пример запроса
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/orgs/ORG/security-managersResponse
Status: 200[
{
"id": 1,
"node_id": "MDQ6VGVhbTE=",
"url": "https://HOSTNAME/organizations/1/team/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://HOSTNAME/organizations/1/team/1/members{/member}",
"repositories_url": "https://HOSTNAME/organizations/1/team/1/repos",
"type": "organization",
"organization_id": 1
}
]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»
Эта конечная точка работает со следующими точными типами маркеров:
- Жетоны доступа пользователей приложения GitHub
- Токены доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Administration" organization permissions (write)
Параметры для «Add a security manager team»
| Имя., Тип, Description |
|---|
accept string Setting to |
| Имя., Тип, 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»
| Код состояния | Description |
|---|---|
204 | No Content |
Примеры кода для «Add a security manager team»
Пример запроса
curl -L \
-X PUT \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/orgs/ORG/security-managers/teams/TEAM_SLUGResponse
Status: 204Remove 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»
Эта конечная точка работает со следующими точными типами маркеров:
- Жетоны доступа пользователей приложения GitHub
- Токены доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Administration" organization permissions (write)
Параметры для «Remove a security manager team»
| Имя., Тип, Description |
|---|
accept string Setting to |
| Имя., Тип, 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»
| Код состояния | Description |
|---|---|
204 | No Content |
Примеры кода для «Remove a security manager team»
Пример запроса
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/orgs/ORG/security-managers/teams/TEAM_SLUGResponse
Status: 204