About the AutoREST Page

Use the Automatic Enabling of Schema Objects for REST Access (AutoREST) feature to enable REST access for database objects in the current schema.

Enabling REST access for a schema object such as table, view, function, procedure and package allows it to be accessed through RESTful services. See AutoREST in Oracle REST Data Services Developer's Guide

To navigate to the AutoREST page, in the REST Overview page, click AutoREST or select AutoREST from the menu in the header.

The AutoREST page consists of three parts:

  • Objects: Displays the number of REST-enabled schema objects that are protected and require authorization out of the total number of schema objects enabled in the schema.

  • AutoREST: Displays the number of tables and views, packages, procedures and functions that are REST enabled in the schema. Click a card to see the corresponding objects listed below.

  • The bottom part of the page lists schema objects based on the selection made in AutoREST. You can view these objects in card view or grid view. The actions available in the context menu for an object are:

Enabling REST Access for a Database Object

You can enable REST access for a table, view, materialized view, function, procedure or package.

To REST enable a schema object:

  1. In the Navigator tab in the SQL page, right-click an object and select REST, then select Enable.
  2. Enter the following fields:
    • Object Alias: Enter another name for the object. For security purposes, it is recommended to use a different name than the actual object name.

    • Require Authentication: Select this option to secure the REST endpoint.

    • Authorization Role and Authorization Privilege: These fields are automatically pre-filled.

    Show code: Select this option to view the PL/SQL code equivalent of the Enable REST Access slider. You can copy and execute this PL/SQL code in the worksheet to perform the same action that occurs when you click Enable in the Enable REST Access slider.

  3. Click Enable.

    A REST-enabled object is indicated by a REST Enabled icon enable REST icon in the Navigator tab.

Disabling REST Access for a Database Object

This section describes how to disable REST access for a database object.

  1. In the SQL page, in the Navigator tab, right-click the database object that is REST enabled and select Disable.
  2. You see a prompt to confirm. Click OK.

Generating cURL Requests for a REST-Enabled Database Object

For a REST-enabled database object, you can generate sample cURL calls for GET, POST, PUT and DELETE requests for the selected object. Use the Copy to Clipboard icon to copy the cURL code.

To view the cURL call for a specific method for the selected object:

  1. In the SQL page, in the Navigator tab, right-click the REST-enabled object, select REST and then select cURL command.
  2. Select the HTTP method from the left pane, enter values if required and click Next to see the cURL command.

    For more information about each HTTP method, see Examples in Oracle REST Data Services.