Get on which MX port a client is connected

Guillaume6hat
Here to help

Get on which MX port a client is connected

Hello,

 

I need to know on which MX port is a client connected, with APIs. This would be really helpful to automate a migration.

 

I can get this information on the dashboard :

 

2026-02-25 17_06_03-.png

 

I can see directly on which MX port a wired device is connected.

But I cannot find any API call to get this information, I only get switchport, but it's empty.

 

Is there any way to get it ?

 

Regards,

3 Replies 3
alemabrahao
Kind of a big deal
Kind of a big deal

Unfortunately, there is no API call that will tell you on which MX port a wired client is connected.

 

My suggestion is to place a small switch in front of the MX during the migration.
That way, you can get switch port information through this API: https://developer.cisco.com/meraki/api-v1/get-device-switch-ports-statuses/

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
RaphaelL
Kind of a big deal
Kind of a big deal

You can't but there is a way to determine it if your clients are LLDP/CDP enabled.

 

getDeviceLldpCdp and join the info with getNetworkClients. That's the best you can do at the moment.

Guillaume6hat
Here to help

Thank you for your replies.

 

Unfortunately, it's not possible to use a switch, there are 50 sites to migrate, and we want to do everything remotely.

 

Yes, I tried CDP/LLDP, but it's not enabled for all devices, and we do not get relevant information.

 

It would be so helpful to get this data with API, as it's already available on the Dashboard. 

I'll then try to get data manually before, by creating an inventory from the dadhboard. 

 

Automation, but with manual steps 😅

Get notified when there are additional replies to this discussion.