Oracle Autonomous Database is a Platform as a Service (PaaS) offering on the Oracle Cloud (OCI). It’s managed, meaning you don’t have to worry about updates, patches, or much in way of configuration.

One of the core features is the ability to publish and consume REST APIs for the data in your Autonomous Database – whether that be on the Dedicated, Serverless, or Always Free service offerings.

I wanted to answer a few frequently asked questions and share a couple of useful resources for you in this post.

How are my endpoints addressed?

Not all HTTP is REST, but all REST APIs use HTTP for communication. And a HTTP call generally has two main components, an address and a verb.

Well, if you publish a REST API in Autonomous, what the heck is my URL? We show you this critical information in your Service Console.

Click here.

From there, you want to go look in the ‘Development’ page.

This will form the base of every URL you use for the REST APIs in your service.

So what comes after the /ords/ ?

Your REST APIs will look like this –

  • /schema/module/service-pattern
  • /schema/rest-enabled-object

The schema is the REST Enabled schema name, or it’s schema alias, which we refer to as the url_mapping_pattern.

What else do I need to know about ORDS in Autonomous?

OS Authentication is available if you want it. But note that means consumers of your API will be logging in as actual Oracle Database users, and you’ll be using BASIC Auth, which is generally frowned upon, even when HTTPS is in play.

We recommend you use an ORDS provided OAUTH2 client. Hot Tip #1 – use Todd’s awesome blog post to see how to do this.

Speaking of database users – for Autonomous your default administrator account is called ‘admin,’ and it’s REST Enabled by default. That means the admin user can login to SQL Developer Web AND publish REST APIs in its schema.

WE DO NOT RECOMMEND YOU USE ADMIN FOR PUBLISHING REST APIs.

WE DO RECOMMEND YOU CREATE AN APPLICATION SCHEMA AND USE THAT.

Building Services – with what tools?

You can use anything that can connect to your database and exercise the ORDS PL/SQL APIs. We recommend you either use SQL Developer on your desktop or the REST Development screens in APEX. Note, you don’t have to build APEX apps to take advantage of the REST development screens. Further note, we’ll be building similar pages in SQL Developer Web very soon.

SQL Developer or APEX – easier than hand-writing PL/SQL blocks, but that will work too!

Just give me a movie to watch, TL;DR

I have a 12 minute video demonstration showing a REST service in Autonmous that you can watch here.

Fairly short…and I’ve skipped all the blah blah blah and go STRAIGHT to the demo!

Can’t do YouTube at work? Here are some slides.

thatjeffsmith
Author

I'm a Master Product Manager at Oracle for Oracle SQL Developer. My mission is to help you and your company be more efficient with our database tools.

Write A Comment