API-Based Quota is used to limit the number of requests to a given API in a given time period.

When the number of messages defined by the API Based Quota policy is reached, no new requests will be directed to the Backend API until the specified time is completed. Thus, the maximum number of messages in a certain period of time to be sent to the Backend API is controlled.

For example, if the total number of API requests is specified as 1.000.000/day (1.000.000 requests per day) and the number of messages exceeds 1.000.000 messages per day, the client will be returned with an error message stating that too many requests were made, along with the HTTP status code 403.

The difference between the API Based Quota policy and the API Based Throttling policy is the time period in which the limitation is applied. For a throttling policy, the timeframe can be seconds or minutes, while for a quota policy the timeframe can be hours, days, or months.


The picture below shows the policy settings:


The policy fields are shown in the table below.

Field

Description

Description

An optional description of the policy that may be useful for usage and management activities.
Apply by

A variable can be selected for this policy to work over a certain variable. 

It is optional.

Quota Count

It is the maximum number of messages that can be sent to the Backend API within the time given by the Quota Interval.

Quota Interval

Indicates how long the limitation of messages that can be sent to the backend API should be applied. Its value can be "One Hour" or "One Day or "One Month".

Daily quota information is kept in the cache and quota information is reset to UTC timezone.

If you want the starting time of the daily changing quota to be reset according to your local timezone, you can add the CACHE_QUOTA_TIMEZONE value to the additional variables of the cache server in the server settings on the administration page.

You can visit the Policies page for the details of the Conditions and Error Message Customization panels.