Get Network Clients vlan query broken

elilongwell
Conversationalist

Get Network Clients vlan query broken

Hey y'all, I've been having some trouble with getting the vlan query to work on the Get Network Clients endpoint (/networks/{networkId}/clients). I'm able to make the calls and retrieve the payloads with any other querys with no issue, but the vlan query just doesn't work at all. I've tried just about everything, but nothing.

 

My best guess is that it's either expecting a string, while the actual data is an integer, or the opposite is happening. Specifically, the reason that seems plausible to me is that when setting the vlan parameter in the online console, it shows as an integer in the Curl template tab, while the documentation clearly states that it should be a string. I'd think adding quotes to it would fix it, but no dice there.

 

elilongwell_0-1644870988985.png

 

Furthermore, the v0 api documentation for the same option actually does show the vlan field as an integer in the response payload instead of a string like the v1 endpoint returns:

 

v1

elilongwell_1-1644871182013.png

 

v0

elilongwell_2-1644871194697.png

 

I'm tempted to think there might just be something wrong in the documentation since I've found some other things that weren't very clear so far that have lead me to distrust the documentation a bit. It took me quite a while to figure out that the 'statuses' and 'recentDeviceConnections' query's don't work without adding brackets ('statuses[]' and 'recentDeviceConnections[]') despite no note of it in the doc and the console in the documentation putting them in in a broken state without them by default (implying that that is the correct way to use them).

Does anyone know whether I'm just missing something or if this actually is just broken?

8 Replies 8
RaphaelL
Kind of a big deal
Kind of a big deal

The documentation states that vlan is a string , but when looking at the Template Python request it is shown as a Integer. Weird...

 

When testing with a simple GET query : https://n378.meraki.com/api/v1/networks/L_XXXXXXXXXXXXX/clients?vlan=VALUE

 

I tried vlan=X , vlan="X" vlan=SomeGarbage and none of them returns en error , but none of them returns the expected results. 

 

This is ultra broken and I would suggest you to open a ticket.

 

For the last part : 

 

It took me quite a while to figure out that the 'statuses' and 'recentDeviceConnections' query's don't work without adding brackets ('statuses[]' and 'recentDeviceConnections[]') despite no note of it in the doc and the console in the documentation putting them in in a broken state without them by default (implying that that is the correct way to use them).

 

That behavior is expected since the documentation states that these values are arrays. 

RaphaelL_1-1644889221429.png

RaphaelL_3-1644889239271.png

 

 

Thanks for confirming that it's not just me with your test. I've submitted a ticket, so I'll let y'all know when I get an update.

 

On the second part, the main thing that I was referring to was that the console automatically fills in both of those fields incorrectly, which causes confusion. I think it's fair to assume that the built in testing tool is showing the query correctly. Maybe I'm naive, but to me it led me to believe I was using it correctly until I found forum threads with other's who ran into the same confusion. At the very least, if it's a common enough issue to find multiple threads with people who are similarly confused, it might be worth it for them to make more clear in the documentation.

elilongwell_0-1645117501584.png

 

I have also found that If you delete a parameter , the content of the parameter is transfered to the next parameter ... 

 

RaphaelL_0-1645117830165.png

Look what happened to ip6 when I deleted an upper parameter : 

 

RaphaelL_1-1645117870338.png

 

 

This is a weird behavior. I'm on Chrome 98 btw

Yes, also noticed that. Seems to happen with any browser.

Ryan_Miles
Meraki Employee
Meraki Employee

I too can’t get it working. If you haven’t already please open a Support case so they can either A) tell us what we’re doing wrong or B) get engineering to fix it.

RaphaelL
Kind of a big deal
Kind of a big deal

It should now be fixed ! 

 

RaphaelL_0-1646409165918.png

 

Working for me in postman too

NetworkLarry
Getting noticed

The API team made an undocumented change and introduced a bug in November 2021 the week of Thanksgiving that changed the vlan return data type from integer to string.  I confirmed it via the live documentation tool so I knew it wasn't the Python module that was doing it.  When I caught it in my weekly report data the following week, I opened a support case with all the documentation on it I could put together on what had happened to point them to the source of the issue.  I believe it was in February when I was officially informed by support they weren't going to fix it.  Instead of fixing the bug, they just changed the documentation to match the mistake. 

 

When dealing with vlans, the vlan number is an integer, but when dealing clients the vlan is now a string. Does that make any sense?  I had to rewrite portions of my weekly report program to deal with the mixed data types so it would work until they corrected it and so it would continue to work when they corrected it, which they chose not to do.  I had to add the extra code because they can break things overnight, but it takes them at least two weeks and usually more to correct mistakes.  

 

They tried to pull that on vlans with the Python APIv1 module when it was in beta and I called it out.  If you return me a value as an integer, you better accept it back as an integer.  That issue was corrected in the module in the next  beta release.  

 

Data types should be kept consistent across the board plain and simple.  Mixing data types only adds frustration and unnecessary code to address it. 

Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.