How to Access Quota values in Quota Policy which configured in Product's Quota Section ?

Not applicable

How to Access Quota values in Quota Policy which configured in Product's Quota Section ? I would like to access Quota values from Product configuration instead of directly Hardcode values in Quota Policy itself. Could you please Advice ?

Solved Solved
0 8 518
2 ACCEPTED SOLUTIONS

adas
Participant V

You need to use apikey, access entity or access token policy else there's no way to find out the associated product for an api call. VerifyApikey policy would be the simplest and most efficient.

View solution in original post

Not applicable

@Kumaresan Sithambaram,

To add to the answer of @Anil Sagar, once the Verify API Key policy is executed successfully, the Quota details would be available at the following context variables:

verifyapikey.{Name of Verify API Key Policy}.apiproduct.developer.quota.limit

verifyapikey.{Name of Verify API Key Policy}.apiproduct.developer.quota.interval

verifyapikey.{Name of Verify API Key Policy}.apiproduct.developer.quota.timeunit

Then you can use them in the conext directly or by placing a Java script or Assign Variable (if required).

Alternatively in case you are not using verify api key for any reason, you could also try Apigee Policy Access Entity, as specified here. Once the policy is executed, the similar parameters related to quota would be available in the context.

View solution in original post

8 REPLIES 8

Not applicable

Additionally, I read this post here. But, I did not understand given examples.

https://community.apigee.com/questions/1488/how-do-the-quota-settings-on-an-api-product-intera.html

@Kumaresan Sithambaram

You need to place the verify key policy just before quota to fetch variables from product configuration. It's exactly what explained here. Have you tried anything ? Do you see any issues ?

Not applicable

I didn't try yet using verify policy. I think my question is, can't I extract quota values without verify key policy? Is there any other options?

I believe you can use Access Entity Policy too to retrieve product attributes.

adas
Participant V

You need to use apikey, access entity or access token policy else there's no way to find out the associated product for an api call. VerifyApikey policy would be the simplest and most efficient.

Not applicable

@Kumaresan Sithambaram,

To add to the answer of @Anil Sagar, once the Verify API Key policy is executed successfully, the Quota details would be available at the following context variables:

verifyapikey.{Name of Verify API Key Policy}.apiproduct.developer.quota.limit

verifyapikey.{Name of Verify API Key Policy}.apiproduct.developer.quota.interval

verifyapikey.{Name of Verify API Key Policy}.apiproduct.developer.quota.timeunit

Then you can use them in the conext directly or by placing a Java script or Assign Variable (if required).

Alternatively in case you are not using verify api key for any reason, you could also try Apigee Policy Access Entity, as specified here. Once the policy is executed, the similar parameters related to quota would be available in the context.

Thats Works !! Thanks Apigeeks.

Instead of verifyApiKey, can this be achieved using OauthV2??