Using the UiPath REST API from Postman (DU example)

Vishal Kalra
3 min readSep 7, 2023

--

The use of the API level access has been available since April, 2023 and this was announced by Monica on the blog post here.

https://forum.uipath.com/t/document-understanding-cloud-apis-previously-referred-to-as-as-a-service-ga/539613

It details on how you need to create the external application and then use the App ID/ App Secret in order to use the same. The framework page also allows the users to test the different API’s using the swagger tool within the browser.

Document Understanding Rest APIs framework

This blog extends this functionality further and gives the details on how this API’s can be tested via one of the favourite API testing tool i.e. Postman.

In order to do this, follow the steps to create the external application within your cloud orchestrator as well as add the Document Understanding application scope resources as mentioned in the forum post earlier.

In order to use any of the API’s ( the list of which is available with the Framework page as listed in the screenshot below), we will first need the bearer token.

Document Understanding Cloud APIs

In order to get this, you will first need to hit the URL, along with the app id and app secret that you got when you created the external application within the cloud orchestrator.

https://cloud.uipath.com/identity_/connect/token?scope=Du.Digitization

The following link has the details for the same:

https://docs.uipath.com/document-understanding/automation-cloud/latest/user-guide/using-the-credentials-with-the-external-application

Let us see how exactly this is done within Postman. First store the app id and app secret within the environment variables.

Storing the environment variables in Postman

Now, just follow the step given in the image below.

PostMan configuration to get the Bearer Token

Now, you are all set as you have got the access_token( Note that the token is valid only for an hour as you can note in the response)

   "expires_in": 3600,
"token_type": "Bearer",
"scope": "Du.Classification.Api Du.Digitization.Api Du.DocumentManager.Document Du.Extraction.Api Du.Validation.Api"

Just , use the bearer token for any of the subsequent API requests that you need to hit the DU API’s. For example:

Get Projects Example

So, as we can see, we have set up the Postman application to test the DU API’s.

Now, you are free to test and then integrate it with any of your other applications. The ability to call the API’s independently from an external application opens up host of opportunities for automation and reduces the dependency on the RPA admin. They no longer need to worry about getting the individual user access as the API access can be provided with the relevant scope for further integrations.

To conclude: “APIs are the connective tissue of the digital world, empowering automation to transform the ordinary into the extraordinary.” Go ahead and leverage the power of API’s!

--

--

Vishal Kalra

Accomplished UiPath MVP/ Enterprise architect with 2 decades of experience in integrations, automations and end to end development.