- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Grabbing Client Info from Systems Manager
I'm writing a script to see if DHCP reservations are for devices still on the network. It is simple enough to call
client = meraki.getclient(apikey, networkid, mac, suppressprint=True)
But if the device is on an extended trip and hasn't been back in the office in 30 days, I may still want to keep the reservation. I could create a loop to cycle through all of my networks to see if the device is on any of the networks, but that isn't very efficient. It seems like I should be able to query Systems Manager for the information. I see documentation for the API that suggests that I should be able to find something from meraki.getsmdevices but I'm not sure what the network_id for my Systems Manager network would be. Can anyone point me to where I can find that?
Solved! Go to solution.
- Labels:
-
Dashboard API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A systems manager network is just like any other network. So the id can be found in the same place. If it's combined with the rest of the network, the id is the same. If it's a separate network you can find it through one of the calls. I believe your library should have this call:
getnetworklist(apikey, orgid, templateid=None, suppressprint=False)
That should give you the id's of all the networks in the org.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A systems manager network is just like any other network. So the id can be found in the same place. If it's combined with the rest of the network, the id is the same. If it's a separate network you can find it through one of the calls. I believe your library should have this call:
getnetworklist(apikey, orgid, templateid=None, suppressprint=False)
That should give you the id's of all the networks in the org.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank! I don't know how I overlooked that. I think in most of my scripts I'd grabbed the list of devices in the org and used that for my list of networks. Since the SM network doesn't have hardware, it didn't show up in the list.
