Skip to content

Commit 06a5a6c

Browse files
committed
202 responses count toward API rate limit
If 202 responses did *not* count toward the rate limit, then a single API user could queue up jobs for every single repository. That would cause all other API users to wait longer for *their* statistics jobs to complete. That's not cool. Share the road.
1 parent 7fdd00a commit 06a5a6c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/v3/repos/statistics.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ types of repository activity.
1515
Computing repository statistics is an expensive operation, so we try to return cached
1616
data whenever possible. If the data hasn't been cached when you query a repository's
1717
statistics, you'll receive a `202` response; a background job is also fired to
18-
start compiling these statistics. Subsequent requests should return the data.
18+
start compiling these statistics. Give the job a few moments to complete, and
19+
then submit the request again. If the job has completed, that request will receive a
20+
`200` response with the statistics in the response body.
1921

2022
Repository statistics are cached by the SHA of the repository's default branch,
2123
which is usually master; pushing to the default branch resets the statistics cache.
2224

23-
**NOTE:** `202` responses do *not* count towards API rate limits.
24-
2525
## Get contributors list with additions, deletions, and commit counts
2626

2727
GET /repos/:owner/:repo/stats/contributors

0 commit comments

Comments
 (0)