Hi,
I'm building an app that is sending many requests to the API but we're hitting rate limits earlier than expected. I'm aware of the rate limits specified in the documentation.
For example, one of the requests being sent often is
GET /api/v2/routing/skills
and I'm expecting the rate limit for this to be 300 per minute, as defined by client.credentials.token.rate.per.minute, but I'm seeing requests being blocked (429) after only 100 requests.
The response message for these are as follows:
{"message":"Rate limit exceeded the maximum. Retry the request in [46] seconds","code":"too.many.requests.retry.after","status":429,"contextId":"<>","details":[],"errors":[]}
Notice that there is no "limits" object in this response. Continuing to send this request eventually starts returning the expected rate limit error message, after 300 requests:
{"message":"Rate limit exceeded the maximum. Retry the request in [42] seconds","code":"too.many.requests.retry.after","status":429,"contextId":"<>","details":[],"errors":[],"limit":{"key":"client.credentials.token.rate.per.minute","namespace":"platform.api","value":300}}
I'm unsure where this 100 limit is defined as it seems to be undocumented. I'm getting the same behaviour on retrieving routing queues so unsure if this is just the routing resource. This is not happening to my POST /api/v2/users/search requests, those requests go through up until the expected 180 rate limit for user resources:
{"message":"Rate limit exceeded the maximum. Retry the request in [43] seconds","code":"too.many.requests.retry.after","status":429,"contextId":<>","details":[],"errors":[],"limit":{"key":"user.rate.per.minute","namespace":"directory","value":180}}
Without the limits object in the response, I'm not sure how to investigate what's causing this to block early
UPDATE: Looks like this is only happening when I put a name filter in the query params, like
/api/v2/routing/skills?name=Training
Otherwise it continues until the expected 300 limit. If I add the query param, it falls over with the 429 error after 100 requests with no details or limit object