0

I'm trying to parameterize a url in Postman and loop over that list to call multiple APIs one after another and append the JSON bodies.

For example:

if the url is GET https://location/store/{{user_id}}/date and user_id = ['1','3','5','2','6','8']

then how do I store user_idas a variable such that request can loop over each user_idin the url and generate an appended JSON body?

1 Answers1

0

You can use data files. Store the user id values into a csv or JSON file and call that file in to your collection runner. The headers of the csv files can be used as variables names. please see the details of this approach in the below link

https://learning.postman.com/docs/postman/collection-runs/working-with-data-files/

joinsaad
  • 853
  • 9
  • 13