Rest API and Webhook actions

Shared properties #

The Rest API call and Webhook actions share most of their settings and behaviour. 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.

FieldDescription
MethodGET or POST – the http method to use
Data formatControls 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
UrlThe target URL
User nameIf basic authentication is needed, the username. If left blank, no basic authentication
PasswordIf 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 / MethodGETPOST
DefaultNot setx-www-form/urlencoded
JSONNot setapplication/json

Webhook action #

Parameters #

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:

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 webook 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 normal placeholder with this name:

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 / MethodGETPOST
DefaultNot setx-www-form/urlencoded
JSONNot setapplication/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 normal placeholder with this name.

Read more about how to use returned JSON data here.

Powered by BetterDocs

Leave a Reply

Your email address will not be published. Required fields are marked *