Search code examples
limitazure-api-managementrate

How to configure rate limit for a specific api action based on server response?


Is there a way to configure rate limit rule on a specific API action on Azure API management. The desired solution is to return HTTP 429 (too many request) if the end user receives a certain response from the backend, after X attempts.


Solution

  • See increment-condition on rate-limit-by-key policy: https://learn.microsoft.com/en-us/azure/api-management/api-management-access-restriction-policies#LimitCallRateByKey