05-03-2018 01:54 PM
I'm attempting to update multiple access point's tags in multiple networks at the same time. I know you can do this in the dashboard as long as they are in the same network. But I'm trying to update the tags of multiple access points in different networks. I might be missing a way to do this via the dashboard but after looking through it and the documentation I can't seem to find a way.
I'm now trying to complete this using python and meraki's dashboard API. Would it be possible to get the inventory of an organization, then using that list to update the devices with new information? For example I'd use “meraki.getorginventory” to provide a list of AP’s to update when doing a “meraki.updatedevice”. Any and all assistance on this is greatly appreciated!
Solved! Go to Solution.
01-28-2020 10:03 AM
Hello, would you be able to explain how you accomplished this? I am trying to update SSID settings (name, psk) across multiple networks (same settings everywhere) but not understanding how to build a collection for multiple updates to multiple networks. I have Postman installed and have successfully sent single PUT requests.
Thanks!
01-28-2020 01:23 PM
Hi,
You will need to use the postman collection runner which will allow you to loop one of your single instances that you have tested already.
your case sounds similar where you want the same setting across multiple networks so should be pretty easy once you understand how postman wants you to set this up. It took me a while as the documentation wasn’t very good at the time, but seems a bit better now.
https://blog.getpostman.com/2018/04/11/looping-through-a-data-file-in-the-postman-collection-runner/
let me know if this link helps you or not, and if you need some more detail I can put something together to help.
also if you have google sheets access you can use the built in Meraki tools add on to help with API queries. Worth a look to see if there is anything useful in there too.
01-29-2020 06:56 AM
Hello, yes some extra detail would be great. I'm trying to use the PUT below to simply change the first SSID name across 2 different networks in a .csv. Am I correct that the csv should only include the 2 variables in the 1st image (networkId, number) and the body of the saved request called in the runner should have the static settings I want (ssid name)?
My .csv:
| networkId | number |
| L_XXXXXXXXXXXXXXX | 0 |
| L_YYYYYYYYYYYYYYY | 0 |
This is what I get when I try to run the collection:
Thanks!
01-29-2020 03:03 PM
hi,
You csv if you open in notepad should read like this;
networkid,number
Nxxxxxxxx,0
Nxxxxxxxx,0
If you are sure that the SSID is always ID 0 then you could just hard-code this in the command, so you would only need to have the list of network ids in your csv.
the reason it's failing is because the put statement requires the variables, whereas you have them in the path variables section. it should read:
https://api.meraki.com/api/v0/networks/{{networkId}}/ssids/{{number}}
if you delete where it says :networkid and type {{networkid}} you'll see the path variable disappear from the params section. then either repeat for the :number or set this value to 0 if your ssid is always 0.
hope this helps.
thanks
01-29-2020 04:23 PM
That makes sense, but somehow still cant get it to work. I have statically set 0 as the ssid number, so I only have the networkId to deal with in the csv. When I run the collection, I get a 404 error (I am selecting the same Env that I use for individual requests)
Thanks!
01-29-2020 04:38 PM
I would delete the path variable ’number’ completely, and either have this
https://api.meraki.com/api/v0/networks/{{networkId}}/ssids/{{number}}
with your csv having the ssid number, or use this
https://api.meraki.com/api/v0/networks/{{networkId}}/ssids/0
404 is page not found so it’s the syntax of the command not enumerating to a valid page.
01-29-2020 05:18 PM
Strange, still getting the 404 error, I've gone with https://api.meraki.com/api/v0/networks/{{networkId}}/ssids/0 , but no luck (I tried the other method with {{number}} as well).
It looks like the csv data is not getting passed through to the variable.
Thanks
01-29-2020 06:49 PM
Success! Not sure why exactly, but my computer crashed and when I reopened excel and imported/resaved the csv, my collection ran successfully. Thank you very much @5ghz!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide