Skip to main content
All CollectionsAPI DocumentationSCIM
SCIM API User Groups Endpoints
SCIM API User Groups Endpoints
Harrison Hunter avatar
Written by Harrison Hunter
Updated over a year ago

The Usergroups Endpoints can be used to manage Users Groups via API

Summary of Functions

  1. Create UserGroup - POST to BASE_URL/Usergroups

  2. Get UserGroups - GET to BASE_URL/Usergroups

  3. Get UserGroup By Id - GET to BASE_URL/Usergroups/:GroupId

  4. Modify UserGroup - PUT to BASE_URL/Usergroups/:GroupId

  5. Modify UserGroup - PATCH to BASE_URL/Usergroups/:GroupId

  6. Delete UserGroup - DELETE to BASE_URL/Usergroups/:GroupId


User Groups Schema

{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
"displayName": "string",
"members": [userIDs],
"owners": [userIDs]
}

The Endpoints

Create a Group

POST BASE_URL/Usergroups
Headers:
apiToken: "<token>" | Authorization: "Basic <encoded token>"
Content-Type: "application/json; charset=utf-8"

Required: schemas, displayName

Body:
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
"displayName": "Group Name",
"members": ["1gfedcba", "2onmlkji"],
"owners": ["abcdefg", "hijklmno"]
}

Response:
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
"id": "abcD3fgH1"
"displayName": "Group Name",
"members": ["1gfedcba", "2onmlkji"],
"owners": ["abcdefg", "hijklmno"]
}

Get multiple User Groups

GET BASE_URL/Usergroups
Headers:
apiToken: "<token>" | Authorization: "Basic <encoded token>"
Content-Type: "application/json; charset=utf-8"

Query Parameters:
count - Integer - number of users to return.
startIndex - Integer - offset from 1 to start returning the specified number of users from.

Response:
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
"totalResults": NumberofGroupsinSystem,
"startIndex": 1,
"itemsPerPage": 20,
"Resources": [ array of GroupObjects ]
}

Get Specific User Group

GET BASE_URL/Usergroups/:id
Headers:
apiToken: "<token>" | Authorization: "Basic <encoded token>"
Content-Type: "application/json; charset=utf-8"

Response:
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
"id": "abcD3fgH1"
"displayName": "Group Name",
"members": ["1gfedcba", "2onmlkji"],
"owners": [userIDs]
}

Modify an Existing Group

PUT BASE_URL/Usergroups/:id
Headers:
apiToken: "<token>" | Authorization: "Basic <encoded token>"
Content-Type: "application/json; charset=utf-8"

Required: schemas, id
Body:
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
"id": "abcD3fgH1",
"members":["1gfedcba", "2onmlkji"]
}

Response:
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
"id": "abcD3fgH1"
"displayName": "Group Name",
"members": ["1gfedcba", "2onmlkji"],
"owners": ["abcdefg", "hijklmno"]
}

PATCH BASE_URL/Usergroups/:id
Headers:
apiToken: "<token>" | Authorization: "Basic <encoded token>"
Content-Type: "application/json; charset=utf-8"

Required: schemas, id
Body:
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [{
"op": "add | remove | replace",
"path": "owners | members",
"value": [
{ "value": "userID" },
{ "value": "userID" }
]
}]
}

Response:
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
"totalResults": 1,
"startIndex": 1,
"itemsPerPage": 20,
"Resources": [ array of GroupObjects ]
}

Delete Group

DELETE BASE_URL/Usergroups/:id
Headers:
apiToken: "<token>" | Authorization: "Basic <encoded token>"
Content-Type: "application/json; charset=utf-8"

Response: HTTP 204 No Content

Did this answer your question?