Developing RESTful Services in Autonomous Database

You can develop and deploy RESTful Services with native Oracle REST Data Services (ORDS) support on an Autonomous Database.

About Oracle REST Data Services in Autonomous Database

Oracle REST Data Services (ORDS) makes it easy to develop REST interfaces for relational data in an Autonomous Database. ORDS is a mid-tier Java application that maps HTTP(S) verbs, such as GET, POST, PUT, DELETE, and so on, to database transactions, and returns any results as JSON data.

Note

The Oracle REST Data Services (ORDS) application in Autonomous Database is preconfigured and fully managed. ORDS connects to the database using the low predefined database service with a fixed maximum number of connections (the number of connections for ORDS does not change based on the number of CPUs). It is not possible to change the default ORDS configuration.

See Oracle REST Data Services for information on using Oracle REST Data Services.

See Predefined Database Service Names for Autonomous Databases for information on the low database service.

Develop with Oracle REST Data Services on Autonomous Database

Autonomous Database supports Oracle REST Data Services (ORDS).

Developing RESTful services is easy with the either of the following development interfaces:

  • SQL Developer (desktop): With SQL Developer on your desktop, you can connect to your Autonomous Database and enable REST services access to tables and views, or develop custom RESTful Services based on your SQL and PL/SQL code. See Connect with Oracle SQL Developer Version 18.2 or Later for more information.

  • Oracle Application Express (APEX): With APEX you can use the RESTful Services development pages to build and maintain your services and REST enabled objects. You can use the APEX SQL Workshop to access your Oracle RESTful Services and REST enabled objects. See How to Access RESTful Services for more information.

The Autonomous Database ADMIN account is REST Enabled. This allows for REST Services to be published in the ADMIN schemas and allows you to access Database Actions using the ADMIN database user account. Oracle recommends you create an application schema account for your RESTful Services and REST enabled objects. Services are secured using Database Authentication and your REST enabled schema.

The authenticated database user is only permitted access if the schema is REST enabled and the URL mapping for the request points to their own schema. A user is not authenticated when a request points to any other database schema. For example, the following request authenticated as the REST enabled schema HR is accessible:

GET /ords/hr/module/service/

However, when authenticated as the REST enabled schema SCOTT, the same request:

GET /ords/hr/module/service/

results in an error:

401 HTTP Unauthorized response/error

Any database user whose credentials are correct and meets these rules is authenticated and granted the ORDS, mid-tier, role: SQL Developer. The SQL Developer role enables the user to access any endpoint that requires the SQL Developer role.

See REST-Enable a Database Table in Quick Start Guide for information on how to enable a table for REST access.