Skip to main content

We've recently moved some of the REST API documentation. If you can't find what you're looking for, you might try the Actions REST API page.

SCIM

List provisioned SCIM groups for an enterprise

Funciona con GitHub Apps

Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.

Parámetros

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

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

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

Parámetros de consulta
Nombre, Tipo, Descripción
startIndexinteger

Used for pagination: the index of the first result to return.

countinteger

Used for pagination: the number of results to return.

filterstring

filter results

excludedAttributesstring

attributes to exclude

Códigos de estado de respuesta HTTP

Código de estadoDescripción
200

OK

Ejemplos de código

get/scim/v2/enterprises/{enterprise}/Groups
curl \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token <TOKEN>" \ https://HOSTNAME/api/v3/scim/v2/enterprises/ENTERPRISE/Groups

Response

Status: 200
{ "schemas": [ "urn:ietf:params:scim:api:messages:2.0:ListResponse" ], "totalResults": 2, "itemsPerPage": 2, "startIndex": 1, "Resources": [ { "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group" ], "id": "abcd27f8-a9aa-11ea-8221-f59b2be9cccc", "externalId": null, "displayName": "octo-org", "members": [ { "value": "92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "$ref": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "display": "octocat@github.com" }, { "value": "aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5", "$ref": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5", "display": "hubot@example.com" } ], "meta": { "resourceType": "Group", "created": "2020-06-09T03:10:17.000+10:00", "lastModified": "2020-06-09T03:10:17.000+10:00", "location": "https://api.github.com/scim/v2/enterprises/octo-corp/Groups/abcd27f8-a9aa-11ea-8221-f59b2be9cccc" } }, { "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group" ], "id": "5e75bbbb-aa1a-11ea-8644-75ff655cdddd", "externalId": null, "displayName": "octo-docs-org", "members": [ { "value": "92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "$ref": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "display": "octocat@github.com" } ], "meta": { "resourceType": "Group", "created": "2020-06-09T16:28:01.000+10:00", "lastModified": "2020-06-09T16:28:01.000+10:00", "location": "https://api.github.com/scim/v2/enterprises/octo-corp/Groups/5e75bbbb-aa1a-11ea-8644-75ff655cdddd" } } ] }

Provision a SCIM enterprise group and invite users

Funciona con GitHub Apps

Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.

Provision an enterprise group, and invite users to the group. This sends invitation emails to the email address of the invited users to join the GitHub organization that the SCIM group corresponds to.

Parámetros

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

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

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

Parámetros de cuerpo
Nombre, Tipo, Descripción
schemasarray of stringsRequerido

The SCIM schema URIs.

displayNamestringRequerido

The name of the SCIM group. This must match the GitHub organization that the group maps to.

membersarray of objects
Nombre, Tipo, Descripción
valuestringRequerido

The SCIM user ID for a user.

Códigos de estado de respuesta HTTP

Código de estadoDescripción
201

Created

Ejemplos de código

post/scim/v2/enterprises/{enterprise}/Groups
curl \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token <TOKEN>" \ https://HOSTNAME/api/v3/scim/v2/enterprises/ENTERPRISE/Groups \ -d '{"schemas":["urn:ietf:params:scim:schemas:core:2.0:Group"],"displayName":"octo-org","members":[{"value":"92b58aaa-a1d6-11ea-8227-b9ce9e023ccc"},{"value":"aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5"}]}'

Response

Status: 201
{ "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group" ], "id": "abcd27f8-a9aa-11ea-8221-f59b2be9cccc", "externalId": null, "displayName": "octo-org", "members": [ { "value": "92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "$ref": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "display": "octocat@github.com" }, { "value": "aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5", "$ref": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5", "display": "hubot@example.com" } ], "meta": { "resourceType": "Group", "created": "2020-06-09T03:10:17.000+10:0", "lastModified": "2020-06-09T03:10:17.000+10:00", "location": "https://api.github.com/scim/v2/enterprises/octo-corp/Groups/abcd27f8-a9aa-11ea-8221-f59b2be9cccc" } }

Get SCIM provisioning information for an enterprise group

Funciona con GitHub Apps

Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.

Parámetros

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

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

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

scim_group_idstringRequerido

Identifier generated by the GitHub SCIM endpoint.

Parámetros de consulta
Nombre, Tipo, Descripción
excludedAttributesstring

Attributes to exclude.

Códigos de estado de respuesta HTTP

Código de estadoDescripción
200

OK

Ejemplos de código

get/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}
curl \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token <TOKEN>" \ https://HOSTNAME/api/v3/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID

Response

Status: 200
{ "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group" ], "id": "abcd27f8-a9aa-11ea-8221-f59b2be9cccc", "externalId": null, "displayName": "octo-org", "members": [ { "value": "92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "$ref": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "display": "octocat@github.com" }, { "value": "aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5", "$ref": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5", "display": "hubot@example.com" } ], "meta": { "resourceType": "Group", "created": "2020-06-09T03:10:17.000+10:0", "lastModified": "2020-06-09T03:10:17.000+10:00", "location": "https://api.github.com/scim/v2/enterprises/octo-corp/Groups/abcd27f8-a9aa-11ea-8221-f59b2be9cccc" } }

