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…
SQL Developer’ REST Development Panel
Our first GUI for working with REST APIs in ORDS was in SQL Developer.
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.
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.
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.
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 –
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.
One of the first things we made sure to add was support for managing your OAuth2 clients.
We also have added support for:
- Handler editors have Code Insight support for the db and REST parameters
- generating Open API JSON or PL/SQL definitions of your REST APIs
- built cURL wizards for exercising your REST APIs
- put an integrated Swagger Doc client into SQL Developer Web
- import OpenAPI JSON definitions as new REST Modules
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:
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)
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.
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!