You can pass parameters to the API step to be used for the API call. You can also export parameters from the API response to be used in the rest of the test. Read more about parameters options here.

Click here to run a demo test of the example featured in this article.

Using parameters in the sent HTTP request

Parameters can also be used in the header, body, and URL.
Since those sections are cumbersome to write in JS, we made it easy for you. In these sections you will need to add double\triple curly brackets around the parameters.

Example for a parameter in the header:

Example for a parameter in the body:

Example for a parameter in the URL:

Note: You can use triple brackets if you do not want the parameters to be escaped. e.g {{{param}}}

Using parameters in the HTTP response

Parameters added in the property panel will automatically be added to the function's signature. Plus you can also access any other variables in the test's scope.

Did this answer your question?