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
Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
Parâmetros
Headers |
---|
Nome, Tipo, Descrição |
accept stringSetting to |
Path parameters |
Nome, Tipo, Descrição |
enterprise stringObrigatórioThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
Parâmetros de consulta |
Nome, Tipo, Descrição |
startIndex integerUsed for pagination: the index of the first result to return. |
count integerUsed for pagination: the number of results to return. |
filter stringfilter results |
excludedAttributes stringattributes to exclude |
HTTP response status codes
Status code | Descrição |
---|---|
200 | OK |
Amostras de código
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
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
Headers | |||||
---|---|---|---|---|---|
Nome, Tipo, Descrição | |||||
accept stringSetting to | |||||
Path parameters | |||||
Nome, Tipo, Descrição | |||||
enterprise stringObrigatórioThe slug version of the enterprise name. You can also substitute this value with the enterprise id. | |||||
Body parameters | |||||
Nome, Tipo, Descrição | |||||
schemas array of stringsObrigatórioThe SCIM schema URIs. | |||||
displayName stringObrigatórioThe name of the SCIM group. This must match the GitHub organization that the group maps to. | |||||
members array of objects | |||||
Properties of the |
Nome, Tipo, Descrição |
---|
value stringObrigatórioThe SCIM user ID for a user. |
HTTP response status codes
Status code | Descrição |
---|---|
201 | Created |
Amostras de código
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
Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
Parâmetros
Headers |
---|
Nome, Tipo, Descrição |
accept stringSetting to |
Path parameters |
Nome, Tipo, Descrição |
enterprise stringObrigatórioThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
scim_group_id stringObrigatórioIdentifier generated by the GitHub SCIM endpoint. |
Parâmetros de consulta |
Nome, Tipo, Descrição |
excludedAttributes stringAttributes to exclude. |
HTTP response status codes
Status code | Descrição |
---|---|
200 | OK |
Amostras de código
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
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
Headers | |||||
---|---|---|---|---|---|
Nome, Tipo, Descrição | |||||
accept stringSetting to | |||||
Path parameters | |||||
Nome, Tipo, Descrição | |||||
enterprise stringObrigatórioThe slug version of the enterprise name. You can also substitute this value with the enterprise id. | |||||
scim_group_id stringObrigatórioIdentifier generated by the GitHub SCIM endpoint. | |||||
Body parameters | |||||
Nome, Tipo, Descrição | |||||
schemas array of stringsObrigatórioThe SCIM schema URIs. | |||||
displayName stringObrigatórioThe name of the SCIM group. This must match the GitHub organization that the group maps to. | |||||
members array of objects | |||||
Properties of the |
Nome, Tipo, Descrição |
---|
value stringObrigatórioThe SCIM user ID for a user. |
HTTP response status codes
Status code | Descrição |
---|---|
200 | OK |
Amostras de código
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
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
Headers | |||||||
---|---|---|---|---|---|---|---|
Nome, Tipo, Descrição | |||||||
accept stringSetting to | |||||||
Path parameters | |||||||
Nome, Tipo, Descrição | |||||||
enterprise stringObrigatórioThe slug version of the enterprise name. You can also substitute this value with the enterprise id. | |||||||
scim_group_id stringObrigatórioIdentifier generated by the GitHub SCIM endpoint. | |||||||
Body parameters | |||||||
Nome, Tipo, Descrição | |||||||
schemas array of stringsObrigatórioThe SCIM schema URIs. | |||||||
Operations array of objectsObrigatórioArray of SCIM operations. | |||||||
Properties of the |
Nome, Tipo, Descrição |
---|
op stringObrigatórioPode ser uma das ações a seguir: |
path string |
value Can be any value - string, number, array or object. |
HTTP response status codes
Status code | Descrição |
---|---|
200 | OK |
Amostras de código
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
Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
Parâmetros
Headers |
---|
Nome, Tipo, Descrição |
accept stringSetting to |
Path parameters |
Nome, Tipo, Descrição |
enterprise stringObrigatórioThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
scim_group_id stringObrigatórioIdentifier generated by the GitHub SCIM endpoint. |
HTTP response status codes
Status code | Descrição |
---|---|
204 | No Content |
Amostras de código
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