Skip to main content
REST API はバージョン管理になりました。 詳細については、「API のバージョン管理について」を参照してください。

セキュリティ マネージャーの REST API エンドポイント

REST API を使って、組織のセキュリティ マネージャーを管理します。

セキュリティ マネージャーについて

注: セキュリティ マネージャーロールはパブリック ベータ版であり、変更される可能性があります。

セキュリティ マネージャーは、Organization の所有者が Organization 内の任意の Team に割り当てることができる Organization レベルのロールです。 適用すると、チームのすべてのメンバーに、組織 全体のCODEセキュリティ に対するセキュリティアラートと設定をビューするためのアクセス許可と、組織 内のすべてのリポジトリの読み取りアクセス許可が付与されます。

List security manager teams

Lists teams that are security managers for an organization. For more information, see "Managing security managers in your organization."

The authenticated user must be an administrator or security manager for the organization to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint.

"List security manager teams" のきめ細かいアクセス トークン

このエンドポイントは、次の粒度の細かいトークンの種類で動作します:

粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:

  • "Administration" organization permissions (read)

"List security manager teams" のパラメーター

ヘッダー
名前, Type, 説明
accept string

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

パス パラメーター
名前, Type, 説明
org string 必須

The organization name. The name is not case sensitive.

"List security manager teams" の HTTP 応答状態コード

状態コード説明
200

OK

"List security manager teams" のコード サンプル

要求の例

get/orgs/{org}/security-managers
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-managers

Response

Status: 200
[ { "id": 1, "node_id": "MDQ6VGVhbTE=", "url": "https://HOSTNAME/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://HOSTNAME/teams/1/members{/member}", "repositories_url": "https://HOSTNAME/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."

The authenticated user must be an administrator for the organization to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.

"Add a security manager team" のきめ細かいアクセス トークン

このエンドポイントは、次の粒度の細かいトークンの種類で動作します:

粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:

  • "Administration" organization permissions (write)

"Add a security manager team" のパラメーター

ヘッダー
名前, Type, 説明
accept string

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

パス パラメーター
名前, Type, 説明
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

409

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

"Add a security manager team" のコード サンプル

要求の例

put/orgs/{org}/security-managers/teams/{team_slug}
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_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."

The authenticated user must be an administrator for the organization to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.

"Remove a security manager team" のきめ細かいアクセス トークン

このエンドポイントは、次の粒度の細かいトークンの種類で動作します:

粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:

  • "Administration" organization permissions (write)

"Remove a security manager team" のパラメーター

ヘッダー
名前, Type, 説明
accept string

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

パス パラメーター
名前, Type, 説明
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" のコード サンプル

要求の例

delete/orgs/{org}/security-managers/teams/{team_slug}
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_SLUG

Response

Status: 204