Skip to main content

Administradores de seguridad

Nota: El rol de administrador de seguridad se encuentra en versión beta pública y está sujeto a cambios.

"Administrador de seguridad" es un rol a nivel organizacional que los propietarios de las organizaciones pueden asignar a cualquier equipo dentro de ellas. Cuando se aplica, este otorga a todos los miembros de un equipo los permisos para administrar alertas y ajustes de seguridad en toda tu organización, así como para leer permisos para todos los repositorios de la misma.

List security manager teams

Funciona con GitHub Apps

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.

Parámetros

Headers
Name, Type, Description
acceptstring

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

Path parameters
Name, Type, Description
orgstringRequired

The organization name. The name is not case sensitive.

Códigos de estado de respuesta HTTP

status codeDescripción
200

OK

Ejemplos de código

get/orgs/{org}/security-managers
curl \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ 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

Funciona con GitHub Apps

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.

Parámetros

Headers
Name, Type, Description
acceptstring

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

Path parameters
Name, Type, Description
orgstringRequired

The organization name. The name is not case sensitive.

team_slugstringRequired

The slug of the team name.

Códigos de estado de respuesta HTTP

status codeDescripción
204

No Content

409

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

Ejemplos de código

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

Response

Status: 204

Remove a security manager team

Funciona con GitHub Apps

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.

Parámetros

Headers
Name, Type, Description
acceptstring

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

Path parameters
Name, Type, Description
orgstringRequired

The organization name. The name is not case sensitive.

team_slugstringRequired

The slug of the team name.

Códigos de estado de respuesta HTTP

status codeDescripción
204

No Content

Ejemplos de código

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

Response

Status: 204