XenoGuard 4.0 Documentation

Request

ActionStep Reference » Windows » Network » REST » Request 

The REST Request ActionStep is designed to interact with RESTful APIs or endpoints. This ActionStep facilitates sending requests and receiving responses through a variety of HTTP methods and is essential for automating interactions with web services, enabling the retrieval and manipulation of data via API calls. The flexibility to define HTTP methods, headers, and payloads makes it suitable for a wide range of applications.


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

Parameters:

The ActionStep has the following input parameters:


name Description
URL
Specifies the URL of the API or endpoint to which the request is sent.

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 ActionStep returns the following results:


name
description
JSON Content
The JSON formatted data retrieved from the API response.

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 also other groups:

General
FTP
TCP
HTTP
JSON\
EMAIL