To control how many times apps can access your API within a certain timeframe, Apigee lets you implement quota management using a Quota policy and OAuth 2.0. Here's how it works:
Define API Request Limits: Use the Quota policy to set a maximum number of requests allowed for a specific API proxy within a given time period (e.g., per minute, hour, or day).
Customize Quotas with Identifiers: Tailor limits for different apps or users by creating unique counters using flow variables and the <Identifier> element within the Quota policy. This enables you to set different quotas based on criteria like client IDs.
Integrate with OAuth 2.0:
Extract the client ID from validated OAuth 2.0 tokens using a JavaScript or Extract Variables policy.
Pass this client ID to the Quota policy using a flow variable to link quotas to specific OAuth 2.0 clients.
Reference Default Settings: Streamline configuration by using the <UseQuotaConfigInAPIProduct> element to leverage default quota settings defined in the API product itself.
Implement Dynamic Quotas: Create flexible quota systems based on user segments or other criteria using class-based quotas.
Remember:
Apigee Edge tracks quota usage separately for each environment (test, prod, etc.).
Thoroughly test quota policies to ensure they function as intended. Consider using
Spike Arrest policies to protect against sudden traffic surges.
To control how many times apps can access your API within a certain timeframe, Apigee lets you implement quota management using a Quota policy and OAuth 2.0. Here's how it works:
Define API Request Limits: Use the Quota policy to set a maximum number of requests allowed for a specific API proxy within a given time period (e.g., per minute, hour, or day).
Customize Quotas with Identifiers: Tailor limits for different apps or users by creating unique counters using flow variables and the <Identifier> element within the Quota policy. This enables you to set different quotas based on criteria like client IDs.
Integrate with OAuth 2.0:
Extract the client ID from validated OAuth 2.0 tokens using a JavaScript or Extract Variables policy.
Pass this client ID to the Quota policy using a flow variable to link quotas to specific OAuth 2.0 clients.
Reference Default Settings: Streamline configuration by using the <UseQuotaConfigInAPIProduct> element to leverage default quota settings defined in the API product itself.
Implement Dynamic Quotas: Create flexible quota systems based on user segments or other criteria using class-based quotas.
Remember:
Apigee Edge tracks quota usage separately for each environment (test, prod, etc.).
Thoroughly test quota policies to ensure they function as intended. Consider using
Spike Arrest policies to protect against sudden traffic surges.