cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
22772
Views
12
Helpful
22
Replies

Update multiple devices in different networks

Conway
Frequent Visitor
Frequent Visitor

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!

22 Replies 22

uncledamfee
Community Member

@5ghz

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!

5ghz
Community Member

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.

uncledamfee
Community Member

@5ghz

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)?

image.jpeg

image.jpeg

My .csv:

networkIdnumber
L_XXXXXXXXXXXXXXX0
L_YYYYYYYYYYYYYYY0

This is what I get when I try to run the collection:

image.jpeg

Thanks!

5ghz
Community Member

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}}

image.gif

image.gif

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

uncledamfee
Community Member

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)

image.jpeg

image.jpeg

image.jpeg

image.jpeg

Thanks!

5ghz
Community Member

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.

uncledamfee
Community Member

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.

image.jpeg

Thanks

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!