I think every developer should get somewhat proficient with cURL, but. When you have more than 500 APIs to peruse for a single resource, having a GUI can be very handy.
And I don’t mean just any 500 or so REST APIs, I mean specifically the ones we publish in Oracle REST Data Services for managing and monitoring your Oracle Database. This feature is known as the ‘DBAPI’ – and it’s an optional feature of ORDS.
I introduced the DBAPI in ORDS feature here.
I talked about Data Pump via REST APIs here.
I talked about Cloning PDBs via REST APIs here.
First things first, you need to make sure ORDS has this feature enabled, and you need to get the JSON Open-API content.
If you can open that link from your ORDS deployment, then you know ORDS has enabled the DBAPI feature.
If you get 404’s, you’ll want to make sure it’s enabled in the ORDS config.
Once you have the right URL, you can ask your trusty REST client to just ‘suck in the APIs…’
In Postman –
You’ll simply hit the ‘Import’ button. Don’t create a new Collection first, doing the Import will create a new Collection for you.
Click ‘Continue’ and then ‘Yes’ to a couple of default prompts, and you’ll be good to go.
One thing I really like about Postman, is that I can set my Authentication Scheme at a top-node level, and then have it propagated down for all my other calls.
This wasn’t working for me until I hit the magic ‘Save’ button.
I also like that as I make requests, new tabs move across the top of the Client, just like I’d see in my favorite browser. I’ll need to close these, eventually.
It’s a pretty common workflow in Insomnia –
Once I’ve pasted in the URI and hit ‘Fetch and Import’, I’ll see my new categories on the left hand side.
Environments in Insomnia allow me to define some things I want applied to all of my calls.
Let’s say for example that I want to be able to easily call the DBAPI from my local instance of ORDS/Oracle Database OR from my Always Free Autonomous Database in my Oracle Cloud Service.
The trick for making this happen is to create multiple ‘Environments.’
However, one thing I do find annoying with Insomnia is that they don’t offer the ‘Inherit Auth from Parent’ option that Postman gives you. Oh well, I just have to remember to add/change those as I use them.
What about cURL?
Both clients have ‘code generators’ – so from my GUI HTTPS request to a pure cURL/code implementation. Using either will require some work to manipulate said code generated to get it to work, but Postman offers the most flexability.
For Insomnia you get some options as well. I’m a big fan of HTTPie over cURL as it has a more human readable command syntax, and Insomnia supports that AND cURL!
Wait, I can use the ORDS DBAPI REST calls in Oracle Autonomous?
Most of them absolutely you can. You can’t clone your PDB, but you can definitely create a new Data Pump Export job.
And then using our new Data Pump monitoring screen, you can check the progress of your job, read the log, or download the DMPs.
The Data Pump monitoring page is rolling out to Autonomous Shared services now. You should have it in your tenancy by the time you read this.
And let’s check that log…