OCI REST APIs from Postman

For creating/updating/deleting a user/compute/database/API Keys or anything for that matter we usually have four ways:

1. OCI Console.
2. OCI REST APIs through Postman.
3. OCI REST APIs through CURL commands.
4. OCI REST APIs through OCI SDKs.

In this blog, we will focus our discussion around using OCI REST APIs from Postman only.

Pre-requisites

1. You should have access to OCI console.
2. You need to have details of Tenancy OCID, User OCID, API Fingerprint, Public & Private Keys used while generating API Fingerprint & OCI Region where you want to fire REST API.

You can fetch Tenancy & User OCID from OCI Console. Another way is to create an API Key (i.e., Fingerprint) and it’s config file will give you details of Tenancy & User OCID, along with Fingerprint and Region.

To generate API Key, Login to OCI console, click on Profile on Top right corner of the Home page → Click on User Settings (if using old version of OCI Console), for the latest version click on My Profile under the Profile on Top right corner of the Home page.

Click on API Keys under Resources → Click Add API Key and go ahead with the default option by downloading the Public/Private Keys and click Add API Key.

This creates the API Key, now go to the configuration file of the Key

This file gives you the Tenancy/User OCID, along with region and Fingerprint

This completes the pre-requisites:
a. Tenancy OCID
b. User OCID
c. Fingerprint
d. Private key (which you have downloaded while generating API Key).

A basic Postman project for Oracle REST APIs is available, where Environment variables are defined, Collections are created & Pre-Request script is created which you can download from the GitHub link.

Import the below files to your Postman:
OCI_Environment.postman_environment.json
OCI_REST_INITIALIZATION.postman_collection.json
OCI_REST_COLLECTION.postman_collection.json

Update Environments in Postman

Post importing the above mentioned files, you should update the environments file in Postman by providing details you have collected above and save the changes.

Initialize REST API Collection

Once you are done updating Environments file with respective details, run the ONE_TIME_INITIALIZATION_CALL request which is part of OCI_REST_INITIALIZATION collection.

This is just to initialize the collection which fetches required data from Environments.

Trigger OCI REST APIs

The default OCI_REST_COLLECTION which we have imported will have two APIs:
1. Get Announcements 2. Create_OCI_Streams.
Update the endpoint for these API calls with respective details like your OCI Region, compartment OCID, etc., based on the REST API you chose to trigger.

Oracle has provided documentation for all the REST APIs along with required/optional fields which can be found here.

This blog, explains in details on how to use CURL for making OCI REST API calls.

--

--

--

14+ Years in IT/ITES| ML & AI Enthusiast| Integration Specialist — BPEL, OSB, OIC, IICS, Oracle Cloud Infrastructure| Database Scripting-SQL, PL/SQL, MySQL

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Wanna Hear Your Husbando’s Voice Before Going To Sleep? Use A Text Reader

A Foreign Exchange API For More Than 170 Currencies

Sending messages from Azure Data Factory to Service Bus

Free & Powerful API for Creating Throwaway Email Addresses

[DevSecOps]Build Security in CI/CD Pipelines for Effective Security Automation!

SIMPLE FLASK APPLICATION

How to Export Image as PDF on Django

Introducing CDN 3.0

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
Santhosh Kumar BVSRK

Santhosh Kumar BVSRK

14+ Years in IT/ITES| ML & AI Enthusiast| Integration Specialist — BPEL, OSB, OIC, IICS, Oracle Cloud Infrastructure| Database Scripting-SQL, PL/SQL, MySQL

More from Medium

Error Handling in Cloud Flow

Migrate RDS SQL Server database to Custom RDS SQL Server

OAuth 2.0 Custom Application Enablement

SAP Commerce Cloud (CCV2) — Azure CICD Pipeline