Add the REST Adapter as a Trigger Connection

When you drag the REST Adapter into the integration canvas as a trigger connection, the Adapter Endpoint Configuration Wizard is invoked. Based on your selections in the wizard, the following pages can be displayed.

REST Adapter Trigger Basic Information Page

Enter the REST Adapter user name and description. You can also select to configure multiple resources or verbs.

Element Description

What do you want to call your endpoint?

Provide a meaningful name so that others can understand the connection. For example, if you are creating a source Oracle REST connection, you may want to name it ExposeFlowAsRESTResource. You can include English alphabetic characters, numbers, underscores, and dashes in the name. You cannot include the following:
  • Blank spaces (for example, My REST Connection)

  • Special characters (for example,  #;83& or res(t)4)

  • Multibyte characters

What does this endpoint do?

Enter an optional description of the endpoint's responsibilities (for example,This inbound endpoint exposes this integration flow as a REST resource).

Select to configure multiple resources or verbs (maximum 11)

Select to configure multiple operation entry points with different resource URIs and HTTP actions/verbs, as necessary. Each operation represents a different pick action branch in a single integration. The maximum number of operations (branches) you can create in one integration is eleven. This feature eliminates the need to create multiple integrations (each with a separate resource URI and verb) to perform different operations.

REST Adapter Trigger Resource Configuration Page

Enter the REST Adapter operation name, relative resource URI, and endpoint action. You can also select to add query and template parameters or configure a request and/or response for the endpoint.

Element Description

Provide an operation name

Enter an operation name.

What does this operation do?

Enter an optional description of the operation's responsibilities.

What is the endpoint’s relative resource URI?

Specify the relative path associated with the resource. The path can contain template parameters specified with curly braces (for example, {order-id}). A resource is any source of specific information that can be addressed. The resource path follows a fixed, prefixed URL appended with the specified relative path. By default, the URL is prefixed with the following path:
https://instance_URL/ic/api/integration/v1/flows/rest/INTEGRATION_NAME/VERSION

For example, if the integration name is ExposeFlowAsRESTResource, the URL becomes:

https://instance_URL/ic/api/integration/v1/flows/rest/EXPOSEFLOWASRESTRESOURCE

You can override the URL, except for the fixed part at the beginning:

instance_URL/ic

What action do you want to perform on the endpoint?

Select a single HTTP action (method) for the endpoint to perform:
  • GET: Retrieves (reads) information (for example, makes queries). If you select this option, you cannot configure a request payload for this endpoint.

  • PUT: Updates information.

  • POST: Creates information.

  • DELETE: Deletes information. If you select this option, you cannot configure a request payload for this endpoint.

    PATCH: Partially updates existing resources ( for example, when you only need to update one attribute of the resource).

    Note: The PATCH verb does not work with a non-SSL REST service.

Select any options that you want to configure

Select the options that you want to configure:
  • Add and review parameters for this endpoint: Click to specify the query parameters and view the template request parameters created as part of the resource URI for this endpoint. If you select this option and click Next, the Request Parameters page is displayed.

  • Configure a request payload for this endpoint: Click to configure the request payload for this endpoint, including specifying the schema location and payload type with which you want the endpoint to reply. You can also select this option if you want to include an attachment with the inbound request. If you select this option and click Next, the Request page is displayed.

  • Configure this endpoint to receive the response: Click to configure the response payload for this endpoint, including specifying the schema location and payload type that you want the endpoint to receive. If you select this option and click Next, the Response page is displayed.

Configure Request Headers?

Select the type of request header to configure:

  • Standard: Select to configure standard HTTP headers for the request message.

  • Custom: Select to configure custom HTTP headers for the request message.

Configure Response Headers?

Select the type of response header to configure:

  • Standard: Select to configure standard HTTP headers for the response message.

  • Custom: Select to configure custom HTTP headers for the response message.

Configure CORS (Cross Origin Resource Sharing)

(available only in the trigger (inbound) direction)

Select to configure CORS parameters for a trigger. CORS enables restricted resources (for example,. custom HTTP headers that introduce cross-site Java scripting security issues) on a web page to be requested from another domain outside of the domain from which the resource originated.

REST Adapter Trigger Request Parameters Page

Enter the REST Adapter request parameters for this endpoint.

Element Description

Resource URI

Displays the endpoint relative resource URI entered on the Basic Info page.

Specify Query Parameters

Specify query parameters for the REST endpoint.

Click the Add icon to display a row for entering the parameter name and selecting its data type. For example, specify state and select a data type of string.

Click the Delete icon to delete a selected row.

Template Parameters

Displays the template parameters in the relative resource URI. Template parameters are based on details you specified on the Basic Info page and cannot be edited.

Template parameters must be defined as part of a path with curly braces around them. For example, the URL default/customers/{cust-id}/{ship-id has cust-id and ship-id template parameters. You can change the data type for the parameters.

Note:
  • Any query and template parameters added or configured are available for mapping in the mapper and in the actions in integrations.

  • Query and template parameter values added in the URL specified on the Connection page do not appear in the mapper. Instead, the template and query parameters must be configured in the Adapter Endpoint Configuration Wizard for those parameters to appear in the mapper.

REST Adapter Trigger Request Page

Enter the REST Adapter request payload details for the endpoint.

Element Description

Select the multipart attachment processing options

Configure the following options based on whether the request is inbound or outbound.

For inbound (trigger) requests, select the multipart attachment type to include. This option is only available if you selected the POST action on the Basic Info page.

  • Request is multipart with payload: Select to send multipart attachments as part of the request along with JSON or XML content as the payload request.

  • Multipart request is of type multipart/form-data with HTML form payload: Select for the REST endpoint to accept to configure an HTML form. You must first select the Request is multipart with payload option before you can select this option. This selection assumes that the media type is multipart/form-data.

Select the request payload format

Note:
  • Ensure that the sample JSON or the uploaded XML schema is representative of the actual runtime messages exchanged with the endpoint. A mismatch in the structure or type of runtime messages can result in errors.

  • If you upload a schema file without a target namespace, a surrogate namespace is added to the schema file that all messages then use:
    http://xmlns.oracle.com/cloud/adapter/nxsd/surrogate

Select the request payload format to use. The request payload body must be defined by the XSD element that defines the structure of this representation.

  • XML Schema

  • JSON Sample: Select this option to use Swagger and RAML files. JSON sample files of up to 100 KB in size are supported.

    Empty arrays in JSON sample files are not supported. For information, see Empty Arrays Are Not Supported in Sample JSON Files. You may need to process large JSON sample files with special characters before using the Adapter Endpoint Configuration Wizard. See Large Sample JSON File Processing with Special Characters.

  • XML Sample (Single or No Namespace): Select this option to use an XML document to generate the schema.
  • Binary: Use with payloads that are unstructured and inline — for example, application/octet-stream. It preserves the file contents, but requires the receiver to determine file type, for example, from the filename extension. The Internet media type for an arbitrary byte stream is application/octet-stream.

Schema Location

Specify the schema file in either of the following ways:
  • Click Browse to select the request schema file to use.

  • Click <<inline>> to copy and paste the JSON payload or URL into a text field. Click OK when complete.

Element

Select the element that defines the payload structure. This field is not displayed until you import the request payload file. Once you browse for and select the schema or JSON sample file, the schema is displayed automatically. It also displays a combination box that selects the root element by default.

What is the media-type of the Request Body? (Content-Type Header)

  • XML: Displays the payload in XML format.

  • XML (text): Displays the payload in XML text format.

  • JSON: Displays the payload in JavaScript Object Notation (JSON) format.

  • URL-encoded: Displays the payload in URL-encoded format.

  • Other Media Type: Select to display the payload in another format (for example, application/oracle.cloud+json). You can only specify the media types that end with +json or +xml. The following media types are supported implicitly and cannot be configured. At runtime, the request media type is in the form of an http Content-Type header. The expected response media type is specified through an Accept header. Any service can be accessed through either of these media types.
    • Application/XML

    • Application/JSON

Select the multipart attachment type for the endpoint to receive. This field is displayed if you selected the Request is multipart with payload option in the Select the multipart attachment processing options field.
  • multipart/mixed: Send an XML or JSON payload type with an attachment. For example, send a PDF document for review as a link in an email.

  • multipart/form-data: Send an XML or JSON payload type with an attachment. For example, you create an HTML form to upload and send an image. In the HTML form, the method is defined as post and the enctype (encoding type) is defined as multipart/form-data. You can also send the attachment alone without a payload when using this attachment type.

REST Adapter Trigger Request Header Page

Enter the REST Adapter request header properties for this endpoint.

Note:

If you specify a custom header name that is the same as a standard header name, an error occurs. Ensure that you specify unique names for your custom headers.

Specify the standard HTTP request headers to use.

Element Description

Add Standard Request Headers

Select the standard HTTP request header to use from the default dropdown list.
  • Click the Add icon to add an additional row, then select the standard HTTP request header to use from the dropdown list. Standard headers available for selection include, but are not limited to, the following:
    • Accept: When sent by a client, the Accept header is published to an integration. This header describes the preferred format in which the client wants to accept the request. This allows for the propagation of the header sent by the client application to Oracle Integration.
    • Connection: If a request is sent with the connection header set, this value is propagated to the integration.
    • Content Length: The length of the content is propagated to Oracle Integration, regardless of content length. Post translation, this value may not match the actual content.
    • Content-Type: This allows for the propagation of the header sent by the client application to Oracle Integration.
    • Origin: This header sent as part of the request to a REST Adapter trigger is propagated to the integration.
  • Click the Delete icon to delete the row of a selected standard HTTP request header.

    Note:

HTTP Header Name

Perform the following tasks:
  • From the list, select the header to use.

Specify the custom HTTP request headers to use.

Element Description

Add Custom Request Headers

Perform the following custom request header tasks:
  • Click the Add icon to add custom HTTP request headers and optional descriptions.

  • Click the Delete icon to delete the selected custom HTTP request headers.

Custom Header Name

Enter the custom header name.

Custom Header Description

Enter an optional description.

REST Adapter Trigger CORS Configuration Page

Enter the REST Adapter CORS configuration properties for this endpoint.

Element Description

Allowed Origins

Specify the allowable domains from which to make CORS requests. Requests coming from these domains are accepted. Enter an asterisk (*) for all domains to make the requests. Enter comma-separated values for specific domains to make the requests (for example, http://localhost:8080 , https://myhost.example.com:7002).

Allowed Methods

The allowed method displayed is based on your selection in the What action does the endpoint perform? list on the Basic Info page.

Requests are only accepted from the allowable domains that perform the allowable actions (methods). You cannot configure the method name listed in the CORS configuration.

REST Adapter Trigger Response Page

Enter the REST Adapter response payload details for the endpoint.

Element Description

Select the multipart attachment processing options

Configure the following options based on whether the request is inbound or outbound.

For inbound (trigger) responses, select the multipart attachment type to include.

  • Response is multipart with payload: Select to receive the response from the payload.

  • Multipart response is of type multipart/form-data with HTML form payload: Select for the REST endpoint to accept to configure an HTML form. You must first select the Response is multipart with payload option before you can select this option. This selection assumes that the media type is multipart/form-data.

Select the response payload format

Note:
  • Ensure that the sample JSON or the uploaded XML schema is representative of the actual runtime messages exchanged with the endpoint. A mismatch in the structure or type of runtime messages can result in errors.

  • If you upload a schema file without a target namespace, a surrogate namespace is added to the schema file that all messages then use:
    http://xmlns.oracle.com/cloud/adapter/nxsd/surrogate
Select the response payload format to use. The response payload body must be defined by the XSD element that defines the structure of this representation.
  • XML Schema

  • JSON Sample: Select this option to use Swagger and RAML files. JSON sample files of up to 100 KB in size are supported.

    Empty arrays in JSON sample files are not supported. For information, see Empty Arrays Are Not Supported in Sample JSON Files. You may need to process large JSON sample files with special characters before using the Adapter Endpoint Configuration Wizard. See Large Sample JSON File Processing with Special Characters.
  • XML Sample (Single or No Namespace): Select this option to use an XML document to generate the schema.
  • Binary: Use with payloads that are unstructured and inline — for example, application/octet-stream.  It preserves the file contents, but requires the receiver to determine the file type, for example, from the filename extension. The Internet media type for an arbitrary byte stream is application/octet-stream.

Schema Location

Specify the schema file in either of the following ways:

  • Click Browse to select the response schema file to use.

  • Click <<inline>> to copy and paste the JSON payload or URL into a text field. Click OK when complete.

Element

Select the element that defines the payload structure. This field is not displayed until you import the response payload file. Once you browse for and select the schema file, it displays a combination box that selects the root element by default.

What is the media-type of Response Body (Accept Header)

Select the payload type with which you want the endpoint to reply.
  • XML: Displays the payload in XML format.

  • XML (text): Displays the payload in XML text.

  • JSON: Displays the payload in JavaScript Object Notation (JSON) format.

  • Other Media Type: Select to display the payload in another format (for example, application/oracle.cloud+json). You can only specify media types that end with +json or +xml. The following media types are supported implicitly and cannot be configured. At runtime, the request media type is in the form of an http Content-Type header. The expected response media type is specified through an Accept header. Any service can be accessed through either of these media types.
    • Application/XML

    • Application/JSON

Select the multipart attachment type for the endpoint to receive. This field is displayed if you selected the Response is multipart with payload option in the Select the multipart attachment processing options field.
  • multipart/mixed: Send an XML or JSON payload type with an attachment. For example, send a PDF document for review as a link in an email.

  • multipart/form-data: Send an XML or JSON payload type with an attachment. For example, you create an HTML form to upload and send an image. In the HTML form, the method is defined as post and the enctype (encoding type) is defined as multipart/form-data.

REST Adapter Trigger Response Header Page

Enter the REST Adapter response header properties for this endpoint.

Note:

If you specify a custom header name that is the same as a standard header name, an error occurs. Ensure that you specify unique names for your custom headers.

Specify the standard HTTP response headers to use.

Element Description

Add Standard Response Headers

Select the standard HTTP response header to use from the default dropdown list.
  • Click the Add icon to add an additional row, then select the standard HTTP response header to use from the dropdown list. Standard headers available for selection include, but are not limited to, the following:
    • Content-Type: Enables you to assign the media type of choice to the response content. The response content type is not used for processing and is sent as part of the response during postprocessing.
    • Retry After: You can send this header as part of the response back to the caller.
  • Click the Delete icon to delete the row of a selected standard HTTP response header.

HTTP Header Name

Perform the following tasks:
  • From the list, select the header to use.

Specify the custom HTTP response headers to use.

Element Description

Add Custom Response Headers

Perform the following custom response header tasks:
  • Click the Add icon to add custom HTTP response headers and optional descriptions.

  • Click the Delete icon to delete the selected custom HTTP response headers.

Custom Header Name

Enter the custom header name.

Custom Header Description

Enter an optional description.

REST Adapter Trigger Operations Page

Review or edit existing operations or add a new operation. Each operation represents a different pick action branch in a single integration. The maximum number of operations (branches) you can create in one integration is six. Each entry point can be configured with a different resource URI and HTTP action/verb, as necessary. This feature eliminates the need to create multiple integrations (each with a separate resource URI and verb) to perform different operations. You can expose multiple entry points to a single integration with a pick action that uses the REST Adapter as the trigger connection.

See Receive Requests for Multiple Resources in a Single REST Adapter Trigger Connection of Using Integrations in Oracle Integration 3.

Element Description
Operation Displays the operation name entered on the Resource Configuration page.
Resource Displays the endpoint relative resource URL selected on the Resource Configuration page.
HTTP Method Displays the action selected on the Resource Configuration page.
Edit/Delete Select to edit or delete an operation and its endpoint relative resource URL and action.
Add another operation Select to return to the Resource Configuration page to add another operation name, endpoint relative resource URL, and action.

REST Adapter Trigger Operation Selection Page

Enter the REST Adapter invoke operation selection parameters for this endpoint.

Element Description

Business Object

Select the business object (resource) to use in this connection.

Operations

Select the operation (method) to perform on the business object in this connection.

Summary Page

You can review the specified adapter configuration values on the Summary page.

Element Description

Summary

Displays a summary of the configuration values you defined on previous pages of the wizard.

The information that is displayed can vary by adapter. For some adapters, the selected business objects and operation name are displayed. For adapters for which a generated XSD file is provided, click the XSD link to view a read-only version of the file.

To return to a previous page to update any values, click the appropriate tab in the left panel or click Go back.

To cancel your configuration details, click Cancel.

Click generate a sample cURL to generate sample cURL syntax for the configuration options that you have selected during REST Adapter connection configuration, such as security policy, headers, parameters, and so on.