API / dashboard discrepancy

Solved
Messy
Here to help

API / dashboard discrepancy

Hello,

I'm having a bit of a weird issue. I am trying to get network connection stats from the API but the return data does not match what's in the dashboard, or the data I get if i use developer.cisco.com.

https://api.meraki.com/api/v1/networks/L_0000000000000000/wireless/connectionStats

From my python script;

timespan 86400

ssids 0

response - {"assoc":2550,"auth":4165,"dhcp":55,"dns":150,"success":37306}


Using exactly the same parameters on developer.com I get;
{ "assoc": 73, "auth": 483, "dhcp": 2, "dns": 2, "success": 6779 }


The dashboard matches developer.com

So what's going on with my script? I broke it down to the most basic call to avoid any kind of data handling error when doing multiple calls. 
It makes a single call, with hard coded network ID and parameters.

I am printing the return data directly with 

print(f"Response: {response.text}")



I cant figure out whats happening 😕

1 Accepted Solution
RaphaelL
Kind of a big deal
Kind of a big deal

support@meraki.com

Nov 07 2024 03:53

Hello, This API is outdated and is not planned to be fixed. There shall be new APIs available with Assurance Overview in the future. We can leave this case open until it is resolved.

 

###

There is a couple of operations related to wireless stats , and I was never able to get a 1:1 match with the dashboard so I couldn't trust either one. I ended up giving up on the possibility to report wireless stats.

View solution in original post

6 Replies 6
RaphaelL
Kind of a big deal
Kind of a big deal

Hi there ,

 

Case opened in 2022. Won't be fixed. API operation will be replaced by another "Assurance" operation in the near future.

RaphaelL
Kind of a big deal
Kind of a big deal

support@meraki.com

Nov 07 2024 03:53

Hello, This API is outdated and is not planned to be fixed. There shall be new APIs available with Assurance Overview in the future. We can leave this case open until it is resolved.

 

###

There is a couple of operations related to wireless stats , and I was never able to get a 1:1 match with the dashboard so I couldn't trust either one. I ended up giving up on the possibility to report wireless stats.

Messy
Here to help

oh wow, cheers.

I wonder why the hell they leave it in then? should remove it from the guide or at least leave a note warning that its inaccurate!

When they say a new API - do they mean the whole thing is unreliable or just specifically the wifi stats endpoints?

RaphaelL
Kind of a big deal
Kind of a big deal

In my case , those endpoints were targeted : ( getDeviceWirelessConnectionStats or getNetworkWirelessClientsConnectionStats )

 

But my feeling is that any "Wireless" stats endpoint will behave like that

PhilipDAth
Kind of a big deal
Kind of a big deal

A "Rock Star" response.  +2 to @RaphaelL .

Messy
Here to help

API_KEY = security.MERAKI_API_KEY_LIVE
BASE_URL = "https://api.meraki.com/api/v1"
HEADERS = {
"X-Cisco-Meraki-API-Key": API_KEY,
"Content-Type": "application/json"
}

def main():
url = f"{BASE_URL}/networks/L_00000000000000/wireless/connectionStats"
params = {
"ssids": 0,
"timespan": 86400
}

response = requests.get(url, headers=HEADERS, params=params)
print(url)
print(f"Response: {response.status_code}")
print(f"Response: {response.text}")


if __name__ == "__main__":
main()



Response: 200
Response: {"assoc":2562,"auth":4161,"dhcp":55,"dns":150,"success":37457}

Process finished with exit code 0




Messy_0-1737466527209.pngMessy_1-1737466538500.png

 

Get notified when there are additional replies to this discussion.