I've been working on an easy way to pull CDP info, esp since the API seems like the only way to get it out of an MX. My goal was to be able to pick an org, pull its network list, then granularly work network->device category->device (or whole hog) to get specific info. I'm doing this in Python. I convert the dictionaries into objects using classes, because I find it easier than trying to dig into some of the weirdly formatted JSON. I don't have anything that's not weirdly broken to share, unfortunately. Final product is a CSV or xlsx containing: Org name (if multiple orgs), network name, device name, all switchports (in your use case), all results of CDP/LLDP Pseudocode: Pull org list for org in orgList: get networkList from org for network in networkList: get deviceList from network for device in DeviceList: if the first two letters in the device.name == MS: get switchports get CDP/LLDP information for that device do some magic to ensure switchports are correlated to CDP/LLDP info output switchports and CDP/LLDP info into a CSV or Excel spreadsheet If all of your APs are Meraki APs, you could instead check device.name == MR, then get CDP/LLDP info off the AP itself.
... View more