Skip to content
On this page

REST API call

Info

NameValue
Object IDwunderautomation.rest-api-call
GroupAdvanced

Description

The REST API Call action sends data from a workflow to a remote HTTP endpoint. It is very similar to the Webhook action but where the request body in the webhook action is strictly controlled, the REST API Call action offers a free-form text area to compose the request body.

In short, the REST API Call action provides less assistance and is suitable for more advanced users.

The REST API Call action supports the GET, POST and PUT HTTP methods.

Authentication

The REST API Call action supports three different forms of authentication on the remote web service.

MethodDescription
Basic authThe incoming request must provide a Authenticationheader according to the Basic auth standard based on the username and password specified in the trigger settings.
Header keyThe incoming request must provide a secret key in a separate HTTP header. The name of the header and the secret key are specified in the trigger settings.
HMACThe incoming request must provide a HMAC header that signs the entire request. The name of the header and the secret used to for signing it are provided in the trigger settings.

Example

The screenshot below shows a REST API action set up with method: POST, format: JSON, url: https://api.example.com/v1/orders for an order with ID: 12345 that exists in the runtime context. The authentication method is set to Basic and a username and password are supplied.

REST API action in WunderAutomation

This will cause the following HTTP request to be sent out:

bash
POST /v1/orders HTTP/1.1
Host: api.example.com
Content-Type: application/json; charset=utf-8
Authorization: Basic dXNlcjpwYXNzd29yZA==

{
  "id":"12345",
   "key":"abc123",
   "email":"customer@example.com"
}

Released under the MIT License.