Oracle Primavera Unifier REST API Integration – Part 2

In this blog you will see how to connect with Unifier instance using REST API in order to get / create / update data from unifier.

1 : Authorization Token Generation

In order to hit any unifier REST API you will need to pass token value within Authorization header of the REST request.

Follow steps given below to generate token

1.1 : Method dropdown highlighted in screenshot generally contains GET,POST,PUT,PATCH,DELETE etc. methods, select GET method.

1.2 : Enter REST API webservice URL within “Endpoint/ Webservice URL” within URL box (if you want to know how to get “Endpoint/ Webservice URL” click here to redirect to Part 1 of this blog and check )

e.g. Login URL should look like this https://<UnifierRESTserviceURL>/login

1.3 : Click on Authorization tab

1.4 : Select “Type” as “Basic Auth

1.5 : Enter integration user Username and Password in Username and Password field respectively (if you want to know how to get “Username and Password” click here to redirect to Part 1 of this blog and check “Create Integration User” section)

1.6 : Click on “Send” Action button of the postman

1.7 : You will receive response for this request at the lower window of the Postman

1.8 : In the response window of the postman you can see parameter named as “token” , copy the value of the token and keep it safe on your system. This token value we will need to pass along with authorization header. This value will be used by unifier as authorization key to get the Unifier data access.

2. Connect with Unifier

Now let’s use this authorization token in order to fetch some records from Unifier.

Here we will try to fetch unifier shell

2.1 : In order to fetch shell you can compose URL which will look like https://<UnifierWebServicesURL>/admin/shell

2.2 : Select method as GET

2.3 : Enter Endpoint /Webservice URL in URL box

2.4 : Click on “Header” Tab

2.5 : Give Key as “Authorization” value as “Bearer <token>”

2.6 : Click on “Send” button

You will receive Response for this request at the lower window of the Postman.

 

The following two tabs change content below.

Tushar Chavan

Hello Everyone, myself Tushar, I love to listen music also I like to explore latest tech. I'm Primavera enthusiast, always trying to push the limits and find out ways to dive dipper into this application suite in order to use true potential of these applications. Working with Primavera since 2012. I have worked for Primavera Implementations in various domains such as Construction, Telecom, Manufacturing, Service Industries etc. During this journey I have extensively worked on Primavera applications solutions design, installations, patch fixes, configurations along with integration of Primavera applications with various enterprise applications. Ready to dive into this Primavera ocean!! Feel free to reach me at chavantushar@hotmail.com