Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Is it possible to set quota limit on key level?

Is it possible to set quota limit on key level?

Example: I want to have 3 users of my API,

I would like to give user A right to make 1000 calls / day

I would like to give user B right to make 5000 calls / day

I would like to give user C right to make 10000 calls / day

Later on another API user may be added with other customer limit. In the future I can have hundreds of users with custom quota limits.

Is it possible to achieve it with apigee? (I know that is doable with other(competitive) solution)

Solved Solved
1 16 2,953
1 ACCEPTED SOLUTION

anilsr
Former Googler

Dear @mariusz.panek ,

Please find attached api proxy that demonstrates same. You can just import this and test same. Create an API product and add your API proxy to product. You need to create couple of developers with custom attribute, apps for each developer to generate keys. Make sure you select the product while creating an developer app. Provided developer custom attributes screenshots.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<VerifyAPIKey async="false" continueOnError="false" enabled="true" name="Verify-API-Key-1">
    <DisplayName>Verify API Key-1</DisplayName>
    <Properties/>
    <APIKey ref="request.queryparam.apikey"/>
</VerifyAPIKey>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Quota async="false" continueOnError="false" enabled="true" name="Quota-1">
    <DisplayName>Dynamic Quota</DisplayName>
    <Properties/>
    <Allow count="1000" countRef="verifyapikey.Verify-API-Key-1.developer.allowed_quota"/>
    <Interval ref="request.header.quota_count">1</Interval>
    <TimeUnit ref="request.header.quota_timeout">day</TimeUnit>
    <Identifier ref="client_id"/>
</Quota>

1168-screen-shot-2015-09-15-at-73219-pm.png

1169-screen-shot-2015-09-15-at-73253-pm.png

1170-screen-shot-2015-09-15-at-73427-pm.png

1171-screen-shot-2015-09-15-at-73437-pm.png

Cheers,

Anil Sagar

View solution in original post

16 REPLIES 16