Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

API Manager admins can add new throttling tiers and define extra properties to throttling tiers using the management console as discussed below. For a description of throttling tiers, see API-level throttling.

  1. Log in to the API Manager's Management Console and select Browse under Resources menu.
  2. Select the file: /_system/governance/apimgt/applicationdata/tiers.xml.

  3. In the Contents panel, click Edit as text link and the throttling policy opens.

  4. You can add a new policy configuration by editing the XML code. For example, we have added a new tier called Platinum by including the following XML code block soon after the <throttle:MediatorThrottleAssertion> element.

    Tier DisplayName :  This is an You can add this optional attribute which can be added to each throttle ID of tiers.xml . From this 'displayName' attribute,it'll file in order to decouple the throttle policy name defined in tiers.xml from the tier name showing in APIPublisher/Store UIs. In other wordsThat is, a user can add a different throttle display name to show appear in APIPublisher/Store UIs without changing the throttle ID policy name. In the The configuration below ,it has defined a displayName as 'platino' for the throttle value 'platinum' to use in displaying platinum. This value is displayed in APIPublisher/Store apps.

    Tier Attributes : In the configuration below, there's a commented out XML section starting from the XML tag <throttle:Attributes>. You can use it to define additional attributes related to each throttling tier definition. For example, if the throttling tier Platinum has attributes called PaymentPlan and Availability, first uncomment the <throttle:Attributes> section and then define the new attributes as follows:

    Code Block
    languagehtml/xml
    <wsp:Policy>
     <throttle:ID throttle:type="ROLE" throttle:displayName="platino">Platinum</throttle:ID>
       <wsp:Policy>
         <throttle:Control>
            <wsp:Policy>
              <throttle:MaximumCount>50</throttle:MaximumCount>
                 <throttle:UnitTime>60000</throttle:UnitTime>
                   <!--It's possible to define tier level attributes as below for each tier level.For eg:Payment Plan for a tier-->
                      <wsp:Policy>
                         <throttle:Attributes>
                            <!--throttle:Attribute1>xxxx</throttle:Attribute1-->
                            <!--throttle:Attribute2>xxxx</throttle:Attribute2-->
                            <throttle:PaymentPlan>monthly</throttle:PaymentPlan>
                            <throttle:Availability>FullTime</throttle:Availability>
                         </throttle:Attributes>
                      </wsp:Policy>
            </wsp:Policy>
         </throttle:Control>
       </wsp:Policy>
    </wsp:Policy>
  5. After the edits, click Save Content. Your new throttling policy (Platinum) is now successfully saved in the Repository used by WSO2 API Manager. You can view this new throttle tier available for selection when creating a new API through the API Publisher.