Rest Op - Send Request

Overview

The REST Send Request can be used to send an outbound REST request to an external REST api.

Attributes

The operation attributes are as follows.

Attribute Type Description
type String rest.SendRequest | rest.[application_name].SendRequest
label String An optional label for this node if it is to be the target of a branch operation.
arguments Object [Required] The structure of the REST SendRequestArg we expect to receive. Expressions may be supplied within this structure.

Example

This is an example entry within the operations array:

{
    "type": "rest.SendRequest",
    "arguments": {
        "path": "/api/v1/test",
        "query": "application=test",
        "http_headers": [
            {
                "name": "WWW-Authenticate",
                "value": "Basic",
                "append": false
            }
        ],
        "content": "Testing Message Content",
        "method": "POST",
        "content_type": "text/plain"
}

Arguments

The following arguments for outbound requests are supported.

Argument Type Notes
path String The HTTP sub path to append to the base URI configured against the invoked REST application.
query String The HTTP query parameters to append to the base URI configured against the invoked REST application.
content String Optional content to be included in the HTTP request body. Content encoding is derived from the defined content_type.
method String [Required] HTTP method to invoke when performing the outbound request.
content_type String [Required] HTTP body encoding type.
http_headers Array of Objects Array of additional header objects that will be either appened or added to the existing HTTP headers. Wether headers are appened or replaced is determined on a single header basis by the following configuration items.
name String The name of the HTTP header.
value String The value of the HTTP header.
append Boolean Wether or not to append the defined header value to an existing header of the same name. If a header already exists with the same name the header value will be overwritten.

Each object in the http_headers Array has the following structure.

Field Type Description
.name String [Required] The name of the HTTP Request header.
.value String [Required] The full string value of the HTTP Request header.
.replace 0 / 1 If 1 then all previous headers of this name are removed, and this header replaces them.
(Default = 0, append to the existing headers, do not replace)
.append 0 / 1 DEPRECATED alternative flag to "replace".
(Default = 1, append to the existing headers, do not replace)