Skip to main content
사이트 관리자가 Enterprise Server 인스턴스를 Enterprise Server 3.9 이상으로 업그레이드하면 REST API의 버전이 지정됩니다. 인스턴스의 버전을 찾는 방법을 알아보려면 "GitHub Docs 버전 정보"를 참조하세요. 자세한 내용은 "API 버전 관리 정보"를 참조하세요.

사용자 지정 리포지토리 역할

REST API를 사용하여 사용자 지정 리포지토리 역할과 상호 작용합니다.

List custom repository roles in an organization

Works with GitHub Apps

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 application/vnd.github+json is recommended.

경로 매개 변수
이름, Type, 설명
organization_id string Required

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"에 대한 코드 샘플

get/organizations/{organization_id}/custom_roles
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" } ] }