I have an existing postman collection which i need to execute via postman cli, but I don’t want to execute the entire collection. I need to execute only certain requests from the collection and the collection has multiple subfolders and the request can be in any of the subfolders. Moreover the request body json will come from the csv file since the request in the collection will just have a placeholder only.
In order to achieve the above, i tried to get the request id by using the below postman api
https://api.getpostman.com/collections/?apikey=apikey
and it worked. I am able to get the request id from the collection via script.
Now i am planning to send that request id to pm.execution.setNextRequest(requestid) to execute the request. But at the same time, i need to get the request json from csv file via pm.iterationData.
Note: The request body json and request id is coming from the csv file
While doing this, it’s executing the same request over and over. I am not sure how to control the iteration data as well as pm.execution.setNextRequest to achieve what i am expecting.
Could you please help resolve this.
Thanks in advance.

