All Collections
API Documentation
SCIM
SCIM API Users Endpoints
SCIM API Users Endpoints
Harrison Hunter avatar
Written by Harrison Hunter
Updated over a week ago

The Users Endpoints can be used to Manage User Accounts in the Maestro App via API

Summary of Functions

  1. Create User - POST to BASE_URL/Users

  2. Get Users - GET to BASE_URL/Users

  3. Get User By Id - GET to BASE_URL/Users/:UserId

  4. Modify/Deactivate/Update User - PUT to BASE_URL/Users/:UserId

Note: Endpoint URLs are case-sensitive

Ex., https://app.maestroqa.com/api/v1/scim/v2/Users -> "Users" must be capitalized to execute a successful request.


The User Schema

{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"id": userID
"userName": "username@example.com",
"name": {
"givenName": "<GivenName>",
"familyName": "<FamilyName>"
},
"emails": [{
"value": "username@example.com",
"primary": true
}],
"displayName": "<display name>",
"externalId": "<externalId>",
"groups": [],
"active": true | false,
"roles": ["admin|limitedAdmin|manager|grader|limited_agent|agent"],
"profile": {
"AttributeName": "Value of Attribute",
"AttributeName": “Value of Attribute"
}
}

The Endpoints

Create a User

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

Required: schemas, userName

Body:
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"userName": "username@example.com",
"name": {
"givenName": "FirstName",
"familyName": "LastName"
},
"emails": [{
"value": "username@example.com",
"primary": true
}],
"displayName": "FirstName LastName",
"active": true,
"roles": ["manager"],
"profile": {
"Title": "Manager",
"Location": “Here"
}
}

Response:
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"id": "aBcd3fgH1Jkl"
"userName": "username@example.com",
"name": {
"givenName": "FirstName",
"familyName": "LastName"
},
"emails": [{
"value": "username@example.com",
"primary": true
}],
"externalId": "123456"
"displayName": "FirstName LastName",
"active": true,
"roles": ["manager"],
"profile": {
"Title": "Manager",
"Location": “Here"
}
}

Get Users

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

Optional query Parameters:
count - Integer - number of users to return.

startIndex - Integer - offset from 1 to start returning the specified number of users from.

filter - can be used to find user by userName (email) or userAccessLevel (role).
The filter parameter must include an attribute name followed by an attribute operator, then the desired value.
Example value: userName eq "user@maestroqa.com"

Response:
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"]
"totalResults": NumberofUsersinSystem,
"startIndex": 1,
"itemsPerPage": 20,
"Resources": [ array of UserObjects ]
}

Get a Specific User by Id

GET BASE_URL/Users/: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:User"],
"id": "aBcd3fgH1Jkl"
"userName": "username@example.com",
"name": {
"givenName": "FirstName",
"familyName": "LastName"
},
"emails": [{
"value": "username@example.com",
"primary": true
}],
"externalId": "123456"
"displayName": "FirstName LastName",
"active": true,
"roles": ["manager"],
"profile": {
"Title": "Manager",
"Location": “Here"
}
}

Modify an Existing User

Send a Payload of parameters in the user schema that should be over written

PUT BASE_URL/Users/: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:User"],
"id": "aBcd3fgH1Jkl"
"roles": ["grader"],
"profile": {
"Title": "Grader"
}
}

Response:
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"id": "aBcd3fgH1Jkl"
"userName": "username@example.com",
"name": {
"givenName": "FirstName",
"familyName": "LastName"
},
"emails": [{
"value": "username@example.com",
"primary": true
}],
"externalId": "123456"
"displayName": "FirstName LastName",
"active": true,
"roles": ["grader"],
"profile": {
"Title": "Grader",
"Location": “Here"
}
}
Did this answer your question?