Is it possible to get retry after time when quota has been exceeded?

Not applicable

I am having an api proxy with quota policy. And this quota policy differs based on the product key. Say if the quota limit is 500 per hour for an api product, 500 api calls have been made, the quota limit was reached and when we call the api again "api limit exceeded" error will be thrown. Is it possible to get retry after 'n' seconds in such cases?

0 3 380
3 REPLIES 3

faijahmad
Participant V

I never used it but see if this can work. Details in documentation

https://docs.apigee.com/api-services/reference/reset-quota-policy

Seconding the request.

The closest that Apigee has is the ratelimit.{policy_name}.expiry.time flow variable set by the Quota policy (see https://cloud.google.com/apigee/docs/api-platform/reference/policies/quota-policy#variables). 

Returns the UTC time (in milliseconds), which determines when the quota expires and when the new quota interval starts.

When the Quota policy's type is rollingwindow, this value is not valid because the quota interval never expires.


As noted above, unfrotunately it doesn't work with the rolling window algorithm. It would be nice if Apigee computed an appropriate Retry-After value (to be sent to the API consumer) that would work reliably for all algorithms and counter synchronization methods.

Ack. I understand the request.