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.
The following fields are shared between REST API and Webhook actions:
|GET or POST – the HTTP method to use.
|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.
|The target URL.
|If basic authentication is needed, the username. If left blank, no basic authentication.
|If basic authentication is needed, the password. If both user name and password are left blank, no basic authentication details will be sent.
The HTTP header Content-Type will be set depending on the combination of the method field and the data format field:
The Webhook action lets you assign a list of parameters by clicking the Add key/value pair button:
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:
In a GET request, the parameters will be sent as URL parameters, added to the URL using ? and & as separators.
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.
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:
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.
The Content-Type header is not set.
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.
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.