REST Client

The REST Client connection allows for sending and receiving data to/from HTTP endpoints. The connection is flexible to communicate with the many different types of REST endpoints, both in authentication schemes and data formats.

Connection Settings

Base URL

The base URL for the request (e.g., https://myurl.com)

Note: We recommend trailing forward slash is not included in the Base URL.

Headers

Name, Value header pairs to be passed on each request.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers

Note: Depending on the authentication type, some headers may be overwritten. Eg, if “Basic Auth” is chosen, the “Authentication” header will be automatically set.

Authentication Type

Authentication type used for REST client connection.

None

No authentication used.

Basic Auth

Basic authentication included in the header. Set the username and password.

OAuth 2.0

Only the client credentials grant type is supported. Credentials can be sent in the header or the body. If an input or output receives a 401 (unauthorized), the request is attempted a second time allowing the token to be refreshed without data loss.

Setting Description
Grant Type Only client credentials is supported.
Login URL The login URL of the OAuth provider.
Username The client id.
Password The client secret.
Scope Optional scope of the client.
Audience Optional audience.
Resources Optional resources.
Client Authentication Send the credentials in the header or the body.

Bearer Token

Simple authentication using a header based token.

Setting Description
Token The token included in the header for login

Ignore Self-Signed Certificate

Used to ignore validation of the certificate if https:// is used. This is useful for testing but not recommended in production.

Input Settings

Inputs can send requests to an HTTP endpoint and make the response available as data in the server.

Endpoint URL

The endpoint to send the request to (e.g., /routes/myendpoint). A leading / is not required, but recommended.

Content Type

The content type of the incoming request: JSON or XML are supported.

HTTP Method

The method to use: GET or POST.

Headers

Name, Value header pairs to be passed on each request.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers

These are added to the connection level header.

Note: Depending on the authentication type, some headers may be overwritten. Eg, if “Basic Auth” is chosen, the “Authentication” header will be automatically set.

Request Body

The body of the POST request. This can be any text including JSON.

Raw Response

Enable this to include the returned value, status code, and headers in the response. See the example read result below.

When enabled, non-200 responses do not produce a read error, and instead return the status code as shown below. The only exception to this are 401 error codes. These indicate an authentication issue, and produce a read error.

json
{
	"value": {
		"tag1": 100
	},
    "_statusCode": 200,
    "_headers": {
    "Access-Control-Allow-Origin": "*",
    "Access-Control-Allow-Headers": "origin, content-type, accept, authorization, x-key-id, x-runtime-client-id",
    "Access-Control-Allow-Credentials": "true",
    "Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS",
    "Content-Type": "application/json",
    "Transfer-Encoding": "chunked"
    }
}

Output Settings

Outputs can send data to an HTTP endpoint.

Endpoint URL

The endpoint to send the request to (e.g., /routes/myendpoint). Leading / is not required but recommended.

Headers

Name, Value header pairs to be passed on each request.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers

These are added to the connection level header.

Note: Depending on the authentication type, some headers may be overwritten. Eg, if “Basic Auth” is chosen, the “Authentication” header will be automatically set.

HTTP Method

The method to use: POST or PUT.

Body Type

Controls how the data is sent as part of the HTTP request.

  • None No data is sent. This is useful for triggering external webhooks.
  • Form Data Data is encoded as a multipart form.
  • Form Urlencoded Data is URL encoded and sent in the request body.
  • Template Enter a custom template in the template field. If empty, back to default JSON encoding.
  • Binary File is sent in binary format. Complex data falls back to default JSON encoding.