Was this helpful?

Reset Quota policy enables you to dynamically reset the limit for a specified Quota. For example, you can use this policy to reset a developer's Quota counter when additional API calls are purchased.

Configuring a Reset Quota policy

Configure your Reset Quota policy using the following elements.

Field Name Description
Quota Name Specifies the name of the Quota policy whose counter should be reset.
Identifier name Variable used for uniquely identifying the client, for example client_id.
Allow (Allow integer) Specifies the message count tow which the Quota will be reset.

Policy schema

Each policy must conform to a policy schema. All policy constructs, such as the elements and attributes above, are defined in a schema. To download the schema, click here.

Reset Quota examples

Reset top-level quota.

<ResetQuota name="resetQuota">
 <Quota name="request.header.quotapolicy">
  <Identifier name="_default">
    <Allow>100</Allow>
  </Identifier>
 </Quota>
</ResetQuota>

<ResetQuota name="resetQuota">
 <Quota name="request.header.quotapolicy">
  <Identifier name="_default">
    <Allow ref="request.header.allowquota" />
  </Identifier>
 </Quota>
</ResetQuota>

Reset top-level quota for different identifiers.

<ResetQuota name="resetQuota">
 <Quota ref="request.header.quotapolicy">
  <Identifier ref="request.header.identifier">
    <Allow>100</Allow>
  </Identifier>
 </Quota>
</ResetQuota>

Reset class-level quota.

<ResetQuota name="resetQuota">
 <Quota name="quotapolicy">
  <Identifier name="_default">
   <Class ref="request.header.classIdentifier">
    <Allow>200</Allow>
  </Identifier>
  </Identifier>
 </Quota>
</ResetQuota>

Reset class-level quota (if top-level quota has been exhausted).

<ResetQuota name="resetQuota">
 <Quota name="quotapolicy">
  <Identifier name="_default" allow="200">
   <Allow>200</Allow>
   <Class ref="request.header.classIdentifier"/>
    <Allow>200</Allow>
  </Class>
  </Identifier>
 </Quota>
</ResetQuota>