Quota at Product level without api-key

anujshiva
Participant II

How do the quota settings on an API product interact with quota policies in an API proxy without api-key policy used?

0 7 273
7 REPLIES 7

sidd-harth
Participant V

If not APikey, you can use OAuth policy to fetch the quota details from the Product.

Provid emore details on what you are trying to do?

How do i fetch the quota details from product using OAuth policy?

In your proxy add Verify OAuth Policy and after verifying a valid token, the quota attributes from product are displayed in Trace as variable...you can use those in the Quota policy.

Check these posts,

https://community.apigee.com/questions/65565/enforcing-quotas-with-oauth2.html

Do i need to write Inside quota policy:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Quota async="false" continueOnError="false" enabled="true" name="Quota-App" type="flexi">
<Interval ref="oauthv2.verify-oauth-v2-access-token.apiproduct.quota.interval"/>

<TimeUnit ref="oauthv2.verify-oauth-v2-access-token.apiproduct.quota.limit"/>

<Allow countRef="oauthv2.verify-oauth-v2-access-token.apiproduct.quota.timeunit"/>

</Quota>

And specify the value inside the product under custom attributes?

Kindly help.

No, if you are using Oauth it should be,

apiproduct.*

Check this link which has refernece images,

Do you mean this?

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Quota async="false" continueOnError="false" enabled="true" name="Quota-App" type="flexi">
<Interval ref="apiproduct.quota.interval"/>

<TimeUnit ref="apiproduct.quota.limit"/>

<Allow countRef="apiproduct.quota.timeunit"/>

</Quota>

Did you get it working?