InvokeRESTService

This activity is both an outbound and inbound REST request which means that it is used to make a request to the REST service and also accept the reply returned by the service.

Settings

Field Description
Method Select an operation for the request. For example: GET, POST, PUT, or DELETE.
URL An absolute path to the REST service that you want to invoke. For example: http://acme.com or https://acme.com. If you enter an absolute path beginning with https://, the Use certificate for verification section appears.

If your connection requires an SSL certificate, select True. Otherwise, select False. To add a certificate, under Server Certificate, click Browse and browse to the certificate location on the machine.

Request Type

NOTE: This field is applicable and visible only in the POST and PUT method.

The Request content type of the REST service. The following content-type are supported:
  • text/plain
  • application/json
  • application/x-www-form-urlencoded
Timeout

Specify the timeout period for invoking a service. If a timeout value is specified, the activity waits for the specified time. If a response is not received by the specified time, the request expires with an error.

Default: 0 seconds (that is, there is no timeout for invoking a service)

Proxy URL

Specify the URL to the HTTP proxy server. If a proxy URL is specified, the request to the REST service (specified in the URL field) is routed via this proxy URL.
Note: A secure connection to the proxy server is not supported.

Default: Proxy URL is not enabled.

Input Settings

Field Description
Request Schema Enter a request schema here. This field is visible only if you selected the POST or PUT method in the Settings tab.
Query Params Query parameters to be appended to the path. To add the query parameters, click the button and press Enter to save your changes.

parameterName: Name of the query parameter.

type: The data type of the query parameter. Supported types are string, number, or boolean.

required: Set to True if query parameter is a required configuration. The trigger will report an error if no value(s) are provided to the required query parameter.

Request Headers Header values for the InvokeRESTService activity. To add the header parameters, click the button and press Enter to save your changes.

parameterName: Name of the header parameter.

type: The data type of the header parameter. Supported types are string, number, or boolean.

required: Set to True if header parameter is a required configuration. The trigger will report an error if no value(s) are provided to the required header parameter.

Input

Field Description
queryParams Provide a value to the query parameters configured on the Input Settings section. This field is visible only if you selected the POST or PUT method in the Settings tab.
pathParams Provide a value to path parameters defined as part of URL in the Settings tab. This field is visible only if you selected the POST or PUT method in the Settings tab.
headers Header values for the activity. These values can be manually entered or mapped to the output of the trigger or any preceding activity.
body Request Schema values for the activity. These values can be manually entered or mapped to the output of the trigger or any preceding activity. This field is visible only if you selected the POST or PUT method in the Settings tab.

Output Settings

Field Description
Configure Response Codes

Allows you to configure response codes.

Default: False (See "Response Schema" and "Response Type" in this table.)

To specify a response code, select True and click the button. Enter the following details:

  • Code: Enter the response code.
  • Type: Select the type of response expected for the Code. Supported types are String and Object.

  • Response Body: If Object is selected as the Type, enter the JSON schema in the Response Body column. For String, you need not enter anything in the Response Body column.

  • Actions: The actions displayed change based on the type of the response code.
    • Edit, Delete: For an Object type of response, you can edit the details or cancel it.
    • Save, Cancel: For a String type of response, you can save or cancel the changes.

The response codes appear in the Output tab.

Response Schema

NOTE: This field appears only when Configure Response Codes is set to False.

The schema for the reply that the server sends.
Response Type

NOTE: This field appears only when Configure Response Codes is set to False.

The content type of the REST service. The following content-types are supported:

  • text/plain
  • application/json
  • other
Response Headers The header parameters for the reply.

Output

The Output tab displays the headers and response body configured for both the request and the response in a tree format.