2 Installing SODA for REST
Complete instructions are provided for installing SODA for REST.
Note:
SODA for REST is distributed as part of Oracle REST Data Services (ORDS). Oracle recommends that you always use the latest version of ORDS.
Oracle also recommends that you use JSON
data type for
JSON data. To do that with SODA for REST you need ORDS version 20.4.1 or later.
Database initialization parameter compatible
also needs to be at
least 20
(the database needs to be release 21c or later), in which
case JSON
type is used by default for SODA collections.
For more information about the minimum required version of ORDS needed for SODA for REST, see SODA Drivers in Oracle Database Introduction to Simple Oracle Document Access (SODA).
-
Ensure that you have one of the following Oracle Database releases installed:
-
Oracle Database 12c Release 2 (12.2) or later
-
Oracle Database 12c Release 1 (12.1.0.2) with Merge Label Request (MLR) bundle patch 20885778 (patch 20885778 obsoletes patch 20080249)
Obtain this patch from My Oracle Support (My Oracle Support). Select tab Patches & Updates. Search for the patch number, 20885778, or access it directly at this URL:
https://support.oracle.com/rs?type=patch&id=20885778
.
-
-
Start the database.
-
Download Oracle REST Data Services (ORDS), and extract the zip file.
-
Configure ORDS.
-
If the database uses standard port 1521:
java -jar ords.war install
-
If the database uses a nonstandard port (any port except 1521):
java -jar ords.war install advanced
Note:
When prompted:
-
Do not skip the step of verifying/installing the Oracle REST Data Services schema.
-
Skip the steps that configure the PL/SQL Gateway.
-
Skip the steps that configure Application Express RESTful Services database users.
-
Decline to start the standalone server.
-
For greater security, choose HTTPS, not HTTP, at least for production applications.
-
-
Connect to the database schema (user account) that you want ORDS to access.
-
Enable ORDS in that database schema by executing this SQL command:
EXEC ords.enable_schema; COMMIT;
-
Grant role
SODA_APP
to the database schema (user account)database-schema
that you enabled in step 6:GRANT SODA_APP TO database-schema;
-
Only if you are in a development environment:
-
Remove the default security constraints:
BEGIN ords.delete_privilege_mapping( 'oracle.soda.privilege.developer', '/soda/*'); COMMIT; END;
Note:
This enables anonymous access to the service, which is not recommended for production systems.
-
Start ORDS in standalone mode:
java -jar ords.war standalone
Note:
Running ORDS in standalone mode is not recommended for production systems.
-
-
In a web browser, open:
http://localhost:8080/ords/database-schema/soda/latest/
Where
database-schema
is the lowercase name of the database schema in which you enabled ORDS in step 6. If the installation succeeded, you see:{"items":[],"more":false}
See Also:
-
Installing and Configuring Oracle REST Data Services in Oracle REST Data Services Installation and Configuration Guide for complete information about downloading and extracting the ORDS zip archive, and about installing and configuring ORDS
-
Configuring Oracle REST Data Services (Advanced) in Oracle REST Data Services Installation and Configuration Guide for in-depth information about configuring ORDS
-
Deploying and Monitoring REST Data Services in Oracle REST Data Services Installation and Configuration Guide for information about deploying ORDS and starting ORDS in standalone mode
Related Topics