Description | With this action you can send REST requests to an external REST API. All common methods (Get/Put/Post, etc.) are supported and you can evaluate the server’s response and have it written in variables. |
Required licence | The REST feature is required. |
1 | Address (Uri) | Enter the address of the external REST API. This can also contain variables (see Use variables). |
2 | Method | Select the desired HTTP method (Get/Post/Put/etc.). All methods are supported. |
1 | Header | In the header, enter the meta information of the request, e.g. authorisation, content type, etc.. If you use an authorisation (e.g. Basic Auth), enter the data directly as a header. |
2 | Parameter | With the help of parameters, you can transfer values with the request. Parameters can be entered via the parameter table or written directly into the URI. A parameter always consists of a key (name) and a value. |
In order to evaluate the response of the server, various possibilities are available.
1 | Write body in variable | This option allows you to write the content (body) of the response unchanged as text into a variable. If the response is e.g. JSON, the entire JSON text is written into the variable. |
2 | Process | In addition, you have the option to process the content of the answer more precisely and to write only certain parts (values) in variables. If you want to evaluate the answer, select the format of the answer and in the table below you can assign the individual values to variables. |
Process JSON
To extract specific values from the JSON response, specify the full path of all keys to the value in the assignment. JSON always follows the same structure:
“key” = “value”.
To use values that are not on the top level. Specify all keys on the path, separated by a dot. “Key1.Key2”.
Example:
The ID value can be used directly via “id”. The values X and Y are one level lower and combined into “result”. To use these values, “result” is specified first and then “x” or “y” (“result.x”, “result.y”). |
Process XML
To extract specific values from the XML response, specify the full path of all keys to the value in the assignment. XML always follows the same structure:
<key>value</key>.
To use values that are not at the top level. Specify all keys on the path, separated by a dot: “Key1.Key2”.
Example:
In this example, the XML response starts with the root node. To query the ID, specify the path to the value, i.e. “Root.ID”. The values X and Y are one level lower in the result. For this, use “Root.Result.X” and “Root.Result.Y”. |
Please note:
Invalid keys: If you are unsure whether a key is specified correctly, simply execute the trigger. If a key is invalid, it will be indicated in the log of the trigger. You will also receive a list of all available keys there.