Request Context Parameters

Request Context Parameters allow us to use Request Parameters anywhere within the scope of the API flow. They can be used at any point within the flow following the Request object.

For our use case, we will look at the parameters defined in our flow.

01-Request-Context-Usecase

1. Right-click on the REST Request object and select Properties from the context menu.

02-Right-Click-Properties

This will open a new window.

03-Query-Parameter

As you can see in the image above, we have defined a query parameter. This can be directly used as a variable further in the API flow to design the flow logic and set values.

Following the request object, the flow uses a SQL Query Source object to read all products where the category name matches the request parameter value. Since a SQL Query Source requires a SQL query to be defined, let’s see how we can use the incoming query parameter in the context of the SQL query.

04-01-SQL-Query

These Context Parameters can also be used in other objects as variables. As another example, we have used them to define expressions.

2. We will open the Properties of the Expression object.

04-Expression-Parameter-Properties

This will open the configuration window for the object.

3. Click on a field and open the Expression Builder. Here, all request parameters are available and can be referenced to be used in expression functions.

06-Expression-Builder

Here, you can see that we have defined Request Context Parameters using the values we had in the REST Request object.

05-Context-Parameter

These parameters can be used anywhere ahead in the entire API flow.

This concludes the working of the Request Context Parameters.