17.4.4 Editing or Deleting a REST Data Source

Edit or delete a REST Data Source from Shared Components.

17.4.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 - 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 simple HTTP data feed. Oracle APEX assumes that all data is returned with the first request and that the server does not support server-side filtering, ordering, or other advanced REST service feature. All invocation details and parameters must be configured manually.

      • Oracle REST Data Services - Denotes Oracle REST Data Services (ORDS). 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. Oracle APEX can leverage these features by delegating report order-bys and filters to the REST service.

      • REST Enabled SQL Query - Denotes a REST Source on top of a SQL Query executed on a REST Enabled SQL Reference. Oracle APEX supports filtering and pagination, but no DML on these endpoints.

      • Oracle Cloud Applications (SaaS) REST Service - Denotes RESTful web services provided by Oracle Cloud SaaS Applications. Use this web service type to integrate Oracle SaaS REST Services into your Oracle APEX application. Oracle Oracle APEX pagination for these services.

      • Oracle Cloud Infrastructure (OCI) REST Service - Denotes 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 Oracle APEX application. Oracle APEX 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.
  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 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.

  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:
      • 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.

      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:
      • 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.

      • Static ID - Provide a static ID for programmatic access to this REST Operation. The static ID will be converted to lower case, and all non-alphanumeric or special characters will be replaced with an underscore ("_").

      • 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 Database PL/SQL Packages and Types Reference
    4. Comments - Enter Comments or notes.
  15. To save your changes, click Apply Changes.

17.4.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 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.
  4. Confirm your selection and click OK.