Limit API Use

Policy templates that help organizations manage API usage. 
apip42
Policy templates that help organizations manage API usage. 
  • Rate Limit Policy
    Restricts the number of times that an API can be queried in a second. For example, a rate limit of 1 prevents all the applications that use that API from accessing it more than once per second. 
  • Quota By Month Policy
Restricts the number of times that an API can be queried in a month. For example, a quota limit of 1 ensures all the applications that use that API can only access it once per month. 
  • Quota By Day Policy
    Restricts the number of times that an API can be queried in a day. For example, a quota limit of 1 ensures that all the applications that use that API can only access it once per day. 
To use the new policies, 
follow these steps
:
  1. Log in to the Portal as a Publisher, or as an Organization Admin or Developer with API publishing capabilities.
  2. Choose the Services Icon and select 
    Publish
    .
  3. Add an API, or edit an existing API.
  4. On Proxy Configuration tab, select the policy from the drop-down list.
  5. Save the API.
  6. Test the API limits you specified.
Example: Restricting API Usage by Application
You can use the Rate Limit, Quota by Month, and Quota by Day policies with account plan policies to restrict API usage for a specific application. For example, you can set the API Rate Limit to 10 per second, and the Account Plan Rate Limit to 1 per second. The application using the API 
and
 the account plan can only access the API once per second. 
Example: Changing Quota and Rate Limits
The following example shows the impact of changing a quota or rate limit, based on the day of the change.
A customer sets the Quota by Day to 100 for an API. When that API is consumed 100 times, the API is no longer accessible. The customer then requests that the quota is increased to 200 on the
 same day
. The API can be consumed an additional 100 times on the current day because the new daily limit has not been reached yet.
If the customer requests the quota to be changed to 200 on the 
next day
, the API can be consumed 200 times the next day.
The scenario above applies for Quota by Day and Quota by Month.