- 1. Create Application Plan
- 2. Configure Usage Limit at Product Level
- 3. Configure Usage Limit at Backend (API) Level - An alternative to Product Level
- 4. Change Application Plan for Application
- 5. Testing
-
From main dashboard, click Human Resource Services link to open Product dashboard page.
-
Click Create Application Plan link.
-
Enter
Limit
in the Name field then click Create Application Plan button. -
Click 3 dots menu then select Publish.
-
From Application Plans dashboard, click on the Limit application plan.
-
Click on Limit (n) link to open Limits panel. Then click New usage limit link to open setting dialog.
-
Select the Period unit and enter the number of calls that are allowed for 1 period unit. In this case,
10
API calls are allowed for eachminute
. Then click Create usage limit button. -
A usage limit should be created.
Instead of configure usage limit at product level which the number of API calls are counted from every backend APIs, you can also configure usage limit at each backend API to have different usage limit as well.
The steps are almost the same as Product level configure except you have to do at Backend level as a figure below.
-
Select Application -> Listing menu from left panel.
-
Click Test Corp HR Mobile link to open application dashboard.
-
In Change plan panel, select the Limit application plan then click Change plan button.
-
The Application Plan for the application should be changed.
-
Configure and change Application Plan do not require configuration promotion. If you go to Product's configuration menu, you'll see it says nothing to promote.
-
Test the APIs using 3Scale API Testing (API Key Pair Auth) collection.
-
Send any API request more than 10 times within 1 minute, you should get
HTTP 429
status code as well asUsage limit exceeded
message returned from API gateway as a screenshot below.