API Query Limit

Solved
DrunkBiscuit
Just browsing

API Query Limit

I have read that there is a rate limit of 10 QPS for each organization, and 100 QPS limit for each IP when using Meraki's API:
https://developer.cisco.com/meraki/api-v1/rate-limit/

Just wanted to clarify a few things:

I am trying to query a device's port status using this route:  /devices/{serial}/switch/ports/statues

Assuming I have 50 devices within the organization, does this mean it takes me 5 seconds to query the port statuses of every device within the organisation?

Next, if I have 2 organisations, each with 50 devices, does that mean that it will still take me 5 seconds to query the port statuses of every device (assume that I query with concurrency)?

Wanted to clarify this as it is unclear to me what a query limit for each organization constitutes

1 Accepted Solution
sungod
Kind of a big deal

On your timing questions, the answer to both is 'sort of'...

 

Queries/responses take a finite time, some queries may return multiple pages of data, each page counting as a query.

 

There's also the extra ten-query 'burst' allowed in the 'first second', in that situation you get sixty queries in five seconds. I don't recall seeing how the first second is determined, perhaps some period without a query resets the timing.

 

Personally, I don't worry about the rate limit, just follow the retry protocol for handling 429 status, one easy way to do this is to use the Meraki Python library.

View solution in original post

2 Replies 2
sungod
Kind of a big deal

On your timing questions, the answer to both is 'sort of'...

 

Queries/responses take a finite time, some queries may return multiple pages of data, each page counting as a query.

 

There's also the extra ten-query 'burst' allowed in the 'first second', in that situation you get sixty queries in five seconds. I don't recall seeing how the first second is determined, perhaps some period without a query resets the timing.

 

Personally, I don't worry about the rate limit, just follow the retry protocol for handling 429 status, one easy way to do this is to use the Meraki Python library.

RaphaelL
Kind of a big deal
Kind of a big deal

what sungod said + avoid every "devices" calls. Most of the time there is a org-wide call to fetch statuses.

 

Eg: Avoid /devices/{serial}/switch/ports/statuses and use /organizations/{organizationId}/switch/ports/statuses/bySwitch

Get notified when there are additional replies to this discussion.