Gestionnaires de sécurité
Utilisez l’API REST pour gérer les gestionnaires de sécurité dans une organisation.
À propos des gestionnaires de sécurité
Remarque : Le rôle de responsable de la sécurité est en version bêta publique et peut faire l’objet de modifications.
Le responsable de sécurité est un rôle au niveau de l’organisation que les propriétaires d’organisation peuvent attribuer à n’importe quelle équipe d’une organisation. Quand il est appliqué, il donne à chaque membre de l’équipe des autorisations pour gérer les alertes et les paramètres de sécurité au sein de votre organisation, ainsi que des autorisations de lecture sur tous les dépôts de l’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.
Paramètres pour « List security manager teams »
Nom, Type, Description |
---|
accept string Setting to |
Nom, Type, Description |
---|
org string ObligatoireThe organization name. The name is not case sensitive. |
Codes d’état de la réponse HTTP pour « List security manager teams »
Code d’état | Description |
---|---|
200 | OK |
Exemples de code pour « 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",
"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."
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.
Paramètres pour « Add a security manager team »
Nom, Type, Description |
---|
accept string Setting to |
Nom, Type, Description |
---|
org string ObligatoireThe organization name. The name is not case sensitive. |
team_slug string ObligatoireThe slug of the team name. |
Codes d’état de la réponse HTTP pour « Add a security manager team »
Code d’état | Description |
---|---|
204 | No Content |
409 | The organization has reached the maximum number of security manager teams. |
Exemples de code pour « 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.
Paramètres pour « Remove a security manager team »
Nom, Type, Description |
---|
accept string Setting to |
Nom, Type, Description |
---|
org string ObligatoireThe organization name. The name is not case sensitive. |
team_slug string ObligatoireThe slug of the team name. |
Codes d’état de la réponse HTTP pour « Remove a security manager team »
Code d’état | Description |
---|---|
204 | No Content |
Exemples de code pour « 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