Previous Next JavaScript must be enabled to correctly display this content

## 18.5.4 Editing or Deleting a REST Data Source

Edit or delete a REST Data Source from Shared Components.

- Editing a REST Data Source
  Edit a REST Data Source from Shared Components.
- Deleting a REST Data Source
  Delete a REST Data Source from Shared Components.

Parent topic: Managing REST Data Sources

### 18.5.4.1 Editing a REST Data Source

Edit a REST Data Source from Shared Components.

To edit a REST Data Source:

1. Navigate to the REST Data Sources page:
   1. On the Workspace home page, click App Builder.
   2. Select the application.
   3. On the Application home page, click Shared Components in the center of the page.
   4. Under Data Sources, select REST Data Sources.
2. On the REST Data Sources page, click the REST Source Name.
   The REST Data Source page appears.
3. Edit the REST Data Source attributes.
4. Under REST Data Source:
   1. Name - Defines descriptive name for this REST Data Source.
   2. REST Data Source Type - Select the REST Data Source type, which is either a built-in type or a type defined by a REST Source Plug-In. To learn more, review item Help for more details or see About REST Data Source Types.

      The REST Data Source Type determines what appears next. This example assumes, REST Data Source Type is set to Simple HTTP.

   3. Remote Server - Choose a Remote Server object for this REST Data Source. To learn more, see field-level Help.
   4. Base URL - Displays the Base URL.
   5. URL Path Prefix - The URL Path Prefix is specific to this REST Data Source. The URL Endpoints of all operations within the REST Data Source share the same URL Path Prefix. To learn more, see field-level Help.
5. If REST Data Source Type is Simple HTTP, under Settings, select a Pagination Type:
   - No Pagination

   - Page Size and Fetch Offset - Flexible pagination where the REST API allows the request a specific set of rows, using page size and offset ("start at row") parameters.

     The following shows typical URL. In this example, the URL requests page number 2 with a page size of 100, which leads to rows 101 to 200 being returned.

     `http://hostname.domain.com/path/to/rest_api?limit=100&offset=20`

     In the previous example, note that the parameters named `limit` and `offset` can be arbitrary and depend upon the REST API being used.

   - Page Size and Page Number - Pagination where the REST API allows the request a set of rows, using page size and page number parameters.

     URLs typically look like the following example which requests page number 2 with a page size of 100, which leads to rows 101 to 200 being returned.

     `http://hostname.domain.com/path/to/rest_api?size=100&page=2`

   - Page Number - Pagination where the REST API allows to request a set of rows, using a page parameter. The Page Size is fixed and determined by the REST API.

     URLs typically look like the following example which requests page number 2. If the REST API uses a fixed page size of 20, rows 21 to 40 will be returned.

     `http://hostname.domain.com/path/to/rest_api?page=2`

   - Page Size and Page Token - Pagination where the REST API allows to request a set of rows, using a combination of a page token and page size parameters. The token is used to retrieve the next set of rows, and is returned in the response body of the previous request. The page size determines the number of rows to return in each request.

     URLs typically look like the following example, which requests the next set of rows using the token `ApEx=` and a page size of `100`.

     `http://hostname.example.com/path/to/rest_api?token=ApEx=&limit=100`

   The UI changes based on Pagination Type you select. See field-level Help for more information on specific attributes.

6. If REST Data Source Type is REST Enabled SQL Query, under Settings, REST Enabled SQL Query:
   - SQL Query - Displays the SQL Query to execute on the REST Enabled SQL Reference.
7. Under Authentication:
   - Credentials - Select stored credentials for authentication.
   - Authentication Server - If authentication has to be done on a (different) Authentication Server, create a Remote Server object for this and choose it here. See field-level Help for more information.
8. Under Data Profile:
   1. Click Edit Data Profile to change how REST Data Source responses (in XML or JSON) format are being parsed and converted to rows and columns.
      The Data Profile page appears.
   2. Under Data Profile and Columns, edit the attributes.
      Row Selector stores an XML or JSON path expression pointing to the node containing the collection of rows. Columns determine how one row is parsed and converted to multiple columns.
   3. Click Apply Changes to save your changes.
