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.
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.
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.
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
Hi RomanMD. I am using the Meraki API. Would you happen to have a script to get the information I'm looking for?
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.
This is great! Thank you for sharing