I followed the documentation, https://cloud.google.com/apigee/docs/api-platform/reference/policies/quota-policy?hl=en#samples, and implemented a quota policy. The XML is below. I get an error that Apigee fails to resolve the reference. I have the Verify API Policy implemented as verify-api-policy
XML:
<Allow count="3" countRef="verifyapikey.verify-api-key.apiproduct.developer.quota.limit"/>
<Interval ref="verifyapikey.verify-api-key.apiproduct.developer.quota.timeInterval"/>
<TimeUnit ref="verifyapikey.verify-api-key.apiproduct.developer.quota.timeunit"/>
<Identifier ref="verifyapikey.Verify-API-Key.client_id"/> </Quota>
Error:
"faultstring": "Failed to resolve quota interval reference verifyapikey.verify-api-key.apiproduct.developer.quota.timeInterval in quota policy CheckQuota",
Solved! Go to Solution.
You need to do first the api key verification.
then
verifyapikey.<api key verification policy name>.apiproduct.developer.quota.limit
verifyapikey.<api key verification policy name>.apiproduct.developer.quota.timeunit
verifyapikey.<api key verification policy name>.apiproduct.developer.quota.interval
Also, I will suggest to have default values in your policy also.