7.2 Enabling REST Objects from the Object Browser

Enable REST objects from Object Browser with the REST tab.A new REST tab appears in Object Browser when selecting a TABLE, VIEW, PACKAGE, PROCEDURE, or FUNCTION. The tab exposes a form that provides the ability to REST Enable a database object using ORDS.

Note:

Oracle Application Express 19.2 installations that utilize Oracle REST Data Services (ORDS) release 19.1 or later support the ability to REST enable database objects using the AutoREST feature of ORDS. While AutoREST is the most straight forward way to create RESTful Services based on database objects, it does have some drawbacks and limitations.

To learn more about AutoREST, see Automatic Enabling of Schema Objects for REST Access (AutoREST) in the Oracle REST Data Services Installation, Configuration, and Development Guide.

Required

To perform this procedure, you must meet the following requirements:

  • Your schema must be registered in ORDS.

    To register your schema, see Registering Schema with ORDS.

  • The REST objects you wish to enable must exist and comply with AutoREST.

To REST Enable an object:

  1. On the Workspace home page, click SQL Workshop.
  2. Select Object Browser.
  3. From the list of object types, select the object type (such as Tables).
  4. Select the object.
  5. Click the REST tab.

    The object details display the ORDS Version and the form to AutoREST enable the object is displayed.

    Description of ordsrestful_schema_enabled.png follows
    Description of the illustration ordsrestful_schema_enabled.png
  6. In the REST tab:
    1. REST Enable Object - click Yes to enable.
    2. Authorization Required - click No to disable.

      Note:

      Disabling the Authorization Required setting renders the object publicly accessible. Enabling this setting requires further configuration of user roles to grant access to users.
    3. Click Apply.

      A success message displays and a "RESTful URI" field appears. RESTful URI provides the case sensitive URI that is used to access the REST enabled object.

      Description of restful_uri.png follows
      Description of the illustration restful_uri.png

Optional

Once the object is REST Enabled, you can access the data through the supplied URI. The URI is formatted in JSON.

To view the plain text contents of the RESTful URI using a browser:

  1. Copy the RESTful URI.

    Tip:

    You can click the Copy to Clipboard icon (Copy to Clipboard) to quickly copy the RESTful URI.
  2. Open a new browser tab, paste the copied URI into the URL field, and press Enter.

    The browser displays a JSON document exposing the table data for the table you selected.

See Also: