API Chaining and Dynamic Parameter Usage
You can combine values returned from previous API steps (chaining), test data, and example variables in any part of your API requests. This allows you to build powerful, flexible, and fully data-driven API scenarios.
What Is API Chaining?
API Chaining allows one API step to reference the response of a previously saved step. You can pass response data like tokens, IDs, or user details into the URL, headers, query parameters, or body of another step.
Examples
You might use chaining when:
- A token or ID from Step 1 is needed in Step 2.
- You want to simulate real-world multi-step workflows.
- Your tests depend on data generated at runtime.
How to Chain API Steps
Add an API Step
Create your first API step (for example, a login or credential fetch).
Note
See how to add an API Step.
Save the Step
Once saved, the step’s response becomes available as test data for later steps, listed under the step name.
Note
See how to save an API Step.
Add the Next API Step
Open the Test Data section.
You’ll see response fields from the previous step under its name.
Click a field to copy its syntax.
Use the Response in Request Fields.
Paste the copied value into any request field that supports dynamic input.
Send the Request and View the Result.
Send the request and verify that the chained values are correctly applied.
Use Dynamic Parameters in Any Request Field
In addition to chaining previous responses, you can insert dynamic values from Examples and Test Data directly into your API steps.
Supported Dynamic Values:
Parameter Type | Syntax | Source |
---|---|---|
Example Variables | <variableName> | Scenario-level Examples table |
Test Data Values | {{testDataName}} | Test Data section |
Chained Response Data | {{step-1.responsePath}} | Response of previous API steps |
Tip
You do not need to manually type these syntaxes.
- Example variables (
<variableName>
) and can be copied from the Examples section. - Test Data values (
{{testDataName}}
) and response data from previous API steps can be copied from the Test Data section.
Simply paste the copied syntax into the URL, headers, query parameters, or request body wherever needed.
Where You Can Use Dynamic Parameters
Dynamic values can be used in:
- URL (demonstrated in the chaining example above).
Note
The examples shown below use response data for demonstration, but the same process applies when inserting Test Data ({{testDataName}}
) or Example variables (<exampleVariable>
). You can mix and combine any of these dynamic values inside any request field.
Query Parameters
Headers
Request Body