Issues with bulk renaming of Meraki APs using Postman Runner

I’m trying to do a bulk rename of Meraki APs in Postman. I have Postman set up with the following variables

The_Roo_0-1734434500083.png

And they work, so if I do any of the following, I get the expected output

GET {{baseUrl}}/organizations

GET {{baseUrl}}/organizations/:organizationId/networks

GET {{baseUrl}}/organizations/:organizationId/devices

GET {{baseUrl}}/networks/:networkId/devices

GET {{baseUrl}}/networks/:networkId/wireless/ssids/

I want to use runner, to enable me to do many AP renames automatically, so I created a CSV file called “name-change-data” with a header line and in this first instance, a single line relating to a single AP I want to test on (when this test works, I will add lines for all the APs I want to change)

The serial number in the file is the number seen in the Meraki Dashboard, so I know that is right, and the name is just a different string to what the AP is called at the moment.

I then create a collection called “Bulk Rename APs” that looks like this:

{{baseUrl}}/networks/{{networkId}}/devices/{{serial}}

the format of which was as specified in Solved: Rename AP with postman runner - The Meraki Community

Next, I set up the body section as follows:

{

“name”: “{{name}}”,

“serial”: “{{serial}}

}

I then go to file>New Runner Tab, and get a window that asks me to “Drag a collection from the sidebar to run”, so I drag “Bulk Rename APs” in. It goes in with a lot of others, so I deselect all of them and reselect “Bulk Rename APs” only.

The_Roo_2-1734434500086.png

On the right of the page, I click “Select File” and select “name-change-data.csv” and then click the “run” button. I get an error notification telling me to look at the console, which has this:

What am I doing wrong, and why is github flagged?

All advice gratefully recieved!

Thanks

Roo

Hey @the-real-roo :wave:

Welcome to the Postman Community! :postman:

That Github URL looks like it’s an async request coming from a Pre-request script with the Collection. That also looks like there is some other code that’s trying to parse the response of that request and it’s failing.

Sorry Danny, I don’t know enough about Postman to understand your response or make useful changes based upon it. Can you explain as if to a 7-year-old child please

Thanks
Roo

The Bulk Rename APs POST request or the Collection contains a Post-response script that has an async request (pm.sendRequest()). This is making a request to that Github URL to do something.

That same script is probably trying to parse the response of the async request and as it’s returning something unexpected, it’s failing.

I have no idea what the script is or what it’s doing but it’s there and that’s what is failing.

1 Like

You said

So I had a look at the scripts area and foud this:


so while I understand what you are saying and it sounds completely reasonable, I can’t find the script where I would expect it…can you suggest where it would be?

Thanks

Roo

The script is going to be at the Collection level.

From what it looks like, first forming a better understanding of the Collection and the Requests within it, to know exactly what you’re running would be very beneficial here.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.