diff --git a/content/rest/guides/best-practices-for-integrators.md b/content/rest/guides/best-practices-for-integrators.md index d52052c654cf..8affceedbb4a 100644 --- a/content/rest/guides/best-practices-for-integrators.md +++ b/content/rest/guides/best-practices-for-integrators.md @@ -137,11 +137,11 @@ In this example the `closed` action is checked first before calling the `process The {% data variables.product.company_short %} API rate limit ensures that the API is fast and available for everyone. -If you hit a rate limit, it's expected that you stop making requests until after the time specified by the `x-ratelimit-reset` header. Failure to do so may result in the banning of your app. For more information, see "[AUTOTITLE](/rest/overview/resources-in-the-rest-api#rate-limiting)." +If you hit a rate limit, you should stop making requests until after the time specified by the `x-ratelimit-reset` header. Failure to do so may result in the banning of your integration. For more information, see "[AUTOTITLE](/rest/overview/resources-in-the-rest-api#rate-limiting)." -## Dealing with secondary rate limits +### Dealing with secondary rate limits -{% data variables.product.company_short %} may use secondary rate limits to ensure API availability. For more information, see "[AUTOTITLE](/rest/overview/resources-in-the-rest-api#secondary-rate-limits)." +{% data variables.product.company_short %} may also use secondary rate limits to ensure API availability. For more information, see "[AUTOTITLE](/rest/overview/resources-in-the-rest-api#secondary-rate-limits)." To avoid hitting this limit, you should ensure your application follows the guidelines below. @@ -156,7 +156,8 @@ To avoid hitting this limit, you should ensure your application follows the guid `Retry-After` header will always be an integer, representing the number of seconds you should wait before making requests again. For example, `Retry-After: 30` means you should wait 30 seconds before sending more requests. - * Otherwise, retry your request after the time specified by the `x-ratelimit-reset` header. The `x-ratelimit-reset` header will always be an integer representing the time at which the current rate limit window resets in [UTC epoch seconds](https://en.wikipedia.org/wiki/Unix_time). + * If the `x-ratelimit-remaining` header is `0`, retry your request after the time specified by the `x-ratelimit-reset` header. The `x-ratelimit-reset` header will always be an integer representing the time at which the current rate limit window resets in [UTC epoch seconds](https://en.wikipedia.org/wiki/Unix_time). + * Otherwise, wait for an exponentially increasing amount of time between retries, and throw an error after a specific number of retries. {% data variables.product.company_short %} reserves the right to change these guidelines as needed to ensure availability. diff --git a/content/rest/overview/resources-in-the-rest-api.md b/content/rest/overview/resources-in-the-rest-api.md index fc3b441241bb..78cf0eae3ee2 100644 --- a/content/rest/overview/resources-in-the-rest-api.md +++ b/content/rest/overview/resources-in-the-rest-api.md @@ -439,7 +439,7 @@ If your application triggers an additional rate limit, you'll receive an informa > } ``` -You should wait and try your request again after a few minutes. If the `retry-after` response header is present, you should not retry your request until after that many seconds has elapsed. Otherwise, you should not retry your request until the time, in UTC epoch seconds, specified by the `x-ratelimit-reset` header. +You should wait and try your request at a later time. If the `retry-after` response header is present, you should not retry your request until after that many seconds has elapsed. If the `x-ratelimit-remaining` header is `0`, you should not retry your request until after the time, in UTC epoch seconds, specified by the `x-ratelimit-reset` header. Otherwise, wait for an exponentially increasing amount of time between retries, and throw an error after a specific number of retries. {% ifversion fpt or ghec %}