Get processes by user

<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Bizagi from external applications > Bizagi API > OData RESTful services > Bizagi API examples > Data services examples >

Get processes by user

Overview

Bizagi features an OData service which handles aspects of the Experience design, as described at Data services.

Through the processesByUser URI, you can get the data of the processes to which a specific user has access.

 

Resource URL

Start with the following URL:

[your_bizagi_project_url]/odata/data/processesByUser

 

Customizations:

[your_bizagi_project_url]: The URL where end users access the Bizagi Work portal.

For an on-premises Bizagi project, the URL would be:

https://[your_server]/[your_project]/odata/data/processesByUser

For Automation Service projects, the URL would be:

https://[project_environment]-[your_project]-[your_company].bizagi.com/odata/data/processesByUser

 

note_pin

This resource is available through an HTTP POST action.

 

Method authorization

Explicit permission must be granted to the role of the user that will use the getProcessesByUser service, to prevent that the data can be consulted by any user. The goal of this is to give the client the possibility to decide which users have access to this information.

You can configure the permissions to one or more roles in Bizagi Studio. Go to the expert view and follow the path security -> Pages -> Administration -> Users

 

OData_permission

 

You may also deny permission to a specific user role. The Users option let either allow or deny access to a specific user role.

 

Example

To get the information of the processes of a specific user, invoke the URL described above using an HTTP POST.

On the Headers tab, specify:

Content-type: application/x-www-form-urlencoded

Authorization: provide the Basic keyword, add a blank space and then add the access token

 

.OData_header

 

On the Body tab, include the following JSON structure in the body to send parameters:

{

 "parameters":{

         "domain":"[domain]",

         "user":"[username]"

 }

}

 

Customizations:

[domain]: the domain of the user.

[username]: the username of the user on which tthe processes will be consulted.

 

OData_body

 

The following image shows a response of the method when its invocation is successful. That is, the list of the processes to which the specific user has access.

 

OData_response

 

Bear in mind that if the user that is trying to use the service is not authorized, the response will be a 401 OData Exception.

 

OData_unauthorized