Photo by Glenn Carstens-Peters on Unsplash

User Management REST APIs in Oracle Cloud ERP

In this post we will look at the User Management REST APIs available in Oracle Cloud ERP. You can read more about the REST APIs here. There are 6 main REST APIs:

  • Create User
  • Delete User
  • Get User
  • Get All Users
  • Replace User
  • Update User

We will explore how to create, update and delete a user, and to fetch information of all the existing users. I will be using Python and requests library to invoke the REST APIs. You can get the source code from my GitHub repo.

The API End Point is as follows. Make sure to provide the correct server name. We use the POST method for creating a new user.

Create the Payload as below. The value for “schemas” key is constant.

After creating the payload you can invoke the REST API as below. Make sure to give the correct user name and password to invoke the REST API.

If everything goes well, you can login to the Security Console and view the new user.

The API End Point is as follows. Make sure to provide the correct server name. We use the GET method to fetch all the users.

This is a pretty straight forward REST API call. You can invoke the REST API as below. Make sure to give the correct user name and password to invoke the REST API.

The response is a JSON file with details of all the users. Use the below code to display the output in a user friendly format.

The API End Point is as follows. We use the PATCH method to update the user details.

Create the payload as follows. Here I am updating the email id of the user.

The id at the end of the API end point is the 32 character user id. You can invoke the REST API as below. Make sure to give the correct user name and password to invoke the REST API.

The API End Point is as follows. We use the DELETE method to delete the user.

The id at the end of the API end point is the 32 character user id. You can invoke the REST API as below.

As you can see it is pretty easy to use the REST APIs. There are two enhancements that I would like to do:

  1. Read a file with the user details and create the user(s)
  2. Add roles to the user while creating the user

You are welcome to contribute to the above enhancements. Let me know if you have questions. Happy Holidays!!

Manager Strategic Cloud Services (Oracle Cloud ERP, EPM), Integration Specialist, Big Data, Data Science & Python Enthusiast)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store