Hi Everyone,
Thanks, it is working now I want to share my code it may help someone like me
Post api call for Search API
Pre request
var nextIndexQ = +parseInt(pm.environment.get(‘nextIndexQ’));
newqr = JSON.parse(pm.environment.get(“Qstring”));
console.log(nextIndexQ)
pm.environment.set(‘currentQ’, newqr[nextIndexQ]);
nextIndexQ = nextIndexQ + 1;
if(nextIndexQ < newqr.length){
postman.setNextRequest(‘SearchJob’);
}
else
{
console.log(“No data”)
}
pm.environment.set(“nextIndexQ”, nextIndexQ);
Body
“query”: {{currentQ}},
“from”: “{{fromDate}}”,
“to”: “{{toDate}}”,
“timeZone”: “IST”,
“byReceiptTime”: true
Test tab
collected response and saved ids from each responses and used it in a next job call.