Sicherheits-Manager
Verwende die REST-API, um Sicherheits-Manager in einer Organisation zu verwalten.
Informationen zu Sicherheits-Managern
Hinweis: Die Rolle des Sicherheitsmanagers befindet sich in der öffentlichen Betaversion und unterliegt Änderungen.
„Sicherheits-Manager“ ist eine Rolle auf Organisationsebene, die Organisationsbesitzer jedem Team in einer Organisation zuweisen können. Wenn sie angewendet wird, erteilt sie jedem Mitglied des Teams Berechtigungen zum Verwalten von Sicherheitswarnungen und -einstellungen in Ihrer Organisation sowie Leseberechtigungen für alle Repositorys in der Organisation.
List security manager teams
Lists teams that are security managers for an organization. For more information, see "Managing security managers in your organization."
To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the read:org
scope.
GitHub Apps must have the administration
organization read permission to use this endpoint.
Parameters for "List security manager teams"
Headers |
---|
Name, Type, Description |
accept stringSetting to |
Path parameters |
Name, Type, Description |
org stringRequiredThe organization name. The name is not case sensitive. |
HTTP response status codes for "List security manager teams"
Status code | Description |
---|---|
200 | OK |
Code samples for "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" \
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",
"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."
To use this endpoint, you must be an administrator for the organization, and you must use an access token with the write:org
scope.
GitHub Apps must have the administration
organization read-write permission to use this endpoint.
Parameters for "Add a security manager team"
Headers |
---|
Name, Type, Description |
accept stringSetting to |
Path parameters |
Name, Type, Description |
org stringRequiredThe organization name. The name is not case sensitive. |
team_slug stringRequiredThe slug of the team name. |
HTTP response status codes for "Add a security manager team"
Status code | Description |
---|---|
204 | No Content |
409 | The organization has reached the maximum number of security manager teams. |
Code samples for "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" \
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."
To use this endpoint, you must be an administrator for the organization, and you must use an access token with the admin:org
scope.
GitHub Apps must have the administration
organization read-write permission to use this endpoint.
Parameters for "Remove a security manager team"
Headers |
---|
Name, Type, Description |
accept stringSetting to |
Path parameters |
Name, Type, Description |
org stringRequiredThe organization name. The name is not case sensitive. |
team_slug stringRequiredThe slug of the team name. |
HTTP response status codes for "Remove a security manager team"
Status code | Description |
---|---|
204 | No Content |
Code samples for "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" \
https://api.github.com/orgs/ORG/security-managers/teams/TEAM_SLUG
Response
Status: 204