Contact Us 1-800-596-4880

REST Call

You can use the REST Call Action Step to fetch data directly from a server and to collect the required information in a simple way.

You define the end point as you wish and you can assign parameters or process variables to the call. This enables you to flexibly address any REST interface. The response in JSON format (or XML) can be used as a source variable during the remainder of the process run.

REST Call via a proxy

You can also make the REST Call via a proxy server. To do this, the REST Call Action Step automatically retrieves the necessary information from the Network Settings, provided you have made the appropriate settings there.

The Network Settings can be found in the Settings Action Step, which is located in the Workflow Initialization block.

Properties

REST Call Settings

Base Url Here, the end point entered in the wizard is displayed.

Json Path Displays the JsonPath Expression, such as $.access_token.

Method Type REST guidelines recommend the user of a specific HTTP method for a specific type of calls to the server.

Parse Type You can choose between JsonPath and XPath.

With both types, you have the major advantage that you can extract exactly the information that you require without having to use special scripting. This simplifies further processing for you as you can access the desired result immediately.

With the Json Query Action Step, you also have the option of reading individual values from the Json object and thus specifying the result further.

Request body Here you can see what is to be sent.

Request Body Type Here you can choose between JSON and Form URL encoded.

Url Extension A path parameter that uniquely identifies the resource.

XPath Displays the Xpath expression, for example, /root/access_token/text().

Inbound Variables

Base Url Here, the end point entered in the wizard is displayed.

Url Extension A path parameter that uniquely identifies the resource.

Json Path Expression Displays the JsonPath Expression, such as $.access_token.

XPath Expression Displays the Xpath expression, for example, /root/access_token/text().

Outbound Variables

IsSuccessful (boolean) Shows whether the REST Call was successful or not.

ResponseBody (string) Returns the requested information as a string.

FirstItem (array) The first element of the array is output as a string

Status (integer) Displays the HTTP status code. 200 for OK, for example – the request was processed successfully and the result was transferred in the answer

ArrayCount Indicates the number of elements of the returned array.

Wizard

The wizard is split into the Settings and Parameters areas.

In Settings, you specify the Method Type, that is, the required HTTP method. In the Base Url, you specify the Host and Base Path. With the Url Extension, you uniquely identify the resource. You can either just type in the URL or define it via the pin variable.

In the Parameters area, you provide the required information to the end point. There are various options for this, you can enter the parameters directly in the URL, similar to the example above, or you can transfer them “invisibly” with the different parameters Request Body, Header Parameter or Query Parameter.

With the Request Body, you send data to the server, including, for example, the form of communication between the server and the client. According to convention, the methods GET, HEAD and DELETE do not require a body (see also the network protocol RFC 7231).

In addition, in the Parameters area, on the left of the screen, you can find the mapped variables and their Test Values. The mapping is carried out via the Pin variable. With the Test Values, you can check if the REST Call runs successfully. To do this, having entered all the data, click on Send at the bottom right of the wizard.

The (real) values of the mapped variables are not effective until the production run of the Workflow.

To insert the variables with the test values, click

  1. on the required position, e.g. in the area Request body with variables

  2. on the right, on the relevant variable ({A}, {B}, {C},…​ ). The variable is then inserted at this position

In the upper area, the body is displayed with the contained variables, in the lower area, it is displayed with the broken down variables of the Json object. If you selected Json, the body is also highlighted for an improved overview.

With the selection option Json or Form URL Encoded, you can choose which type of request and answer is to be accepted by the server and client. At the same time, the system checks if your entries are compliant. You can also view the conversion of Json to form URL Encoded under the header Parameters in the content type.

With the Header Parameter, you describe exactly which resource is collected or which answer format is required. User-defined headers can be added with the ' X-’ prefix, for example, x-Customer – Customer ID. Here, you typically provide the login information for authentication of a user to a server.

With the Query Parameter, you filter the resource and you can add further information such as login information.

In the Result Viewer, in the text results, you can view the entire returned body, and in the parsed results, you can view the result specified with JsonPath or Xpath.

For the other menu options, see also Properties.