4.7 Configuring Oracle REST Data Services

Configuring Oracle REST Data Services requires that you copy the images directory, run a configuration to configure RESTful Services, configure static files support, and secure Oracle REST data service.

How to configure RESTful Services in a new installation is discussed in the following section.

Topics:

4.7.1 Copying the Images Directory

Whether you are loading a new installation or upgrading from a previous release, you must copy the images directory from the top level of the apex\images directory, for example C:\TEMP, to the location used by your Oracle REST Data Services installation.

During an upgrade, you overwrite your existing images directory. Before you begin the upgrade, to ensure that you can revert to the previous version, Oracle recommends that you create a copy of your existing images directory for Oracle Application Express, indicating the release number of the images (for example, images_3_1).

4.7.2 Configuring RESTful Services

In a new installation or upgrade of Oracle Application Express, you must run the configuration script apex_rest_config.sql to configure RESTful Services.

Once configured, the instance administrator can control the availability of the feature. If the instance administrator has disabled RESTful Services for this Application Express instance, RESTful Services are not available for this instance and the RESTful Services icon does not display.

To configure RESTful Services in Oracle Application Express:

  1. Change your working directory to the apex directory where you unzipped the installation software.
  2. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:
    • On Windows:

      SYSTEM_DRIVE:\ sqlplus /nolog
      SQL> CONNECT SYS as SYSDBA
      Enter password: SYS_password
      
    • On UNIX and Linux:

      $ sqlplus /nolog
      SQL> CONNECT SYS as SYSDBA
      Enter password: SYS_password
      
  3. Run apex_rest_config.sql. For example:
    @apex_rest_config.sql
    

    When Prompted, enter a password for the APEX_LISTENER and APEX_REST_PUBLIC_USER accounts.

    When configuring RESTful Services in Oracle Application Express, it creates two new database accounts.

    • APEX_LISTENER - The account used to query RESTful Services definitions stored in Oracle Application Express.

    • APEX_REST_PUBLIC_USER - The account used when calling RESTful Services definitions stored in Oracle Application Express.

See Also:

"Controlling RESTful Services for an Instance" in Oracle Application Express Administration Guide

4.7.3 Configuring Static File Support

For configuring static files, you must run apex_rest_config.sql after a new installation or upgrade of Oracle Application Express .

Oracle Application Express enables application developers to include static files with their applications. Static files can be associated with a workspace, an application, a plug-in, or an application theme. When using Oracle REST Data Services as your web listener, static files are served using RESTful service module built into Oracle Application Express. Therefore, you must run apex_rest_config.sql after a new installation or upgrade of Oracle Application Express.

4.7.4 Securing Oracle REST Data Service

In a configuration for Oracle Application Express, Oracle recommends setting the parameter security.requestValidationFunction to wwv_flow_epg_include_modules.authorize.

Set parameter security.requestValidationFunction to wwv_flow_epg_include_modules.authorize activates the white list of callable procedures which ships with Oracle Application Express and prohibits calls to other procedures.