Get user information using REST

<< Click to Display Table of Contents >>

Navigation:  Low-code Process Automation > Studio Cloud - Authoring environment > Bizagi Studio > Security definition > Work Portal Security > Synchronizing users > Synchronizing users using SCIM's REST methods > Getting started with user sync using REST >

Get user information using REST

To get a user's information using the Bizagi SCIM you must use the service described in this article. The following example uses POSTMAN as the client, but you can invoke this service from any client compatible with RESTful services with OAUth 2.0 authentication.

 

Before continue, review the Getting started with the synchronization procedure section.

 

Resource URL

[Project_URL]/scim/v2/Users/{username}

 

HTTP Method

GET

 

Authorization

OAuth 2.0

 

Input

The username or ID ( guidUser from the WFUser table) sent in the URL.

 

URL Example:

[Project_URL]/scim/v2/Users/MarkW

 

This gets the information of the username MarkW. If you have multiple domains you can send this parameter using this format

 

userName@domain

 

The final execution in POSTMAN looks like this:

 

SCIM_11

 

The response is a JSON with the SCIM schema and the information is saved in Bizagi.

 

Ordering your results

By default, Bizagi returns the first 100 users. However, you can look for specific pages, sort, or increase the results per page.  The number of results, items per page, and startIndex are displayed in the JSON.

 

You can change any of these values in the invocation of the method, Where

 

startIndex: Indicates the first page to be displayed in the result. By default is one, and values less than one are considered as one.

count: Number of maximum results. This value cannot be greater than 500.

sortBy: Indicates the attribute used to sort the results. See which attributes you can use. If you use any name attribute, Bizagi sorts the result using the attribute full name.

sortOrder: Indicates the sorting order. You can use two values, ascending or descending.

 

Concatenate this at the end of the invocation URL using the ? symbol, For example,

 

[Project_URL]/scim/v2/Users?startIndex=1&count=10&orderBy=username&sortOrder=descending

 

Consult specific attributes

If you want to obtain only a set of attributes in the result, you can send in the invocation a list of the wanted attributes. To do that use the following command:

 

?attributes=attribute1,attribute2

 

Concatenate this at the end of the invocation URL using the ? symbol. See the valid attributes to use in SCIM. for example:

 

[Project_URL]/scim/v2/Users/IvanHerrera?attributes=username,emails.value,Active

 

if you need to set the order parameters and set specific attributes, concatenate both commands with the & symbol For example:

 

[Project_URL]/scim/v2/Users?startIndex=1&count=10&orderBy=username&sortOrder=descending&attributes=username

 

Using filters

You can get a subset of results using filters. To filter an invocation use the following command:

 

filter= [Parameter] [Operator] "[Value]"

 

Where:

Parameter: attribute of the SCIM schema. See the valid attributes.

Value: Value of the attribute you are using as a filter.

Operator: filter operator. The following table shows supported operators:

 

Operator

Description

eq

Equals

ne

Not equal

gt

Grater than

ge

Greater or equal than

lt

Less than

le

Less or equal than

 

You can add multiple conditions using logical operators:

 

Logical Operator

Description

and

The method shows results only if both conditions are meet.

or

The method shows results only if any of the conditions are meet.

 

You can also group conditions using parenthesis ( ). Filters are executed in the following order:

 

1.Grouped conditions with parenthesis

2.Logic operators. The operator and has priority over or.

3.Operators using attributes.

 

note_pin

In Bizagi you can only register one email and one mobile phone. Therefore, filters using any subtype of these attributes are ignored. For example, filters using work phone or primary phone (or email), provide the same results because they are all compared to the contactEmail and contactCell attributes of Bizagi.


Last Updated 1/6/2022 4:58:21 PM