17.4.3 Editing or Deleting a REST Data Source

Edit or delete a REST Data Source from Shared Components.

To edit or 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.

    Tip:

    A REST Data Source can only be deleted, if no Oracle Application Express component is referencing it.
  4. To edit the REST Data Source, select the REST Data Source and edit the attributes.
  5. Click the REST Source Name.
  6. Under REST Data Source:
    1. Name - Defines descriptive name for this REST Data Source.
    2. REST Data Source Type - Determines the REST Data Source type, which is either a built-in type or a type defined by a REST Source Plug-In. The following built-in types are supported:
      • Simple HTTP - Select this option for a HTTP data feed. Application Express supports sources returning the data all at once, or based on simple pagination schemes. See field-level Help in Application Builder for details. Application Express assumes that the REST API does not support server-side filtering, ordering, or other advanced REST service feature.

      • Oracle REST Data Services - Select this option for Oracle REST Data Services (ORDS) REST Services. These REST services follow the Oracle REST standard, which means that GET, POST, PUT or DELETE operations are standardized. Server-side filtering and ordering are supported. Application Express can leverage these features by delegating report 

      • Oracle Cloud Applications (SaaS) REST Service - Select this option for RESTful services provided by Oracle Cloud Applications (SaaS). Use this web service type to integrate Oracle SaaS REST Services into your Application Express Application. Application Express supports pagination for these Services.

      • Oracle Cloud Infrastructure (OCI) REST Service - Select this option for RESTful web services provided by Oracle Cloud Infrastructure. Use this web service type to integrate OCI REST Services (for example, accessing the Object Store) into your Application Express application. Application Express supports pagination for these Services.

    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.
  7. If REST Data Source Type is Simple HTTP, under Settings, Pagination Type, select one of the following:
    • 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 arbitray 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

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

  8. Under Authentication:
    • Credentials - Select stored credentials for authentication.
  9. Subscription lists REST Data Sources that subscribe to this module.
  10. 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 Change to save your changes.
  11. Under Operations - Operations contains the actual information about the external web service handler. Operations can be mapped to Database Operations which enables Application Express components to pick up the correct operation.
    1. Click Add Operation to add a REST Data Source Operation, or click the Edit icon to edit an existing operation.
      The REST Source Operation page appears.
    2. Under Operation:
      • 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) to be executed on the REST Web Service.

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

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

    3. Under Caching:
      • Caching - Select how the Application Express 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 Advanced:
      • 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.

      • Allow Fetching All Rows - Specify whether Application Express components are allowed to fetch all rows and executing multiple HTTP requests from the REST source operation.

      • Operation Comment - Enter any developer comments

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

    5. Click Apply Changes.
  12. 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. Application Express components assign values to the parameters before invoking the web service.
    1. Click Add Parameter.
    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.
  13. Subscription indicates if this REST Data Source is copy.
  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.
    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 Database PL/SQL Packages and Types Reference
    4. Comments - Enter Comments or notes.
  15. To save your changes, click Apply Changes.