Pulling multiple JSON pages

My question: How can I pull multiple json pages with 1 query.

Example: https://example.com/{{ID_Array}}.json

I want {{ID_Array}} to run numbers 1-1000 meaning it will show me 1,000 different json pages within Postman.

Is this possible?

Thank you :slight_smile:

@mougwi Welcome to the community :partying_face:

Yes you can do that using data driven approach. Currently Postman supports JSON and CSV files. You can store the page numbers in the JSON file with the keyname {{ID_Array}} and Postman is smart enough to read the same attribute and it will match the value for every run, it will iterate. I wrote an article here with baby steps to implement data driven.

I hope this helps, let us know if you are able to make it :grinning:

You can try this simple approach.

Define these global variables:

And this is the script to be added in the Tests, like in the screenshot below:

let currentPage = pm.globals.get("currentPage");
pm.globals.set("currentPage", currentPage);

if (currentPage > pm.globals.get("pageMaxValue")) {
} else {