API: WAN enums are a mess! ...and proposed solution

david_n_m_bond
Building a reputation

API: WAN enums are a mess! ...and proposed solution

For the endpoints:

 

...the response's uplink enum can be:

  • wan1
  • wan2
  • wan3
  • cellular

 

However, elsewhere in the API, for example:

 

...the three possible MX WAN interface ids are:

  • wan0
  • wan1
  • wan2

..and Cellular Gateways can have the value:

  • cellular

 

This is all HORRIBLY confusing!

 

For consistency with switch port numbering, documentation etc. I suggest that "wan1", "wan2" and "wan3" SHOULD HAVE been used consistently thoroughout.

 

So what should Meraki do to fix this?

 

Well, we developers have already had to put in workarounds and we should all REALLY want to avoid breaking changes.

I suggest that everywhere that "wan0" can be returned, the Meraki API should ALSO return a new field: "portId" (or similar) and populate it accordingly.

 

Thoughts?

Author, https://www.nuget.org/packages/Meraki.Api/
1 Reply 1
cmr
Kind of a big deal
Kind of a big deal

0,1 and 2 are the SNMP interface IDs, the LAN ports on an MX75 also started at 0 last time I looked, so 4 is 0, 5 is 1 etc.

 

This why the MX LAN interface page was pulled after less than a week, due to the interface numbering not being consistent.  That was a few years ago and it still hasn't come back, so I think the change may be more involved than we think.

 

I'd love it to be fixed and the LAN interface page to return 🤞🙏

If my answer solves your problem please click Accept as Solution so others can benefit from it.
Get notified when there are additional replies to this discussion.