Conditional Quota Count

Hello Team,

It displays 429 error for both public and partner on every call made,please suggest.

Thank you

Solved Solved
0 4 200
1 ACCEPTED SOLUTION

sidd-harth
Participant V
@pratheek hipparagi, I think you are missing the class parameter within Allow block, your policy should be something like this,
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Quota async="false" continueOnError="false" enabled="true" name="Quota-1">
    <DisplayName>Quota-1</DisplayName>
    <Properties/>
    <Interval>1</Interval>
    <Distributed>true</Distributed>
    <Synchronous>true</Synchronous>
    <TimeUnit>minute</TimeUnit>
    <Allow>
        <Class ref="request.queryparam.appteam">
            <Allow class="partner" count="4"/>
            <Allow class="public" count="2"/>
        </Class>
    </Allow>
</Quota>
<br>

So your API call should also have an appteam queryparam.

https://org-env.apigee.net/basepath?appteam=public
https://org-env.apigee.net/basepath?appteam=partner

View solution in original post

4 REPLIES 4

sidd-harth
Participant V

Hi @pratheek hipparagi, please add some more information on your query and we will help.

  • What is the error you are facing?
  • What are you trying to resolve?
  • Any sample code snippets?

XML sample code

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

This is Conditional Quota Count

For Quota based Calls It should allow the call and status should be 200,but call fails and status shows 429.

sidd-harth
Participant V
@pratheek hipparagi, I think you are missing the class parameter within Allow block, your policy should be something like this,
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Quota async="false" continueOnError="false" enabled="true" name="Quota-1">
    <DisplayName>Quota-1</DisplayName>
    <Properties/>
    <Interval>1</Interval>
    <Distributed>true</Distributed>
    <Synchronous>true</Synchronous>
    <TimeUnit>minute</TimeUnit>
    <Allow>
        <Class ref="request.queryparam.appteam">
            <Allow class="partner" count="4"/>
            <Allow class="public" count="2"/>
        </Class>
    </Allow>
</Quota>
<br>

So your API call should also have an appteam queryparam.

https://org-env.apigee.net/basepath?appteam=public
https://org-env.apigee.net/basepath?appteam=partner

Thank you the issue got resolved..,But I did a small mistake in appteam queryparam.