9. Under Operations - Operations contains the actual information about the external web service handler. Operations can be mapped to Database Operations which enables APEX components to pick up the correct operation.
   1. To add or edit an operation:
      - Click Add Operation to add a REST Data Source Operation.
      - Click the Edit icon to edit an existing operation.

      The REST Source Operation page appears.

   2. Under Operation:

      To learn more about these attributes and see examples, see field-level Help.

      - URL Pattern - The URL Pattern is the last part of the Web Service endpoint URL. The combination of URL pattern and HTTP Operation (GET, POST, PUT, DELETE) identifies the operation within a REST Data Source.

      - HTTP Method - Defines the HTTP Operation or Method (GET, POST, PUT, DELETE, PATCH) to be executed on the REST Web Service.

      - Database Operation - Assign a Database Operation to this HTTP operation. The database operation is important for APEX components to work with the REST Data Source.

      - Request Body Template - Enter the request body template to be used for HTTP POST, PUT, PATCH or DELETE requests. To learn more, and view examples, see field-level Help.

      - Supports Template Directives - Enable to use Template Directives in the Request Body Template.

      To learn more about these attributes and see examples, see field-level Help.

   3. Under Caching:

      - Caching - Select how the APEX engine can cache REST Source responses on the server side. If caching can be used, the component is rendered based on cached results instead of fetching from the web service again. Only HTTP "GET" requests will be cached, which will cut down expensive HTTP requests. This feature is unrelated to the browser's caching capabilities.

      - Invalidate When - If you enable Caching, specify when cached content is to be invalidated. Provide either the amount of minutes or a "DBMS_SCHEDULER Calendaring String". With the latter, you determine cached content to be invalidated at the top of the hour, at midnight, or another specific recurring point in time.

      To learn more about these attributes and see examples, see field-level Help.

   4. Under Operation Parameters, click Add Parameter to configure REST Data Source parameters.

      Parameters enable support for dynamic URL parts or to pass additional HTTP request headers or a specific request body to the web service. Oracle APEX components assign values to the parameters before invoking the web service. To learn more about these attributes and see examples, see field-level Help.

   5. Under Advanced:

      - Static ID - Enter a unique Static ID to identify this component in API calls or refer to it in application export files. If you change the Static ID, dependent components will retain their references, but any existing API calls using the old ID must be updated manually.

      - Fixed Page Size - Enter the size of the REST service's pagination window. The pagination for a resource handler HTTP operation GET method equates to the number of rows to return on each page of a JSON format result set based on a database query.

      - Operation Comment - Enter any developer comments

      To learn more about these attributes, see field-level Help.

   6. Click Apply Changes.
10. Under Parameters - Parameters enable support for dynamic URL parts or to pass additional HTTP request headers or a specific request body to the web service. APEX components assign values to the parameters before invoking the web service.
    1. Click Add Parameter.
       The Parameter page appears.
    2. On Edit REST Data Source Parameter:

       - Edit the attributes. To learn more about an attribute, see field-level Help.

       - Click Add Parameter or Add and Add Another.

    3. On Edit REST Data Source Parameter, edit the attributes and then click Add Parameter. To learn more about an attribute, see field-level Help.
11. Subscription lists REST Data Sources that subscribe to this module and indicates if this REST Data Source is a copy.
12. Under Open API:
    1. Open API - Enable or disable Use OpenAPI. If enabled, the REST Data Source uses OpenAPI/Swagger for discovery.
    2. Endpoint is relative to Base URL - Choose whether the OpenAPI Endpoint is relative to the Base URL of the Remote Server.
    3. OpenAPI URL - Enter the URL where the OpenAPI information is available. This can be an absolute URL or an URL relative to the Base URL of the service.
13. REST Source Catalog - Click Save to Catalog to save the REST Data Source to a REST Source Catalog. See Managing REST Source Catalogs.
14. Under Advanced:
    1. Static ID - Use the Static ID to reference the REST Data Source in API Calls.
    2. Pass ECID - Indicates whether to pass the Execution Context ID (ECID) to the external web services for end-to-end tracing.
       See Advanced to learn more about the application setting in Shared Components, Security Attributes, Advanced, Pass ECID.
    3. HTTP Transfer Timeout - Specify the transfer timeout for all future HTTP requests that are attempted while reading the HTTP response from the Web server or proxy server.
       This timeout value can be used to avoid the application from being blocked by busy Web servers or heavy network traffic while retrieving responses. See SET_TRANSFER_TIMEOUT Procedure in Oracle AI Database PL/SQL Packages and Types Reference
    4. Comments - Enter Comments or notes.
15. To save your changes, click Apply Changes.

Parent topic: Editing or Deleting a REST Data Source

### 18.5.4.2 Deleting a REST Data Source

Delete a REST Data Source from Shared Components.

Tip:

A REST Data Source can only be deleted if no Oracle APEX component is referencing it.

To delete a REST Data Source:

1. Navigate to the REST Data Sources page:
   1. On the Workspace home page, click App Builder.
   2. Select the application.
   3. On the Application home page, click Shared Components in the center of the page.
   4. Under Data Sources, select REST Data Sources.
2. On the REST Data Sources page, click the REST Source Name.
   The REST Data Source page appears.
3. To delete the REST Data Sources, click Delete.
4. Confirm your selection and click OK.

Parent topic: Editing or Deleting a REST Data Source