© Copyright 2023, Astera Software
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.
Right-click on the 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.
We will open the Properties of the Expression object.
This will open the configuration window for the object.
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 Request object.
These parameters can be used anywhere in the entire API flow.
This concludes the working of the Request Context Parameters in Astera Data Stack.