Multiple api calls in a single run

Hi I have made an api call where one of the variables is a list of time periods for which I want to retrieve data. It looks something like [MTD,QTD,YTD].

Now I would like to somehow have an individual api call for each time period without having to press ‘run’ multiple times. Is there an easy way of doing this.

As it is confidential company data, I cannot make the workbook publicly available. I can however make anonymized screenshots if needed.

Hope some can help.

Kind regards,
Jonah

You can use the Collection Runner with an input file (CSV or JSON).

Or you can utilize setNextRequest() in the tests tab to run the same request in loop.

Both methods are covered in the Postman training.

If you are new to Postman I would recommend the Postman training links which are located under “other resources” in the Learning Centre.

Other resources | Postman Learning Center

The “Galaxy API’s 101” course gets you used to sending requests and the GUI.

The “Galaxy Testing and Automation” gets you used to testing your responses and using variables, basic scripting, etc.

Also take a look at the following.

Postman JavaScript reference | using-environment-variables-in-scripts

Finally, Postman uses JavaScript under the hood, If you are going to be scripting, I would also recommend learning some JavaScript basics. WC3 schools is a good place to start.