Variable substitution in outbound REST messages

You can use variables when creating outbound REST messages and assign values to those variables when performing a request.

Variables are allowed in the Endpoint URL, HTTP Header and HTTP Query Parameter Value fields, and the Content field for POST and PUT methods.

The syntax for variables is ${variable_name}. The REST message substitutes this variable with the parameter values provided when the method runs. For example, if the REST message Endpoint is${id}, a parameter named id must exist and contain a value that can be used when the method runs.

You can assign a value to variables when running the request using the RESTMessageV2 API setStringParameter and setStringParameterNoEscape methods.

When testing an HTTP method that includes variables, the Test value for each variable in the Variable Substitutions related list is used.