Oracle REST Data Services (ORDS) makes developing and delivering REST APIs for your Oracle Database as easy as writing a few lines of SQL or PLSQL.

When we first introduced the support of RESTful Services as defined in ORDS and delivered via ORDS, we had two interfaces:

  • a PL/SQL API
  • a REST Development Panel in Oracle SQL Developer

The ORDS and accompanying ORDS_ADMIN PL/SQL packages provide everything you need to build, manage, and secure your REST APIs or REST Enable existing database objects. They’re also extremely well documented via their Package Specs.

It actually wouldn’t be a waste of time to take a quick gander at these if you had the cycles…

The ORDS_METADATA.ORDS PL/SQL Package.

SQL Developer’ REST Development Panel

Our first GUI for working with REST APIs in ORDS was in SQL Developer.

You could also use SQL Developer to make ORDS Configuration changes…

Once you had REST enabled a schema, you could make a ‘Development’ connection.

The connection was HTTP-based. We’re not doing things on the database jdbc connection. We’re using REST calls to help you build REST APIs.

This was a bit confusing for customers, particular around the ‘schema/workspace’ bits…

Once connected, you’d have a list of REST Modules down the left, and you could open a template, see the HANDLER and get to your SQL or PL/SQL code.

This feature became available in SQL Developer around 2015’ish?

SQL Developer Database Connections

In version 4.2 ~ 2017, we made the REST APIs and security bits of your modules available directly in your database connection trees.

No more needing to sort out an ORDS user or the HTTP connection properties.

This was a welcome update! If you could connect to the database, you could deal with the REST APIs and security privs/roles.

AND, you could easily save your REST API definitions to database scripts – using that handy PL/SQL API we discussed earlier.

You should source control these, just like you do with the rest of your database code/objects.

Then came APEX, thanks Doug!

Doug Gault was on the SQL Developer/ORDS team long enough to help us build our first web interface for ORDS..in the APEX SQL Workshop.

In 2017~2018, Doug helped us get in place a migration plan for moving the REST APIs defined in the APEX repository to the ORDS repository. In addition to that, he built this –

Super convenient for our APEX Development friends and family.

The APEX interface also allowed you to enable schemas, objects, and manage privileges and roles. It also has the ability to both EXPORT and IMPORT REST definitions in the form of those PL/SQL scripts.

And finally, it had a dashboard giving you an overview of your schema and included a nice visual indicator that ‘hey, you have services that are UNSECURED!’

SQL Developer Web

While the APEX interface was great, it was limited to folks who were using APEX. ORDS is available for ANY Oracle developer who wants to publish REST APIs.

So what to do?

We (ORDS) needed our own web application. And that application was born in 2019.

Now you could use ORDS to manage ORDS and your REST APIs.

One of the first things we made sure to add was support for managing your OAuth2 clients.

We’ll get your Token, AND give you the cURL command to get it yourself.

We also have added support for:

THIS is now our recommended and preferred interface for building, securing, documenting, and testing your Oracle REST APIs. It’s also the interface that gets the most attention, directly from the ORDS development team.

Need more convincing? 5 Reasons to use ORDS to build Oracle REST APIs.

Is that it?

For GUIs, yeah, pretty much.

But, if you’re at the command line, you can:

Use SQLcl

to export your modules to files for easy source control, or also IMPORT them from those JSON OpenAPI files (just like in SQL Developer Web)

The command is called ‘REST’

Use SQLcl with Liquibase

You can use SQLcl to generate a Liquibase ChangeLog for your REST Module(s).

lb genobject -type ORDS -name 101

‘101’ is the name of my ORDS REST Module.

You can also use ORDS and Liquibase to generate ChangeLogs for APEX apps!

What’s next?

Well, we want to bring SQL Developer Web to EVERY SINGLE Oracle Database in the Oracle Cloud, NOT just the Autonomous ones.

SQL Developer Desktop is starting to show its age a bit. We might be working on a next gen take on what a desktop tool for Oracle Database users might look like.

We also want to bring all the cool new REST development features we built into ORDS and SQL Developer Web to our friends in the APEX community.

Stay tuned here and on the regular channels for news/progress on these projects as the year goes on!

thatjeffsmith
Author

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

Write A Comment

RSS
Follow by Email
LinkedIn
Share