This repository was archived by the owner on Aug 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
2.3 Configure API Quotas
Chris Wiechmann edited this page May 16, 2019
·
7 revisions
Starting from version 1.1 the API-Developer has the ability to control the System- and Application-Default-Quota for his API directly in the API-Contract.
Please note, that API-Method specific quotas are not yet supported. Hence method must be "*".
To add quota configuration to the API-Contract the following can be added to the contract:
{
"name":"My API with some Quotas",
"path":"/v1/my/api",
"state":"published",
"version":"1.0.1",
"organization":"API Development",
"applicationQuota":{
"restrictions":[
{
"method":"*",
"type":"throttlemb",
"config":{
"period":"hour",
"mb":50,
"per":1
}
}
]
},
"systemQuota":{
"restrictions":[
{
"method":"*",
"type":"throttle",
"config":{
"period":"minutes",
"messages":100,
"per":30
}
}
]
}
}method: For now it must be "*", later options will be added to define method level quotas.
type: throttle for the number of message or throttlemb for number of Mega-Byte
period: Must be either [second|minute|hour|day|week]
☝️ Swagger-Promote has been discontinued and is replaced by the new APIM-CLI