07-01-2022 12:49 AM
I've noticed there are Meraki commands that can provide lists of network devices; for example, all switches, APs, or all Meraki devices in a network or organization.
However, some commands specific to switches (get switch port statuses) require the serial number of the switch or switches. Is there a Meraki CLI command that can get retrieve the serial numbers of all switches? That way I wouldn't have to go through 100s of switches and manually copy and paste.
Solved! Go to Solution.
07-01-2022 05:12 PM
You can use this API to get all devices.
https://developer.cisco.com/meraki/api-v1/#!get-organization-inventory-devices
Then filter the list for devices with a model number beginning with MS.
07-01-2022 01:11 AM
Meraki switches are meant to be managed from the cloud. What you are referring to, most probably is the meraki-cli python module that is emulated kind of CLI interface. But that module is making use of Meraki API - and there is no api endpoint for your request.
However, your request is easily done with a script and you will not have to copy/paste anything.
07-01-2022 01:59 AM
Or…..simply log into the dashboard, click on the Organisation > Configure > inventory > Download as CSV
Boom, you have all the required information and you haven’t had to faff around with an API
07-01-2022 08:01 AM
I'll definitely have to try that. Thank you @DarrenOC
03-02-2026 12:17 PM
I've just tried that out and downloaded the .CSV file from Inventory, even though the list of S/Ns is empty since I'm just using in the demo version but still.. it's working.
07-01-2022 08:00 AM
Hi RomanMD. I am using the Meraki API. Would you happen to have a script to get the information I'm looking for?
07-01-2022 05:12 PM
You can use this API to get all devices.
https://developer.cisco.com/meraki/api-v1/#!get-organization-inventory-devices
Then filter the list for devices with a model number beginning with MS.
07-01-2022 10:00 PM
This is great! Thank you for sharing
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