このバージョンの GitHub Enterprise はこの日付をもって終了となりました: 2023-03-15. 重大なセキュリティの問題に対してであっても、パッチリリースは作成されません。 パフォーマンスの向上、セキュリティの向上、新機能の向上を図るために、最新バージョンの GitHub Enterprise にアップグレードします。 アップグレードに関するヘルプについては、GitHub Enterprise サポートにお問い合わせください。
カスタム リポジトリ ロール
この REST API を使って、カスタム リポジトリ ロールを操作します。
List custom repository roles in an organization
List the custom repository roles available in this organization. In order to see custom repository roles in an organization, the authenticated user must be an organization owner.
To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organization and must use an access token with admin:org repo
scope.
GitHub Apps must have the organization_custom_roles:read
organization permission to use this endpoint.
For more information on custom repository roles, see "About custom repository roles."
"List custom repository roles in an organization" のパラメーター
ヘッダー |
---|
名前, Type, 説明 |
accept string Setting to |
パス パラメーター |
名前, Type, 説明 |
organization_id string 必須The unique identifier of the organization. |
"List custom repository roles in an organization" の HTTP 応答状態コード
状態コード | 説明 |
---|---|
200 | Response - list of custom role names |
"List custom repository roles in an organization" のコード サンプル
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/organizations/ORGANIZATION_ID/custom_roles
Response - list of custom role names
Status: 200
{
"total_count": 2,
"custom_roles": [
{
"id": 8030,
"name": "Developer"
},
{
"id": 8031,
"name": "Designer"
}
]
}