08-17-2017 09:44 AM - edited 03-01-2019 03:43 AM
I'm looking to retrieve the status (connected/not) of each of the Ethernet ports as displayed on the Meraki interface within an app, and I was hoping the dashboard API might have a call I could use. I've attempted the call to return uplink information, although all that returns is a single WAN port, which isn't what I'm after. I also attempted grabbing the switch ports with this call. However, I've consistently been getting back a 404 error. The request link appears to match up to the expected format.
Does anyone know if there's a good way to check each Ethernet port's status via the dashboard API?
Solved! Go to Solution.
08-20-2017 11:53 AM
Michael,
You can check the configuration of the ports by looking at the switchport configuration:
https://dashboard.meraki.com/api_docs#switch-ports
You can check the status for those same ports by looking at the list of clients on the switch:
https://dashboard.meraki.com/api_docs#list-the-clients-of-a-device-up-to-a-maximum-of-a-month-ago
Most likely the 404 error indicates the wrong syntax is being used, but remember with this API call you need a timespan. So your GET should have a URL like https://dashboard.meraki.com/api/v0/devices/[serial]/clients?timespan=86400
Think of it this way, instead of giving you the "this is what is on your switch right now" the Meraki Dashboard API gives you "this is everything that was on your switch in the last month or last 10 minutes."
08-20-2017 11:53 AM
Michael,
You can check the configuration of the ports by looking at the switchport configuration:
https://dashboard.meraki.com/api_docs#switch-ports
You can check the status for those same ports by looking at the list of clients on the switch:
https://dashboard.meraki.com/api_docs#list-the-clients-of-a-device-up-to-a-maximum-of-a-month-ago
Most likely the 404 error indicates the wrong syntax is being used, but remember with this API call you need a timespan. So your GET should have a URL like https://dashboard.meraki.com/api/v0/devices/[serial]/clients?timespan=86400
Think of it this way, instead of giving you the "this is what is on your switch right now" the Meraki Dashboard API gives you "this is everything that was on your switch in the last month or last 10 minutes."
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