HTTP API Examples HTTP Response Header Rate Limit

One of the optional HTTP status codes ( RFC6585 )

Where can I find examples of HTTP headers HTTP / REST HTTP headers that may be useful with this HTTP response status?

+60
rest api rate-limiting
Apr 15 '13 at 18:49
source share
2 answers

Here are some examples of HTTP HTTP headers that limit the HTTP response. Taken from four common REST APIs: Github, Vimeo, Twitter, and Imgur:

Github speed limit http://developer.github.com/v3/#rate-limiting

#=============================#=============================================# # HTTP Header # Description # #=============================#=============================================# | X-RateLimit-Limit | Request limit per hour | +-----------------------------+---------------------------------------------+ | X-RateLimit-Remaining | The number of requests left for the time | | | window | +-----------------------------+---------------------------------------------+ 

Vimeo Speed ​​Limit http://developer.vimeo.com/guidelines/rate-limiting

 #=============================#=============================================# # HTTP Header # Description # #=============================#=============================================# | X-RateLimit-Limit | Request limit per day / per 5 minutes | +-----------------------------+---------------------------------------------+ | X-RateLimit-Remaining | The number of requests left for the time | | | window | +-----------------------------+---------------------------------------------+ | X-RateLimit-Reset | The remaining window before the rate limit | | | resets in UTC epoch seconds | +-----------------------------+---------------------------------------------+ 

REST data rate limit for Twitter https://dev.twitter.com/docs/rate-limiting/1.1

Note. Twitter uses headers with similar names, such as Vimeo, but has a different dash in each name.

 #=============================#=============================================# # HTTP Header # Description # #=============================#=============================================# | X-Rate-Limit-Limit | The rate limit ceiling for that given | | | request | +-----------------------------+---------------------------------------------+ | X-Rate-Limit-Remaining | The number of requests left for the | | | 15 minute window | +-----------------------------+---------------------------------------------+ | X-Rate-Limit-Reset | The remaining window before the rate limit | | | resets in UTC epoch seconds | +-----------------------------+---------------------------------------------+ 

Imgur API Speed ​​Limits http://api.imgur.com/

 #=============================#=============================================# # HTTP Header # Description # #=============================#=============================================# | X-RateLimit-UserLimit | Total credits that can be allocated | +-----------------------------+---------------------------------------------+ | X-RateLimit-UserRemaining | Total credits available | +-----------------------------+---------------------------------------------+ | X-RateLimit-UserReset | Timestamp (unix epoch) for when the credits | | | will be reset | +-----------------------------+---------------------------------------------+ | X-RateLimit-ClientLimit | Total credits that can be allocated for the | | | application in a day | +-----------------------------+---------------------------------------------+ | X-RateLimit-ClientRemaining | Total credits remaining for the application | | | in a day | +-----------------------------+---------------------------------------------+ 
+102
Apr 15 '13 at 18:49
source

In addition to specific API headers, don't forget about the modest standard Retry-After header.

+18
May 24 '13 at 14:22
source



All Articles