REST API methods in a REST API may have the following type of parameters:

Input Parameter: the information that is sent in the request;

Output Parameter: the information that is received in the response.

Creating Parameters

When you create a REST API method, the input and output parameters are automatically created for you from the examples you define, as follows:

Dialog Input

Parameters

Data Type

Method URL

In the URL, elements between curly brackets ({}) are created as input parameters

Text, Integer, Boolean, depending on the name of the parameter

Request

A single input parameter is created

Record data type, with its attributes inferred from the example data in the Request field

Response

A single output parameter is created

Record data type, with its attributes inferred from the example data in the Response field

You should validate parameters and their structures, namely, properties Name, Data Type, and Mandatory.

Parameter Placement

To define where to send/receive the input and output parameters, you have the Send In and Receive In properties, respectively. They allow you to choose from the followings:

Input Parameters: may be sent in one of the following parts of the request:

Output Parameters: may be received in one of the following parts of the response:

If the REST API method requires a different placement than the one set by default, simply change it.

Sending Default Values

In REST API Methods, an input parameter or structure attribute that is non-mandatory and is set with the default value, it is not sent in the request. However, the web service may be expecting to receive a value. In this case, force sending the default value by changing the Send Default Value property to Yes.

The following table resumes how values of input parameters or structure attributes are sent in the request.

 

Default Value

Other Values

Mandatory

Send

Send

Non-mandatory

Does what is set in

the Send Default Value property.

(by default it is Don't Send)

Send

 

If the web service always requires the value, simply set the input parameter or structure attribute as mandatory (in the Mandatory property), and the value is always sent in the request.