Oracle Identity Cloud Service REST APIs provide a way to integrate your Oracle Identity Cloud
Service instance with any application or client.
You can manage identities and configuration, and perform Single Sign-On and Authorization
by using REST APIs in your application.
Oracle Identity Cloud Service REST APIs are compliant with SCIM, OpenID Connect, and OAuth
2.0.
In this video, we’lll learn how to make REST API calls to Oracle Identity Cloud Service
using the cURL client in Linux, to perform basic operations such as
requesting access tokens and managing users and groups.
You can use the same principles described in this video to make calls from other clients
or programming languages.
Let’s get started.
First, let’s add an application in Oracle Identity Cloud Service.
While adding an application, define what it can do in Oracle Identity Cloud Service.
We’ll add our application as a Trusted application.
It’ll be configured so the Identity Domain Administrator has client access to the Identity
Cloud Service Administration APIs.
We save the client id and client secret that are generated and then, activate the application.
The client ID and secret are the client credentials required for performing REST API calls.
Now let's authenticate against Oracle Identity Cloud Service by making a REST API call
using the client credentials.
To make REST API calls we need to generate the access token.
The access token establishes a session, so that we can make REST requests without providing
the client id and secret again.
After activating an application, you can generate the access token.
The access token is downloaded as a token file that can be opened in any text editor.
We can now use this token in a REST API call.
We can also generate the access token by using the client id and client secret.
Do this by concatenating the client id and client secret and then encoding the concatenated
value in base64.
Then we make a REST API call to the url /token using this value to obtain the access token.
Now, let's manage users using REST APIs.
Start by creating a user.
REST APIs are compliant with SCIM, a standard that defines how identity management systems
exchange information using REST and JSON.
First we'll create a json file where the user information is defined according to the SCIM
schemas and attributes standards.
Then, we will make a call to the /Users url using the POST method, passing the access
token and the json file as input.
The results show that the user is successfully created.
The output file provides details of the user that was created.
The user is also listed in the Oracle Identity Cloud Service console.
This confirms that the new user was created.
You can also use REST APIs to search for users by making a call to the same /Users url.
This time we use the GET method.
The output displays several users, including the one we just created.
We’ll perform operations for the user by specifying this ID.
Now, let’s, modify the user by making a new call to /Users/userid url using the PATCH
method.
For this call, the information we are updating is specified in the input file and the userid
is specified in the cURL command.
The command returns a successful response message.
Confirm that the changes are effective by looking at the user profile in the console.
Now, let's manage Groups using REST APIs.
To work with groups, first obtain the user ids so that they can be assigned to the groups
we create.
Obtain the User IDs from the URL in the users' profile in Oracle Identity Cloud Service.
Or, obtain it by performing a search on the /Users url.
Let's create a group.
Create a json file in which the group information is defined per the SCIM schemas and attributes
standards.
The ID of the user that needs to be added to the group is also specified.
We will make a REST API call to the /Groups url using the POST method, passing the access
token and the json file as input.
Results show that the group is successfully created.
The output file, as well as the console, displays the details of the group that was created.
To search for groups, use a similar REST API call using the GET method.
All the available groups are listed.
Now, add a new user to the group we created.
The ID of the user that needs to be added to this group is specified in the input file.
We’ll use the PATCH method along with the group id in the command.
The console displays the new user in the group's member list.
To delete a user from a group, use a similar command but specify the PATCH method along
with the group id and the json file in
which the user id to be deleted is specified.
Using the Oracle Identity Cloud Service REST APIs, you can make your custom applications
interact
with the Oracle Identity Cloud Service and perform various tasks such as
requesting access tokens and managing users and groups.
To learn more about what you have seen, please visit our tutorials.
Thank you for watching.