Forum Discussion
Azure GIT API limits
Hi,
We are implementing a application which will use Azure GIT APIs. we would like to know what are the limitations that we need to consider such as API rate limits.
As per the documentation, there are multiple headers to communicate these limits and current numbers. However, none of these headers were received during the testing
Do we need to enable these headers in some configurations?
Also we found out from the documentation that
- API will throw 429 response code when the limit is exhausted.
- The global limit is 200 req per 5 min
2 Replies
- balasubramanimIron Contributor
When using Azure DevOps Git APIs, here are key points on rate limits.
Global Limit - 200 requests per 5 minutes.
Headers - Rate limit headers (Retry-After, X-RateLimit-Remaining, etc.) show your remaining requests. These may only appear when you near the limit.
429 Response - Exceeding the limit returns a 429 (Too Many Requests). Use the Retry-After header to know when to retry.Note:
Use exponential backoff for retries after a 429.
Batch requests to reduce API calls.This approach helps stay within limits and prevents service disruptions.
Please consider on below:
Yes the Azure DevOps API has a global rate limit of 200 requests per 5 minutes, and it will return a 429 response code when this limit is exceeded. The headers that communicate these limits, such as X-RateLimit-Remaining and X-RateLimit-Limit, should be included in the responses to help you manage your request rate.
If you’re not seeing these headers during testing, it might be due to the default configuration of Azure API Management, which doesn’t expose rate limit information on response headers by default. To enable these headers, you need to extend the rate-limit policy with the remaining-calls-header-name and total-calls-header-name properties.