S02E04 - Apigee Edge - Quota Policy - Unique Counters- By Flow Variable:

Hello Apigeeks,

In this 4MV4D, Find out how you can set unique quota counters by leveraging runtime flow variables in Apigee Edge. In earlier 4MV4D Quota Policy videos we have seen how to set a generic quota on APIs. In the real world, You might see requirements like having a quota for Developer by Developer ID where each developer can call X number of calls in Y interval.

Apigee Edge Quota Policy allows you do that seamlessly by leveraging flow variables. Flow variables are nothing but variables that are populated dynamically from request / response / errors / policies during API runtime.

In this video we will see how to set different unique quota counters by queryParam value dynamically. You can leverage the same concept to apply quotas to different app developers or apps or based on headers or based on request data or even response data based on flow variables populated by Apigee Edge.

Find the Quota policy code used in this 4MV4D below,

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Quota async="false" continueOnError="false" enabled="true" name="Quota-1">
    <DisplayName>Quota-1</DisplayName>
    <Properties/>
    <Allow count="3"/>
    <Interval>1</Interval>
    <Distributed>true</Distributed>
    <Synchronous>true</Synchronous>
    <TimeUnit>minute</TimeUnit>
    <Identifier ref="request.queryparam.appDev"/>
</Quota>

As you can see quota is applied based on query param value appDev. Separate counters are maintained for each query param value & quota restrictions applied by unique counters for different values of query param.

4MV4D videos are completely focussed on API Developers & Help you learn many interesting concepts very quickly using hands-on approach. Don't forget to subscribe to channel here & share same with your friends / colleagues who are interested in Apigee.

Feel free to send your feedback/queries using comments below or Ask a question if you have any query. Stay tuned for more videos.

Comments
Not applicable

Hi @Anil Sagar nice write up, i need some help on the same topic, can you please check https://community.apigee.com/questions/50011/issue-in-fetching-the-resources-in-apigee-migratio.html and give your inputs on my last comment?

Version history
Last update:
‎03-07-2017 10:06 PM
Updated by: