Best way to set multiple Quotas for an App and API Proxy

What is the best way to set multiple quotas for an API proxy which is consumed by multiple apps with multiple quota values? What is the best way to set multiple quota values for an app which consumes multiple APIs with multiple quota values?

Your assistance is greatly appreciated. @Siddharth Barahalikar @Anil Sagar @ Google @Dino-at-Google

0 8 491
8 REPLIES 8

It sounds like https://docs.apigee.com/api-platform/reference/policies/quota-policy#identifierelement is what you're looking for? Run the quota policy multiple time with different identifiers to keep track of multiple counters

@Christian King Thanks for the quick turnaround. Please find the below requirement.

We have 2 products p1 and p2 and apps a1 and a2. Now a1 wants to access p1 with a count of c1 and p2 with a count of c2. Similarly for a2 and other consumers. For these kind of scenarios what will be the best approach to enforce quota.

Thanks in advance

sidd-harth
Participant V

I think you should be looking at Developer Application - Custom Attributes, to define quota count for different Products.

8659-dev-app.png

Not only count, but you can also add all quota related values here for different products.

In Quota Policy you need to refer these values either using API key policy or OAuth.

8660-tarce.png

@Siddharth Barahalikar Thanks for the quick reply. We can do it but the challenge here is we have 180 consumers and they are using the same proxy with different quota values. Is it a best practice to create that many custom attributes at app or product level?

Thanks in advance.

How are you currently handling different quota value for 180 consumers?

Is there any common/default count value for certain consumers?

@Siddharth BarahalikarIt is a replatform migration from IBM APIC to Apigee. IBM APIC has subscription plans and they handled in that way.

Any leads would be appreciated.

APigee has a limit on custom attributes which is - 18 Custom attributes on developers, developer apps, API products, OAuth access tokens, and other Edge entities.

I guess you need to divide your Consumer base into multiple groups based on the number of calls allowed for each group. Then create multiple Products with different quota configs.

I read something similar, I will check and edit this answer.

Not applicable

You can add the clients according to the quota value in KVM. from the KVM you can extract the quota value for the particular consumer and enforce in your policy with the identifier as the consumer.this is independent of api proxy code.

if you want to add the logic at the policy level, you can use the class concept which allows multiple classes with multiple quota.