InvokeRESTService

This activity is used to make a request to a REST service; it also accepts the reply returned by the service.

Settings

Field Description
Method Select an operation for the request. For example: GET, POST, PUT, DELETE, or PATCH.
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.

Timeout

Specify the timeout period (in milliseconds) 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 milliseconds (that is, there is no timeout for invoking a service)

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
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 a specific response code or configure a single schema for a category of response codes. For example, if all the status codes are similar (such as 501, 502, 503, and so on), you can define a single schema (as 5xx) for them. Defining a single schema saves you time and effort as you do not need to configure each status code separately in the activity.
    Note: If the status code is provided as a range (5xx in the above example) and also an absolute format (501 in the above example), the status code in the absolute format is given priority. In the above example, status code 501 is given priority over 5xx at runtime.
  • 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.

Loop

Refer to the section on "Using the Loop Feature in an Activity" in the TIBCO Cloud™ Integration - Flogo® (PAYG) User's Guide for information on the Loop tab.

Retry on Error

This tab allows you to set the number of times the flow should try to execute the activity if it encounters a retriable error (such as waiting for a server to start, intermittent connection failures, or connection timeout) during the activity execution.

Field Description
Count The number of times the flow should attempt to execute the activity.
Interval The time (in milliseconds) to wait in between each attempt to execute the activity.