When you open the Collection Runner on your collection, you’ll see an Upload Data button. This allows you to upload a file containing variable values for each iteration. You can upload either a SCV or JSON file.
Here’s an example of the expected structure:
[
{
"variable_1": "value of variable_1 for the first iteration",
"variable_2": "value of variable_2 for the first iteration"
},
{
"variable_1": "value of variable_1 for the second iteration",
"variable_2": "value of variable_2 for the second iteration"
},
{
"variable_1": "value of variable_1 for the third iteration",
"variable_2": "value of variable_2 for the third iteration"
}
]
variable_1,variable_2
value of variable_1 for the first iteration,value of variable_2 for the first iteration
value of variable_1 for the second iteration,value of variable_2 for the second iteration
value of variable_1 for the third iteration,value of variable_2 for the third iteration
Once you’ve uploaded this file, you can use these variables anywhere in your request:
- In the URL, query parameters, body, or authentication with this format:
{{variable_1}}
- In scripts using
iterationData
: insomnia.iterationData.get('variable_1')