Invoking Oracle cloud RESTful web-services

Vishu Guntupalli
Intelicloud
Published in
2 min readAug 12, 2018

Web services are the gateway for all data exchange in the cloud world and it is no different for Oracle cloud. There is quite a collection of RESTful endpoints exposed by the HCM offering and the collection seems to get better with new releases. With R13 exposing RESTful web-services for ERP cloud too.

In the following example we will see how to update an employee information using HCM’s RESTful endpoints. More about it can be learned here.

To update an employee first we need to get the employee and each employee is uniquely identified using an ID(empsUniqID), which in this case in not the employee-ID or SSN but it is obtained using those values are query params. See below to see how to invoke that using Postman :

Snip20180812_2

Notice how we are querying using the employee ID to get empsUniqID:

emps?q=PersonNumber=1234567

The GET request above will get you all the details about the employee, but what we are interested in is in the empsUniqId, which can be found in the links section :

Snip20180812_3

It is the 196 character long number after the emps/ part.

Now that you have the empsUniqId, you can use it to update the employee using a PATCH request as shown below.

Snip20180812_4

As you can see the empsUniqId in the URL and it is also important to set the content type in the header information to :

application/vnd.oracle.adf.resourceitem+json

The fields you need to update for the employee needs to be passed in the body as JSON. Sending the PATCH request would give you as 200 OK status if the call was successful and you would also get the entire employee info as JSON back to verify that your data was rightly updated. Some fields may not be updated in such case they will remain unchanged.

Hopefully this post helps you with interacting with Oracle cloud HCM REST endpoints. Please don’t hesitate to post any questions or comments.

--

--

Vishu Guntupalli
Intelicloud

Software engineer/architect, Entrepreneur, AWS, Python, Data, Cloud