So you’ve installed ORDS, you’ve REST enabled a schema, and you’ve started publishing some RESTful Services.
Now, how do we go about seeing what’s what?
If you’re using ORDS to build ORDS REST APIs with Database Actions, AKA SQL Developer Web, simply navigate to the REST page under development.
There you can find a modules page, and select your REST Module.
Browsing ORDS REST Module Templates…
You could search using SQL Developer Desktop’s Find DB Object panel…
Or you could query the data dictionary!
I’m going to look at USER_ORDS…stuff.
We have _MODULES, _TEMPLATES, and _HANDLERS – most of what you’ll want is there.
SELECT name, uri_prefix, uri_template, method, source_type, source FROM user_ords_modules a, user_ords_templates b, user_ords_handlers c WHERE a.id = b.module_id AND b.id = c.template_id ORDER BY 1,2,3,4;
What all do I have access to?
Let’s ask the worksheet what it can see for USER_ORDS_
And ‘yes!’ there are DBA_ dictionary view options as well.
Want a data model? If we go RE the ORDS_METADATA schema to a design, we get something like this:
Ok, let’s re-investigate a Modeling trick.
We’re going to:
- Find a driving table (ORDS_MODULES)
- Select it in the Navigator
- Right click and select ‘Add with dependencies’
- Send those to a SubView
And then we get something a bit easier to see/understand.
I’m showing you around the ORDS_METADATA schema – but stay out of it, just like you’d stay out of the SYS.X$ tables. Use the data dictionary views we give you to query stuff. And use the PL/SQL API to CHANGE your services, don’t live-edit the tables.
And Don’t Forget about the RESTful Way of Getting Your Services
Just hit the /metadata-catalog/ end point for your REST enabled schema.
Wait, what about my REST Enabled Tables, Views, and PL/SQL?
Oh yeah, those.
SELECT parsing_schema "Schema", parsing_object "Object", object_alias "Alias", auto_rest_auth "Authorization", type "Type" FROM user_ords_enabled_objects ORDER BY parsing_schema, parsing_object