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).

  1. 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.

  2. Start the database.

  3. Download Oracle REST Data Services (ORDS), and extract the zip file.

  4. 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.

  5. Connect to the database schema (user account) that you want ORDS to access.

  6. Enable ORDS in that database schema by executing this SQL command:

    EXEC ords.enable_schema;
    COMMIT;
    
  7. Grant role SODA_APP to the database schema (user account) database-schema that you enabled in step 6:

    GRANT SODA_APP TO database-schema;
    
  8. Only if you are in a development environment:

    1. 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.

    2. Start ORDS in standalone mode:

      java -jar ords.war standalone
      

      Note:

      Running ORDS in standalone mode is not recommended for production systems.

  9. 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: