All Collections
API Documentation
SCIM
SCIM API Groups Endpoints
SCIM API Groups Endpoints
A
Written by Amrisha Sinha
Updated over a week ago

The Groups endpoints can be used to manage Agent Groups via API

Summary of Functions

  1. Create Group - POST to BASE_URL/Groups

  2. Get Groups - GET to BASE_URL/Groups

  3. Get Group By Id - GET to BASE_URL/Groups/:GroupId

  4. Modify Group - PUT to BASE_URL/Groups/:GroupId

  5. Modify Group - PATCH to BASE_URL/Groups/:GroupId

  6. Delete Group - DELETE to BASE_URL/Groups/:GroupId


The Groups Schema

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

Agent Groups members are agents in the maestroqa app. The Members field can accept emails of agents in the system, userIDs of agents in the system or externalIDs of agents in the system.


Endpoints

Create a Group

POST BASE_URL/Groups
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": ["agent@example.com", "agent2@example.com"],
"owners": ["abcdefg", "hijklmno"]
}

Response:
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
"id": "abcD3fgH1"
"displayName": "Group Name",
"members": ["agent@example.com", "agent2@example.com"],
"owners": ["abcdefg", "hijklmno"]
}

Get multiple Groups

GET BASE_URL/Groups
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 Group

GET BASE_URL/Groups/: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": ["agent@example.com", "agent2@example.com"],
"owners": [userIDs]
}

Modify an Existing Group

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

Required: schemas
Body:
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
"id": "abcD3fgH1",
"members": ["agent3@example.com", "agent4@example.com"]
}

Response:
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
"id": "abcD3fgH1"
"displayName": "Group Name",
"members": ["agent3@example.com", "agent4@example.com"],
"owners": ["abcdefg", "hijklmno"]
}

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

Required: schemas
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/Groups/: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?