Set SCIM information for a provisioned enterprise group

Funciona con GitHub Apps

Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.

Replaces an existing provisioned group’s information. You must provide all the information required for the group as if you were provisioning it for the first time. Any existing group information that you don't provide will be removed, including group membership. If you want to only update a specific attribute, use the Update an attribute for a SCIM enterprise group endpoint instead.

Parámetros

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

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

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

scim_group_idstringRequerido

Identifier generated by the GitHub SCIM endpoint.

Parámetros de cuerpo
Nombre, Tipo, Descripción
schemasarray of stringsRequerido

The SCIM schema URIs.

displayNamestringRequerido

The name of the SCIM group. This must match the GitHub organization that the group maps to.

membersarray of objects
Nombre, Tipo, Descripción
valuestringRequerido

The SCIM user ID for a user.

Códigos de estado de respuesta HTTP

Código de estadoDescripción
200

OK

Ejemplos de código

put/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}
curl \ -X PUT \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token <TOKEN>" \ https://HOSTNAME/api/v3/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID \ -d '{"schemas":["urn:ietf:params:scim:schemas:core:2.0:Group"],"displayName":"octo-org","members":[{"value":"92b58aaa-a1d6-11ea-8227-b9ce9e023ccc"},{"value":"aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5"}]}'

Response

Status: 200
{ "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group" ], "id": "abcd27f8-a9aa-11ea-8221-f59b2be9cccc", "externalId": null, "displayName": "octo-org", "members": [ { "value": "92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "$ref": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "display": "octocat@github.com" }, { "value": "aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5", "$ref": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5", "display": "hubot@example.com" } ], "meta": { "resourceType": "Group", "created": "2020-06-09T03:10:17.000+10:0", "lastModified": "2020-06-09T03:10:17.000+10:00", "location": "https://api.github.com/scim/v2/enterprises/octo-corp/Groups/abcd27f8-a9aa-11ea-8221-f59b2be9cccc" } }

Update an attribute for a SCIM enterprise group

Funciona con GitHub Apps

Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.

Allows you to change a provisioned group’s individual attributes. To change a group’s values, you must provide a specific Operations JSON format that contains at least one of the add, remove, or replace operations. For examples and more information on the SCIM operations format, see the SCIM specification.

Parámetros

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

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

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

scim_group_idstringRequerido

Identifier generated by the GitHub SCIM endpoint.

Parámetros de cuerpo
Nombre, Tipo, Descripción
schemasarray of stringsRequerido

The SCIM schema URIs.

Operationsarray of objectsRequerido

Array of SCIM operations.

Nombre, Tipo, Descripción
opstringRequerido

Puede ser una de las siguientes: add, Add, remove, Remove, replace, Replace

pathstring
value

Can be any value - string, number, array or object.

Códigos de estado de respuesta HTTP

Código de estadoDescripción
200

OK

Ejemplos de código

patch/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}
curl \ -X PATCH \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token <TOKEN>" \ https://HOSTNAME/api/v3/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID \ -d '{"schemas":["urn:ietf:params:scim:api:messages:2.0:PatchOp"],"Operations":[{"op":"remove","path":"members","value":[{"value":"aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5"}]}]}'

Response

Status: 200
{ "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group" ], "id": "abcd27f8-a9aa-11ea-8221-f59b2be9cccc", "externalId": null, "displayName": "octo-org", "members": [ { "value": "92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "$ref": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "display": "octocat@github.com" } ], "meta": { "resourceType": "Group", "created": "2020-06-09T03:10:17.000+10:00", "lastModified": "2020-06-09T03:10:17.000+10:00", "location": "https://api.github.com/scim/v2/enterprises/octo-corp/Groups/abcd27f8-a9aa-11ea-8221-f59b2be9cccc" } }

Delete a SCIM group from an enterprise

Funciona con GitHub Apps

Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.

Parámetros

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

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

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

scim_group_idstringRequerido

Identifier generated by the GitHub SCIM endpoint.

Códigos de estado de respuesta HTTP

Código de estadoDescripción
204

No Content

Ejemplos de código

delete/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}
curl \ -X DELETE \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token <TOKEN>" \ https://HOSTNAME/api/v3/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID

Response

Status: 204