Skip to main content

Custom Repository Roles

List custom repository roles in an organization

Funciona con 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.

For more information on custom repository roles, see "Managing custom repository roles for an organization".

Parámetros

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

Parámetros de ruta
Nombre, Tipo, Descripción
organization_idstringRequerido

Códigos de estado de respuesta HTTP

Código de estadoDescripción
200

Response - list of custom role names

Ejemplos de código

get/organizations/{organization_id}/custom_roles
curl \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token <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" } ] }