For a Postman solution to this, you could use the Runner tool to import a CSV or JSON file with a list of IDs to act as variables for each run of the request.
Start by creating a new Collection for this Runner group
- Copy in the "Bind a network to a template" endpoint into your new collection. (delete any existing headers)
- The POST body should look like this
{
"configTemplateId": "{{configTemplateId}}"
}
- Add a Tests script for better logging
pm.test("Status code is 201", function () {
pm.response.to.have.status(201);
});
- Make sure your environment has an {{apiKey}} variable set
- Make sure your Collection has the following Authorization config
Then "Run" the collection.
Upload a csv file with two columns and a row for each networkId and its desired configTemplateId or a JSON file with an array with the those params for each network.
Set the Delay to about 250ms
file.csv
networkId,configTemplateId
L_6434517960000001,N_111111111
L_6434517960000002,N_111111111
L_6434517960000003,N_111111111
L_6434517960000004,N_222222222
L_6434517960000004,N_222222222
This will run the desired API for each network, binding it to the config template. You will get a report of each request so you have a log of what worked or had issues.
example summary (using Blink the LEDs )
Hope this helps!