Hi, is there a way to get all the WAN/LAN ports status (i.e connected | disconnected) using the API for the Meraki MX devices? I may have missed it but I cant find it on the docs or the SDK, I can get port info using the API for api/v1/networks/{networkID}/appliance/ports/ but it doesn't tell if the port is up or down. Thanks in advance!.
It is a bit of a roundabout way, but try...
/devices/{serial}/lldpCdp
https://developer.cisco.com/meraki/api-v1/#!get-device-lldp-cdp
...it may give you what you are after.
I just checked against an MX in our lab, it correctly returned all the WAN/LAN ports that are connected.
Thanks for the feedback @sungod, unfortunately I'm not getting the same results. I do see some of the active ports but not all.
You will want this for MX WAN uplinks: https://developer.cisco.com/meraki/api-v1/#!get-organization-uplinks-statuses
You can't. The only way would be using the cdp/lldp endpoint as stated by sungod but this endpoint won't solve 100% of your cases.
The way I do it is with /organizations/[org]/uplinks/statuses
You'll have to parse the results for every device/uplink. But it works well