How to analyze reset quota policy? I am not able to see its output/result. Can anyone please explain with example any of its implementation along with XML/Flow understanding.

Not applicable
 
Solved Solved
0 4 706
1 ACCEPTED SOLUTION

Not applicable

Hello Jatin,

The problem appears to be that your quota interval from your api product is not being resolved. Can you check the configuration of your API Product and Application that is being used to make sure that everything matches in that regard?

Are you using API Products and Applications in your API design? Here are some links for that:

http://apigee.com/docs/developer-services/content/what-api-product

http://apigee.com/docs/developer-services/content/creating-api-products

http://apigee.com/docs/developer-services/content/creating-apps-surface-your-api

Let me know if any of those are helpful to you. I think the problem has something to do with either your API product or Application settings or possibly a problem with the API Key that you are using.

View solution in original post

4 REPLIES 4

Not applicable

The error detail is : "errorcode":"policies.resetquota.InvalidRLPolicy"}}}

It looks as invalid rate limit policy error. Please assist to rectify this error.

Not applicable

Hello Jatin,

We have seen a similar situation to yours. Please let us know if the following helps. There is a doc link and some example xml to review as well:

Resetting a Quota can only be done via a runtime call using a Reset Quota Policy. So you'd have to build this out and deploy a proxy for it. http://apigee.com/docs/api-services/reference/reset-quota-policy I'm going to oversimplify this to make it easier to explain. Let's say you have the following Quota policy. <Quota async="false" continueOnError="false" enabled="true" name="Quota-Daily" type="calendar"> <DisplayName>Quota-Daily</DisplayName> <FaultRules/> <Properties/> <Distributed>false</Distributed> <Synchronous>true</Synchronous> <StartTime>2014-12-19 12:00:00</StartTime> <Identifier ref="request.queryparam.apikey" /> <Interval ref="verifyapikey.Verify-API-Key.apiproduct.developer.quota.interval" /> <TimeUnit ref="verifyapikey.Verify-API-Key.apiproduct.developer.quota.timeunit" /> <Allow countRef="verifyapikey.Verify-API-Key.apiproduct.developer.quota.limit" /> </Quota> This policy is pulling in the Quota values from the API Product, and is currently set with a 10 requests per day quota. Assuming the client_id has reached the daily limit, you could reset this back to 10 requests per day by running an API call that hits the following Reset Quota policy. <ResetQuota async="false" continueOnError="false" enabled="true" name="Reset-Daily-Quota"> <DisplayName>Reset Daily Quota</DisplayName> <FaultRules/> <Properties/> <Quota name="Quota-Daily"> <Identifier name="identifierName" ref="request.queryparam.apikey"> <Allow>10</Allow> </Identifier> </Quota> </ResetQuota> I have hardcoded values here, but the Quota name and Allow values can be variable references as well to make it more dynamic.

Not applicable

Hi Michael,

Thank you for your guidance. I am novice to Apigee so I might have basic queries.

I have implemented your above code for Quota, Reset Quota policies in my flow but got below error:

{"fault":{"faultstring":"Failed to resolve quota interval reference verifyapikey.Verify-API-Key.apiproduct.developer.quota.interval in quota policy {1}","detail":{"errorcode":"policies.ratelimit.FailedToResolveQuotaIntervalReference"}}}

Can you suggest please how can we rectify this.

Regards,

Jatin Lal

Not applicable

Hello Jatin,

The problem appears to be that your quota interval from your api product is not being resolved. Can you check the configuration of your API Product and Application that is being used to make sure that everything matches in that regard?

Are you using API Products and Applications in your API design? Here are some links for that:

http://apigee.com/docs/developer-services/content/what-api-product

http://apigee.com/docs/developer-services/content/creating-api-products

http://apigee.com/docs/developer-services/content/creating-apps-surface-your-api

Let me know if any of those are helpful to you. I think the problem has something to do with either your API product or Application settings or possibly a problem with the API Key that you are using.