Access Oracle Cloud Infrastructure Service Resources Using RPST

You can access Oracle Cloud Infrastructure services through use of RPST and the OCI Service Invocation security policy. This example provides a high level overview of designing an integration in which a REST Adapter invoke connection configured with the OCI Service Invocation security policy calls the Oracle Cloud Infrastructure Vision service.

You must complete all prerequisites described in RPST and OCI Service Invocation Security Policy Use.
  1. Create an application integration.
  2. Create and configure a REST Adapter trigger connection.
  3. Create and configure a REST Adapter invoke connection:
    1. Specify the connection type.
    2. Specify the URL of the Oracle Cloud Infrastructure service you want to access. (for this example, the Oracle Cloud Infrastructure Vision service URL is specified). The absolute URL for the Oracle Cloud Infrastructure service is region-specific.
    3. Select the OCI Service Invocation security policy. No other user configuration is required.

      The Properties page shows the Connection type field with a value of REST API Base URL. The Security policy field shows a value of OCI Service Invocation.

    4. Test and save the connection.
  4. In the integration canvas, add and configure the REST Adapter trigger connection.
  5. In the integration canvas, add and configure the REST Adapter invoke connection. For this example, a PDF is uploaded to the Oracle Cloud Infrastructure Vision endpoint to identify the type of document.
    1. On the Basic Info page, specify the service endpoint URL (/actions/analyzeDocument), select the action to perform (POST), and select the request and response configuration options.

      The What is the endpoint's relative resource URI field shows a value of /actions/analyzeDocument. The What action do you want to perform on the endpoint field shows a value of POST. The check boxes for the Configure a request payload for this endpoint and Configure this endpoint to receive the response are both selected.

    2. On the Request page, specify the media type of the request body (JSON) and provide a JSON request sample.

      The Enter Sample JSON field shows sample request JSON code.

    3. On the Response page, specify the media type of the response body (JSON) and provide a JSON response sample.

      The Enter Sample JSON field shows sample response JSON code.

  6. Configure the source-to-target mappings between the two connections.
    When complete, the integration looks as follows.


    The final integration shows a trigger, mapper, invoke, and mapper.

  7. Activate and run the integration.
  8. On the Configure and run page, select the PDF to upload to the Oracle Cloud Infrastructure Vision endpoint in the Body section and click Run.

    The Configure and run page shows Endpoint metadata and Track instances buttons. Below is the POST path. Below is the Request section with tabs for URI parameters, Headers, Body, cURL, and Integration properties.

    The Activity Stream panel opens and shows the movement of messages through the integration. On the Configure and run page, Oracle Cloud Infrastructure Vision detects that the PDF is an invoice, and responds with the following:


    The Response section shows the Status value of 200 OK, the Instance ID, and tabs for Body (which is selected) and Headers. The body code is shown.