I'd like to return information about the current quota to the user via headers. I'm able to return the current limit and the remaining calls until the limit is reached, but I can't seem to find anything that lets me return when the limit will be reset. Quotas have a flow variable "ratelimit.{policy_name}.expiry.time", but this just seems to return the current time.
Is there any way for me to calculate when the quota for a particular user will be reset?
Thanks!
Solved! Go to Solution.
As @Ozan Seymen mentioned rolling and flexi types are dynamic so they will not have a defined start time. However we can still have the time when the counter reset happens in the expiry time or probably the starttime stamp using which we can compute when the reset happens.
At present the expiry variable captures the time of request which is wrong .I think the docs has to clearly mention that .