I am a newbie and I am not a coder/developer, just learning.
I have this task related to post API / postman.
The scenario as follows:
Run API to sign in and get the token
Edit the bearer token in a different API and run it (with that same token) for multiple URL
For eg. (after getting the token):
POST {{url}}api/v1/add/page-01
POST {{url}}api/v1/add/page-02
POST {{url}}api/v1/add/page-03
… …
POST {{url}}api/v1/add/page-99
I’ve tried to make a collection runner with that many API, so I don’t have to do it manually and eyeball/monitors the result. But in the next day, I will get a new token so I’ve to edit all that request one by one and this is very time-consuming and a waste.
How to do this in a more automated way? Can you guide me?
And how to iterate the request for “x” amount times but with different URLs?
(Should I start a new thread or can I continue in this one to ask about this?)
For eg, rather than I add one by one in my collection runner:
POST {{url}}api/v1/add/page-01
POST {{url}}api/v1/add/page-02
POST {{url}}api/v1/add/page-03
… …
POST {{url}}api/v1/add/page-99
Can I just make something as a variable and iterate it 99x times?
Using this as a base request: POST {{url}}api/v1/add/page-“xx”
I would recommend searching the forum for an answer on that. I’ve answered questions exactly like that maybe 10 times over the past year, they are out there and you won’t have to dig very hard
Hi @denisdav, you may use collection runner and have URL as a variable. For that variable, you can pass data from csv or json and can have that number of iterations.