GET https://apis.wso2.com/api/am/admin/v0.14/throttling/policies/application
Retrieves all existing application throttling policies.
apim:tier_view
i
GET https://localhost:9443/api/am/admin/v0.14/throttling/policies/application
Authorization: Bearer e59e2657-4c2a-3cd0-8b48-0f4f39940c41
HTTP/1.1 200 OK
Content-Type: application/json
{
"count": 4,
"list": [
{
"policyId": "aef4447a-f996-4b3c-9c47-d0a401ab913c",
"policyName": "50PerMin",
"displayName": "50PerMin",
"description": "Allows 50 request per minute",
"isDeployed": true,
"defaultLimit": {
"type": "RequestCountLimit",
"timeUnit": "min",
"unitTime": 1,
"requestCount": 50
}
},
{
"policyId": "472b573d-b162-4ac9-9984-531ee03d9d7c",
"policyName": "20PerMin",
"displayName": "20PerMin",
"description": "Allows 20 request per minute",
"isDeployed": true,
"defaultLimit": {
"type": "RequestCountLimit",
"timeUnit": "min",
"unitTime": 1,
"requestCount": 20
}
},
{
"policyId": "251d4f70-29f8-40f4-8aad-f2d1e7b8cfc2",
"policyName": "10PerMin",
"displayName": "10PerMin",
"description": "Allows 10 request per minute",
"isDeployed": true,
"defaultLimit": {
"type": "RequestCountLimit",
"timeUnit": "min",
"unitTime": 1,
"requestCount": 10
}
},
{
"policyId": "aaaef257-5453-42e6-b4a6-c48567864f92",
"policyName": "Unlimited",
"displayName": "Unlimited",
"description": "Allows unlimited requests",
"isDeployed": true,
"defaultLimit": {
"type": "RequestCountLimit",
"timeUnit": "min",
"unitTime": 1,
"requestCount": 2147483647
}
}
]
}
curl -k -H "Authorization: Bearer e59e2657-4c2a-3cd0-8b48-0f4f39940c41" https://localhost:9443/api/am/admin/v0.14/throttling/policies/application
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Header |
Accept optional |
Media types acceptable for the response. Default is application/json. |
String |
application/json |
Header |
If-None-Match optional |
Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource (Will be supported in future). |
String | |
Header |
If-Modified-Since optional |
Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource (Will be supported in future). |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. Policies returned |
ApplicationThrottlePolicyList |
304 |
Not Modified. Empty body because the client has already the latest version of the requested resource (Will be supported in future). |
|
406 |
Not Acceptable. The requested media type is not supported. |
Error |
POST https://apis.wso2.com/api/am/admin/v0.14/throttling/policies/application
This operation can be used to add a new application level throttling policy.
apim:tier_manage
i
POST https://localhost:9443/api/am/admin/v0.14/throttling/policies/application
Authorization: Bearer 0c6439fd-9b16-3c2e-be6e-1086e0b9aa93
Content-Type: application/json
{
"policyName": "1PerMin",
"displayName": "1PerMin",
"description": "Allows 1 request per minute",
"defaultLimit": {
"type": "RequestCountLimit",
"timeUnit": "min",
"unitTime": 1,
"requestCount": 1
}
}
HTTP/1.1 201 Created
Location: https://localhost:9443/api/am/admin/v0.14/throttling/policies/application/f7becc49-9cc1-463f-bc2b-fc4c82582479
Content-Type: application/json
{
"policyId": "f7becc49-9cc1-463f-bc2b-fc4c82582479",
"policyName": "1PerMin",
"displayName": "1PerMin",
"description": "Allows 1 request per minute",
"isDeployed": true,
"defaultLimit": {
"type": "RequestCountLimit",
"timeUnit": "min",
"unitTime": 1,
"requestCount": 1
}
}
curl -k -H "Authorization: Bearer 0c6439fd-9b16-3c2e-be6e-1086e0b9aa93" -X POST -H "Content-Type: application/json" https://localhost:9443/api/am/admin/v0.14/throttling/policies/application -d @data.json
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Body |
body required |
Application level policy object that should to be added |
ApplicationThrottlePolicy (ApplicationThrottlePolicy) | |
Header |
Content-Type required |
Media type of the entity in the body. Default is application/json. |
String |
application/json |
HTTP Code | Description | Schema |
---|---|---|
201 |
Created. Successful response with the newly created object as entity in the body. Location header contains URL of newly created entity. |
ApplicationThrottlePolicy |
400 |
Bad Request. Invalid request or validation error |
Error |
415 |
Unsupported media type. The entity of the request was in a not supported format. |