cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
13368
Views
8
Helpful
7
Replies

Obtain device serial numbers using Meraki CLI?

Peter A
Community Member

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.

1 Accepted Solution

Accepted Solutions

Philip D'Ath
Meraki Community All-Star
Meraki Community All-Star

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.

View solution in original post

7 Replies 7

RomanMD
Level 6
Level 6

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.

MerakiGnome
Meraki Community All-Star
Meraki Community All-Star

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

Darren OConnor
https://www.linkedin.com/in/darrenoconnor

I'll definitely have to try that. Thank you @DarrenOC

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.

Peter A
Community Member

Hi RomanMD. I am using the Meraki API. Would you happen to have a script to get the information I'm looking for?

Philip D'Ath
Meraki Community All-Star
Meraki Community All-Star

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