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.
1. Right-click on the REST Request object and select Properties from the context menu.
This will open a new window.
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.
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.
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.
Here, you can see that we have defined Request Context Parameters using the values we had in the REST Request object.
These parameters can be used anywhere ahead in the entire API flow.
This concludes the working of the Request Context Parameters.