REST API endpoints for security managers
Use the REST API to manage security managers in an organization.
About security managers
The security manager role is an organization-level role that organization owners can assign to any member or team in the organization. When applied, it gives permission to view security alerts and manage settings for security features across your organization, as well as read permission for all repositories in the organization.
List security manager teams
Warning
Closing down notice: This operation is closing down and will be removed in Enterprise Server 3.20. Please use the "Organization Roles" endpoints instead.
fine_grained_access
works_with_fine_grained_tokens:
permission_set:
- "Administration" organization permissions (read)
Parameters for "List security manager teams"
| Name, Type, Description |
|---|
accept string Setting to |
| Name, Type, Description |
|---|
org string RequiredThe organization name. The name is not case sensitive. |
http_status_code
| status_code | Description |
|---|---|
200 | OK |
code_samples
request_example
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
Warning
Closing down notice: This operation is closing down and will be removed in Enterprise Server 3.20. Please use the "Organization Roles" endpoints instead.
fine_grained_access
works_with_fine_grained_tokens:
permission_set:
- "Administration" organization permissions (write)
Parameters for "Add a security manager team"
| Name, Type, Description |
|---|
accept string Setting to |
| Name, Type, Description |
|---|
org string RequiredThe organization name. The name is not case sensitive. |
team_slug string RequiredThe slug of the team name. |
http_status_code
| status_code | Description |
|---|---|
204 | No Content |
code_samples
request_example
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
Warning
Closing down notice: This operation is closing down and will be removed in Enterprise Server 3.20. Please use the "Organization Roles" endpoints instead.
fine_grained_access
works_with_fine_grained_tokens:
permission_set:
- "Administration" organization permissions (write)
Parameters for "Remove a security manager team"
| Name, Type, Description |
|---|
accept string Setting to |
| Name, Type, Description |
|---|
org string RequiredThe organization name. The name is not case sensitive. |
team_slug string RequiredThe slug of the team name. |
http_status_code
| status_code | Description |
|---|---|
204 | No Content |
code_samples
request_example
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