API - Switch Port Status

SOLVED
RaphaelL
Kind of a big deal
Kind of a big deal

API - Switch Port Status

Hi there , 

 

I'm looking through the docs : https://dashboard.meraki.com/api_docs#

 

But it seems like there is no way to get a switch port status via API eg :  API calls that returns switch port status -> Down ,Up , Disabled ... 

 

Is this API call hidden or just missing ?

 

Thanks

1 ACCEPTED SOLUTION

@RaphaelL would the API call to return an individual switch port not work here?  For example I just tried a quick call to return the status of a single port on one of my switches, and it does return an "enabled" parameter as a true/false value among other things.  Sorry if I misunderstood the question.  Or... perhaps you mean pulling the live status of an individual switch port, as opposed to the *configuration* status of that port, which I do not see a call for as @PhilipDAth mentioned.  But I do see a feature request for this in the system, and I just added a note and upvoted it.  No ETA on delivery, it's a valid request but not necessarily in the priority queue for development.  Work with your local Meraki SE to go into the FR and add your requirement and opportunity to help bump the visibility for this.  In the meantime there's just the alert feature if a switch port goes down or changes speed or detects a cable error.

 

View solution in original post

10 REPLIES 10
PhilipDAth
Kind of a big deal
Kind of a big deal

I can't see any API either to return the individual status of MS switch ports.

@RaphaelL would the API call to return an individual switch port not work here?  For example I just tried a quick call to return the status of a single port on one of my switches, and it does return an "enabled" parameter as a true/false value among other things.  Sorry if I misunderstood the question.  Or... perhaps you mean pulling the live status of an individual switch port, as opposed to the *configuration* status of that port, which I do not see a call for as @PhilipDAth mentioned.  But I do see a feature request for this in the system, and I just added a note and upvoted it.  No ETA on delivery, it's a valid request but not necessarily in the priority queue for development.  Work with your local Meraki SE to go into the FR and add your requirement and opportunity to help bump the visibility for this.  In the meantime there's just the alert feature if a switch port goes down or changes speed or detects a cable error.

 

I think that "enabled" fields means administrative enabled/disabled, rather than reporting the link status.

Agreed, the existing API call is returning the configuration state for individual switch ports, not the active running state, so hopefully the existing FR will address this among other things like error counts and utilization levels.

Using the Meraki Developer Hub, trying to run this command "Get Organization Switch Ports Statuses By Switch", but return only the ports that are enabled.  We are having some challenges getting the query parameters correct, to return only those interfaces where "enabled = true".

I'm certain we're missing the syntax, can you help?

I don't see any filter to specify the port status.

https://developer.cisco.com/meraki/api-v1/get-organization-switch-ports-statuses-by-switch/ 

 

I think you will need to retrieve all ports and then loop through the results looking for matches.

Hi all.. does anybody know if this has been made available as yet?

Cheers
ErikS
Conversationalist

Hi,

 

Unfortunately live switch port status is not available from the dashboard API.

 

If you really need the information though, one other way would be through SNMP polling the dashboard.

 

Kr,

Erik

 

Winning! cheers!
Get notified when there are additional replies to this discussion.