08-03-2023 03:16 PM
Hello
I am currently in the process of modifying 12 x MS225-48 switches and I am able to modify ports through https://developer.cisco.com/meraki/api-v1/ I have tried Postman but when I import a CSV to runner I get a 400 Bad request error and wondered if there is any other way to modify all switch ports as I need to be done?
Solved! Go to Solution.
08-03-2023 07:15 PM
If all of the ports are being given the same configuration, the change can be easily achieved in the GUI: Switching -> Switch Ports -> Check all of the ports you're making the change on -> Edit.
If the ports are being given different configuration, the API is definitely the way to go.
You will need your script to import the CSV, parse it and build a JSON file with the appropriate configuration and send that with the API request.
You can find a poor but functional powershell script below that you can use as reference.
Meraki/Meraki Update Switchports.ps1 at main · Brash92/Meraki (github.com)
08-03-2023 07:15 PM
If all of the ports are being given the same configuration, the change can be easily achieved in the GUI: Switching -> Switch Ports -> Check all of the ports you're making the change on -> Edit.
If the ports are being given different configuration, the API is definitely the way to go.
You will need your script to import the CSV, parse it and build a JSON file with the appropriate configuration and send that with the API request.
You can find a poor but functional powershell script below that you can use as reference.
Meraki/Meraki Update Switchports.ps1 at main · Brash92/Meraki (github.com)
08-04-2023 04:54 AM
For mass editing in a single network I heavily use tags and then go about selecting the tag's and editing their configuration in one go.
Usually when you connect a new switch to a network the first thing you do is the following. Go to switch -> switchports and then apply following filter. switch:nameofnewswitch port:1-48 and then give them all the tag ACCESS and a second tag depicting the VLAN they are supposed to be in.
Next time you need to edit all those ports you just go tag:nameoftag and then you bulk edit them.
There is also a port-profile early access feature but it is missing some key configurations IMHO.
If you're heavily into API's and you automate new switches into a network it might be a good idea to automatically add tags to new ports.
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