适用于安全管理器的 REST API 端点
使用 REST API 管理组织中的安全管理器。
关于安全管理器
关于安全管理员的介绍
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.
“List security manager teams”的细粒度访问令牌
此端点支持以下精细令牌类型:
细粒度令牌必须具有以下权限集:
- "Administration" organization permissions (read)
“”List security manager teams 的参数
| 名称, 类型, 说明 |
|---|
accept string Setting to |
| 名称, 类型, 说明 |
|---|
org string 必须The organization name. The name is not case sensitive. |
“List security manager teams”的 HTTP 响应状态代码
| 状态代码 | 说明 |
|---|---|
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
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.
“Add a security manager team”的细粒度访问令牌
此端点支持以下精细令牌类型:
细粒度令牌必须具有以下权限集:
- "Administration" organization permissions (write)
“”Add a security manager team 的参数
| 名称, 类型, 说明 |
|---|
accept string Setting to |
| 名称, 类型, 说明 |
|---|
org string 必须The organization name. The name is not case sensitive. |
team_slug string 必须The slug of the team name. |
“Add a security manager team”的 HTTP 响应状态代码
| 状态代码 | 说明 |
|---|---|
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
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.
“Remove a security manager team”的细粒度访问令牌
此端点支持以下精细令牌类型:
细粒度令牌必须具有以下权限集:
- "Administration" organization permissions (write)
“”Remove a security manager team 的参数
| 名称, 类型, 说明 |
|---|
accept string Setting to |
| 名称, 类型, 说明 |
|---|
org string 必须The organization name. The name is not case sensitive. |
team_slug string 必须The slug of the team name. |
“Remove a security manager team”的 HTTP 响应状态代码
| 状态代码 | 说明 |
|---|---|
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