1

How do you restrict the number of calls to a set of APIs per second, minute or day? Can you provide the procedure for doing it?

1 Answers1

2

Restricting number of calls to a set of APIs per time period can be achieved by creating a plan in IBM API Management. Refer to the following 2 sections for information :

  • In Creating a plan section of API Management page
    " .................................. A plan is a collection of resources or operations from one or more APIs. You can set a rate limiting policy on a plan to specify how many requests an application is allowed to make during a specified time interval. After you create a plan, .........................."
  • In the section 'Procedure' section of 'Creating a plan page' of 'IBM API Management on Cloud' Knowledge center "..................
    11.Click Add to add them to your Plan.
    1. Optional: If you want to add a Rate Limit to all your operations collectively, click the Edit rate limit pencil icon and follow the instructions from Step 15. The Rate limit window opens. Note: You can enforce a Rate Limit only if your API requires a Client ID. For more information about identifying an application by using a client ID, see the following topic: Creating an API key security scheme
    2. Optional: If you want to add a Rate Limit to individual operations, click the operations Edit icon. The "Rate Limit" window opens.
    3. Populate the fields. Enter a suitable limit for the total number of calls that can be made within your chosen time period.
      Enter a time interval for the number of calls you specified in the preceding step. Specify a time unit by clicking the Minutes arrow. By default, Minutes is selected By default, the Reject calls when limit is reached check box is selected. This option rejects calls that exceed the specified limit.
      Optional: If you do not want to reject calls that exceed the specified limit, you can choose to create a log entry when the limit is reached by clearing the Reject calls when limit is reached check box. This option creates a record in the Activity log.
      Click Apply
      Your Rate Limit is added to the displayed operation list. ............... "