getNetworkClientsUsageHistories not working for multiple clients

SOLVED
jadamczyk
Just browsing

getNetworkClientsUsageHistories not working for multiple clients

I have a single network, and I want to get client usage history for each client in that network. I first get all clients, and then usage history with endpoint getNetworkClientsUsageHistories.


It works for single clients in both plain request (Postman) and Python SDK for Meraki Dashboard. However, it does not work for multiple clients and I get:

{
  "errors": [
    "Invalid client key"
  ]
}
 
I tried `clientId1,clientId2` (e.g. `k000056,k00d6bd`), and `mac1,mac2`, both do not work and give the same result. Client keys work separately (both client ID and MAC), so this error makes no sense for me.
 
What am I doing wrong?
1 ACCEPTED SOLUTION
RaphaelL
Head in the Cloud

Just tried it and it worked like a charm. 

 

https://nxxx.meraki.com/api/v1/networks/{netID}/clients/usageHistories?clients=kxxxxx,kxxxxx

 

Output contained the 2 requested clients.

View solution in original post

2 REPLIES 2
RaphaelL
Head in the Cloud

Just tried it and it worked like a charm. 

 

https://nxxx.meraki.com/api/v1/networks/{netID}/clients/usageHistories?clients=kxxxxx,kxxxxx

 

Output contained the 2 requested clients.

Thank you, I was using wrong URL in Postman!

 

However, I still get errors when using over 1000 client IDs in Python SDK, and 502 error in some cases. Those are for other questions, though.

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.