Skip to main content

Enterprise Server 3.21 は、現在リリース候補として使用できます。

REST API はバージョン化されました。 詳細については、「API のバージョン管理について」を参照してください。

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

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

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

セキュリティ マネージャー ロールは、organization 所有者が organization 内の任意のメンバーまたはチームに割り当てることができる organization レベルのロールです。 適用すると、セキュリティ アラートを表示し、organization 全体のセキュリティ機能の設定を管理するアクセス許可と、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 tokens for "List security manager teams"

This endpoint works with the following fine-grained token types:

The fine-grained token must have the following permission set:

  • "Administration" organization permissions (read)

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

ヘッダー
名前, タイプ, 説明
accept string

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

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

The organization name. The name is not case sensitive.

HTTP response status codes for "List security manager teams"

Status code説明
200

OK

Code samples for "List security manager teams"

Request example

get/orgs/{org}/security-managers
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ http(s)://HOSTNAME/api/v3/orgs/ORG/security-managers

Response

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 tokens for "Add a security manager team"

This endpoint works with the following fine-grained token types:

The fine-grained token must have the following permission set:

  • "Administration" organization permissions (write)

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

ヘッダー
名前, タイプ, 説明
accept string

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

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

The organization name. The name is not case sensitive.

team_slug string 必須

The slug of the team name.

HTTP response status codes for "Add a security manager team"

Status code説明
204

No Content

Code samples for "Add a security manager team"

Request example

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: 2026-03-10" \ http(s)://HOSTNAME/api/v3/orgs/ORG/security-managers/teams/TEAM_SLUG

Response

Status: 204

Remove 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 tokens for "Remove a security manager team"

This endpoint works with the following fine-grained token types:

The fine-grained token must have the following permission set:

  • "Administration" organization permissions (write)

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

ヘッダー
名前, タイプ, 説明
accept string

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

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

The organization name. The name is not case sensitive.

team_slug string 必須

The slug of the team name.

HTTP response status codes for "Remove a security manager team"

Status code説明
204

No Content

Code samples for "Remove a security manager team"

Request example

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: 2026-03-10" \ http(s)://HOSTNAME/api/v3/orgs/ORG/security-managers/teams/TEAM_SLUG

Response

Status: 204