XenoGuard Documentation

Request

Actions » Windows » Network » REST » Request 

The action Request links to any external application or software using a REST API request.


[-] Hide
  1. Open the Windows node in the Workspace Explorer.
  2. Open the Network node.
  3. In the RESTAPI node, select the Request action.

Parameters:

The action has the following input parameters:


name Description
URL
The URL or web address of an API or endpoint.

Allowed Context Scope [Fixed]
Allowed Context Types [Variable, Parameter, Enum]
HTTP Method
The method to be used for the request.

Accepted Values: GET, POST, PUT, PATCH, DELETE

Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Enum]
Basic Access Authentication
The credentials needed to authenticate user access.

Parameters for the "Basic Access Authentication" sub-branch:

  • User Name - the user name used to login
  • Password - the password used to login
Allowed Context Scope [Fixed]
Allowed Context Types [Variable, Parameter, Enum]
HTTP Headers
The HTTP header to be set and defined by the user.

Parameter for the "Header Name" sub-branch:

  • Header Name - the name of the HTTP header 
  • Header Value - the value of the HTTP header
Allowed Context Scope [Fixed]
Allowed Context Types [Variable, Parameter, Enum]
Request Payload
The JSON data to be used in POST or PUT HTTP method.

Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Enum]
Timeout [ms]
The timeout in milliseconds.

Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Enum]

Results:

The action returns the following results:


name
description
JSON Content
The JSON data from the API request.

Allowed Context Scope [Fixed]
Allowed Context Types [Variable, Parameter]
Response
The three-view response from the API request.

Parameter for the "Response" sub-branch:

  • Response Property Name - the name of the response property
Allowed Context Scopes [Fixed]
Allowed Context Types [Variable, Parameter]

Example 1 (Determine the BMI with a REST API):

This example utilizes a REST API named Fitness Calculator API to calculate the BMI with a specified age, weight, and height in the URL. The values from the JSON content in a tree-structure view and the BMI value is rounded off and displayed in Message Box together with the health status.


See other Network operations:

General
FTP
TCP
HTTP
JSON\
EMAIL