[QUESTION] Route to view rate limit information (without using rate limit points)?
Hello,
I was wondering if there is a route where users can view their rate limits.
I understand that it is shown on every response in the headers ( x-ratelimit-limit: 720, x-ratelimit-remaining: 710), but I was wondering if there was a simpler route that only returns the above information (perhaps as JSON or similar).
Also, if there was such a route, would it be possible to separate that route so it doesn't use the same points of the "Default" Consumer rate?
Thanks, Alvie
Hi, thanks for the idea, so i think the problem is that the x-ratelimit-limit header depends always on the route which you call i.e. if you call the route /foo it has maybe other limits then the /bar route depending on the configured rates. Could you mabye explain your use case for this so maybe there is also another solution.
Hi, thanks for the response. I didn't realize that the header depends on the route called. Sorry for my misunderstanding.
Essentially, I would like to be able to present a user with a progress bar on their usage of the rate limits via a dashboard, something like this:

Though I understand now that it may be different per route. Perhaps there could be a way to return the limits for each set of routes e.g.
{
"Default": {
"limit": 720,
"remaining": 462
},
"route1": {
"limit": 100,
"remaining": 73
},
"route2": {
"limit": 100,
"remaining": 42
}
}