Add the REST Adapter as an Invoke Connection

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

REST Adapter Invoke Basic Information Page

Enter the REST Adapter user name, description, 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

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 connection’s responsibilities (for example,This inbound REST connection exposes this integration flow as a REST resource).

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:
http://host:port/integration/flowapi/rest/INTEGRATION_NAME

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

http://host:port/integration/flowapi/rest/EXPOSEFLOWASRESTRESOURCE

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

host:port/integrations

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.

REST Adapter Invoke 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.

HTTP Method Displays the action to perform on the endpoint that you selected 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 orchestrated 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 Invoke Request Page

Enter the REST Adapter request payload details for the endpoint.

Element Description

Select the multipart attachment processing options

  • 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 to send multipart attachments as part of the request along with HTML form as the payload request. 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 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. A list of commonly used types is shown in a dropdown list. You can select a type from this list or provide a type not listed by selecting Other Media Type and entering the type in the text box.

    Note: Binary payload support is only available when the adapter is used as an invoke, not a trigger.

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

Send Query Parameter as form-data in message body
Select if you want to pass URL-encoded form data in the payload. The values are derived from the query parameters you defined on the Request Parameters page. However, instead of submitting the query parameters, they are sent as form data in the message body with this option selected. This field is only displayed if you made the following selections in the Adapter Endpoint Configuration Wizard:
  • The POST verb was selected on the Basic Info page.
  • The Configure a request payload for this endpoint and Add and review parameters for this endpoint options were selected on the Basic Info page.
  • Query parameters were specified on the Request Parameters page.

REST Adapter Invoke Request Headers 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: Response processing occurs according to the static contract defined at design time. The dynamic value overrides the value sent to the endpoint. The response returned must match the Accept header configured at design time. The overridden header must be a variation of the content length specified at design time.
    • Authorization: The dynamic header value overrides any authorization performed as part of the security policy. Track any authorization failures to the given header property.
    • Content Length: The REST Adapter always infers the content length from the actual content length passed to the target endpoint. If there is no content, but the target endpoint expects the content-length header with a value of 0, then as with all request headers, you can include the standard HTTP request header from the Adapter Endpoint Configuration Wizard and assign it a value of 0 in the mapper.
    • Content-Type: The dynamic header is not passed to the translation framework and translation continues according to the static configuration at design time. At runtime (post-message processing), the dynamic header value is sent to the endpoint.
    • Origin: You can set the origin request header as part of the outgoing HTTP request.
  • Click the Delete icon to delete the row of a selected standard HTTP request header.

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 Invoke Response Page

Enter the REST Adapter response payload details for the endpoint.

Element Description

Resource URI

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

HTTP Method Displays the action to perform on the endpoint that you selected on the Basic Info page.

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 the 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.
  • 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 Invoke 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 Length: The content length of the response is propagated to Oracle Integration (regardless of the length). The response may have been translated and the actual values may no longer match. This is the response header corresponding to the original message.
    • Content-Type: The response header is propagated along with the response to the integration.
    • Retry-After: The response header sent by a target endpoint is returned to the integration.
  • 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 Invoke 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 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.