Update Users through Postman
The System for Cross-domain Identity Management (SCIM) specification is a standard for automating the exchange of user identity information between identity domains, or IT systems. It makes managing user identities in cloud-based applications and services easier.
For more information on creating the SCIM access token refer to SCIM access token .
Support for Process Manager
Process Manager is compliant with the SCIM 2 standard. This means it implements the full API, however only the mandatory endpoints have been implemented.
These implemented endpoints include:
Resource | Endpoint |
|
||||||||||
User | /Users |
|
Prerequisites
Before using Postman the following prerequisites must be met:
-
Create the SCIM access token following the steps outlined here
-
Download Postman
Once you have a token you can configure your application to make calls to the following URL:
https://api.promapp.com/api/scim
Create a request in Postman
-
Download and open Postman.
-
Create a request and choose the request type. The following methods are supported:
-
GET
-
PATCH
-
POST
-
PUT
-
DELETE
-
-
Provide a correct URL e.g. https://api.promapp.com/api/scim/users in the address bar.
-
Select the Authorization tab, and select “OAuth 2.0” as the auth type and valid access token.
-
Add in the payload information or request parameters.
-
Click Send.
-
Review the response.
Create a user (POST request)
Creating a user can be done by making a Post request. The minimal model for creating a user requires the following SCIM user resource model attributes:
Create a user using POST request can also be done using a curl request. The curl URL for minimal model is as given below:
curl -X POST "https://api.promapp.com/api/scim/Users" -H "Authorization: Bearer 2y_M7vpO42o-NmbOJY4ZD6Xl-qBksINIQ7q3_Oq9I6U" -H "accept: application/json" -H "Content-Type: application/json-patch+json" -d "{ \"userName\": \"joe.bloggs\", \"name\": { \"familyName\": \"string\", \"givenName\": \"string\", \"timezone\": \"string\", \"active\": true, \"emails\": [ { \"value\": \"string\", } ],}"
The example model for all attributes currently supported by Nintex Process Manager to create a new user are as follows:
Create a user using POST request can also be done using curl request. The curl URL for with all the supported attribute is as given below:
curl -X POST "https://api.promapp.com/api/scim/Users" -H "Authorization: Bearer 2y_M7vpO42o-NmbOJY4ZD6Xl-qBksINIQ7q3_Oq9I6U" -H "accept: application/json" -H "Content-Type: application/json-patch+json" -d "{ \"userName\": \"joe.bloggs\", \"name\": { \"familyName\": \"Bloggs\". \"givenName\": \"Joe\" }, \"active\": true, \"password\":\"t1meMa$heen\", \"preferredLanguage\":\"en_US\", \"timezone\": \"America/Los_Angeles\", \"emails\": [ { \"value\": \"j/bloggs@example.com\" } ], \"roles\": [ { \"display\": \"Author\" }, { \"display\": \"Accountant\" } ],}"
The POST request to create a new user can result into the following responses:
Status Code | Response |
201 | Created |
400 | Bad Request |
401 | Unauthorized |
500 | Internal Server Error |
Get user information (GET request)
These types of requests are made to get information about the user. This request can also be used to search for, or gather information about a user.
Method | URL |
GET (using Id) | https://api.promapp.com/api/scim/users/{id} |
GET (using filters) | https://api.promapp.com/api/scim/users?filter=username eq “jo” |
This request can result into different types of responses.
Status Code | Response |
200 | OK |
401 | Unauthorized |
400 | Bad Request |
404 | User Not Found |
500 | Internal Server Error |
GET request can also be used with filter as described in the table below. There are different types of filters (operator) that can be used to filter the result.
Filter Type (Operator) | Description | Example |
Eq | Values of filter type and attribute must be the same. | Filter=userName eq “bjensen” |
Ne | Values of filter type and attribute are not same. | Filter=userName ne “doe” |
Gt | Value of attribute is greater than the operator value. Comparison also depends on the attribute type. | filter=meta.lastModified gt "2011-05-13T04:42:34Z" |
Ge | Value of attribute is greater than or equal to the operator value. Comparison also depends on the attribute type. | filter=meta.lastModified ge "2011-05-13T04:42:34Z" |
Lt | Value of the attribute is less than the operator value. Comparison also depends on the attribute type. | filter=meta.lastModified lt "2011-05-13T04:42:34Z" |
Le | Value of the attribute is less than or equal to the operator value. Comparison also depends on the attribute type. | filter=meta.lastModified le "2011-05-13T04:42:34Z" |
Count | The response does not contain result than the specified although may contain fewer than requested. | filter=meta.created gt "2012-09-18T03:56:54Z" & count=10 |
And | Logical operator. It can be used to use more than one operator, and evaluation of both expressions must be true. | filter=title pr and userType eq "Employee" |
Or | Logical operator. It can be used to use more than one operator, and evaluation of either expression must be true. | filter=title pr or userType eq "Intern" |
Multi | filter=meta[created gt "2015-09-18T00:00:00Z" and created lt "2016-09-18T00:00:00Z"] |
Update a user (PUT method)
This method can be used to update a specific user. The minimal model for updating a user requires the id of the user.
Method | URL |
PUT | https://api.promapp.com/api/scim/users/{id} |
Minimal model for updating the user is as given below:
Updating a user using a PUT request can also be done using curl request. The curl URL for minimal model is as given below:
curl -X PUT "https://api.promapp.com/api/scim/Users" -H "Authorization: Bearer 2y_M7vpO42o-NmbOJY4ZD6Xl-qBksINIQ7q3_Oq9I6U" -H "accept: application/json" -H "Content-Type: application/json-patch+json" -d "{ \"userName\": \"joe.bloggs\", \"name\": { \"familyName\": \"Bloggs\". \"givenName\": \"Joe\" }, \"active\": true, \"password\":\"t1meMa$heen\", \"preferredLanguage\":\"en_US\", \"timezone\": \"America/Los_Angeles\", \"emails\": [ { \"value\": \"j/bloggs@example.com\" } ]}"
The table below lists the attributes that can be updated using PUT request:
Attribute | Type |
UserName | String |
Name.FamilyName | String |
Name.GivenName | String |
Timezone | String |
Active | String |
Collection | |
Roles.Display | Collection |
This request can result into different types of responses.
Status Code | Response |
200 | OK |
401 | Unauthorized |
400 | Bad Request |
404 | User Not Found |
500 | Internal Server Error |
Patch a user (PATCH method)
This method can be used to patch a specific user. The minimal model for patching a user requires the id of the user and at least one operation (add, remove, or replace).
Method | URL |
PATCH | https://api.promapp.com/api/scim/users/{id} |
Minimal model for updating the user is as given below:
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"operations": [
{
"op": "replace",
"path": "name.familyName",
"value": "BloggsPatched"
}
]
}
Patch a user using a PATCH request can also be done using curl request. The curl URL for minimal model is as given below:
curl -X POST "https://api.promapp.com/api/scim/Users" -H "Authorization: Bearer 2y_M7vpO42o-NmbOJY4ZD6Xl-qBksINIQ7q3_Oq9I6U" -H "accept: application/json" -H "Content-Type: application/json-patch+json" -d "{ "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"], "operations": [{ "op": "replace", "path": "name.familyName", "value": "BloggsPatched" } ]}"
The table below lists the attributes that can be updated using PATCH request:
Attribute | Type |
Name.FamilyName | String |
Name.GivenName | String |
Active | Boolean |
Emails | Collection |
Roles.Display | Collection |
This request can result into different types of responses.
Status Code | Response |
200 | OK |
401 | Unauthorized |
400 | Bad Request |
404 | User Not Found |
500 | Internal Server Error |
Deactivate a user (DELETE method)
Delete request needs to be done to deactivate a user using the id of the user.
Method | URL |
DELETE | https://api.promapp.com/api/scim/users/{id} |
This request can result into different types of responses.
Status Code | Response |
200 | OK |
401 | Unauthorized |
400 | Bad Request |
404 | User Not Found |
500 | Internal Server Error |
Limitations and Considerations
Limitations to note when using Postman and SCIM:
-
User permissions cannot be updated using Process Manager SCIM API
- For POST and PUT requests, roles that do not exist in Process Manager will be created and the user added to the new role.
- For PUT requests with a roles attribute, the request will remove the user from a role if the role is not included in the request.
- For PUT requests that do not include a roles attribute, the request will leave the roles unchanged (the user will not be removed from any roles).
- For PATCH requests, Add and Replace operations with roles that do not exist in Process Manager will create the role and add the user to that role.
- For Add and Replace PATCH operations, roles that do not exist in Process Manager will be created and the user added to the new role.
- For Remove and Replace PATCH operations, users will be removed from the role if the path matches.