REST API and Webhook actions

The REST API call and Webhook actions share most of their settings and behavior. The major difference between them is the way parameters are passed to the target URL. The Webhook action is a little bit easier to use for novice users because it’s guiding you to compose the request parameters. The REST API call action is more free form and allows an experienced user to write the request payload manually.

Shared properties

The following fields are shared between REST API and Webhook actions:

Field Description
Method GET or POST – the HTTP method to use.
Data format Controls the "Content-Type" header in the resulting HTTP request. If set to default, the Content-Type will not be set for GET requests and set to x-www-form/urlencoded for POST requests. If set to JSON, the Content-Type will be set to application/json.
URL The target URL.
User name If basic authentication is needed, the username. If left blank, no basic authentication.
Password If basic authentication is needed, the password. If both user name and password are left blank, no basic authentication details will be sent.

Content-type

The HTTP header Content-Type will be set depending on the combination of the method field and the data format field:

Data format/Method GET POST
Default Not set x-www-form/urlencoded
JSON Not set application/json

Webhook action

Parameters

The Webhook action lets you assign a list of parameters by clicking the Add key/value pair button:

img

You can add as many parameters as wanted. Remove unwanted parameters with the minus (-) button to the right of each row. Add as many parameters as needed:

img

GET requests

In a GET request, the parameters will be sent as URL parameters, added to the URL using ? and & as separators.

POST requests

In a POST request, the parameters will be sent in the request body (payload). The data format field determines how the parameters are sent, either JSON or x-www-form/urlencoded.

Return value

If the Webhook call returns a JSON formatted value, WunderAutomation makes this value available via a "hidden" parameter named "webhook.response". You can use this value in subsequent actions using a normal placeholder with this name:

img

Read more about how to use returned JSON data here.

REST API call action

Parameters

The REST API call action lets you compose both the URL and the request payload manually. Where the Webhook action UI helps you create a list of parameters, the REST API call action lets you define these manually.

GET requests

The Content-Type header is not set.

Data format/Method GET POST
Default Not set x-www-form/urlencoded
JSON Not set application/json

POST requests

Note that you are responsible for writing/composing the request payload in the correct format in the request body field. WunderAutomation does not attempt to reformat the content based on the data format indicated in the data format field.

Return value

If the REST API call returns a JSON formatted value, WunderAutomation makes this value available via a "hidden" parameter named "webhook.response". You can use this value in subsequent actions using a normal placeholder with this name.

Read more about how to use returned JSON data here.