GET https://apis.wso2.com/api/am/publisher/v0.13/tiers/{tierLevel}
This operation can be used to list the available tiers for a given tier level. Tier level should be specified as a path parameter and should be one of `api`, `application` and `resource`.
apim:tier_view
i
GET https://localhost:9443/api/am/publisher/v0.13/tiers/api
Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8
HTTP/1.1 200 OK
Content-Type: application/json
{
"previous": "",
"list": [
{
"unitTime": 60000,
"tierPlan": "FREE",
"tierLevel": "api",
"stopOnQuotaReach": true,
"requestCount": 1,
"description": "Allows 1 request(s) per minute.",
"name": "Bronze",
"attributes": {}
},
{
"unitTime": 60000,
"tierPlan": "FREE",
"tierLevel": "api",
"stopOnQuotaReach": true,
"requestCount": 20,
"description": "Allows 20 request(s) per minute.",
"name": "Gold",
"attributes": {}
},
{
"unitTime": 60000,
"tierPlan": "FREE",
"tierLevel": "api",
"stopOnQuotaReach": true,
"requestCount": 5,
"description": "Allows 5 request(s) per minute.",
"name": "Silver",
"attributes": {}
},
{
"unitTime": 0,
"tierPlan": null,
"tierLevel": "api",
"stopOnQuotaReach": true,
"requestCount": 0,
"description": "Allows unlimited requests",
"name": "Unlimited",
"attributes": {}
}
],
"next": "",
"count": 4
}
curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" https://localhost:9443/api/am/publisher/v0.13/tiers/api
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
tierLevel required |
List API or Application or Resource type tiers. Accepted values: api
application
resource
|
String | |
Query |
limit optional |
Maximum size of resource array to return. |
Integer |
25 |
Query |
offset optional |
Starting point within the complete list of items qualified. |
Integer |
0 |
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 |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. List of tiers returned. |
TierList |
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/publisher/v0.13/tiers/{tierLevel}
This operation can be used to create a new throttling tier. The only supported tier level is `api` tiers. `POST https://localhost:9443/api/am/publisher/v0.13/tiers/api` **IMPORTANT:** * This is only effective when Advanced Throttling is disabled in the Server. If enabled, we need to use Admin REST API for throttling tiers modification related operations.
apim:tier_manage
i
POST https://localhost:9443/api/am/publisher/v0.13/tiers/api
Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8
Content-Type: application/json
{
"unitTime": 60000,
"tierPlan": "FREE",
"tierLevel": "api",
"stopOnQuotaReach": true,
"requestCount": 5,
"description": "Allows 5 request(s) per minute.",
"name": "Low",
"attributes": {
"a":10,
"b":30
}
}
HTTP/1.1 201 Created
Location: https://localhost:9443/api/am/publisher/v0.13/tiers/Low
Content-Type: application/json
{
"unitTime": 60000,
"tierPlan": "FREE",
"tierLevel": "api",
"stopOnQuotaReach": true,
"requestCount": 5,
"description": "Allows 5 request(s) per minute.",
"name": "Low",
"attributes": {
"b": "30",
"a": "10"
}
}
curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" -H "Content-Type: application/json" -X POST -d @data.json "https://localhost:9443/api/am/publisher/v0.13/tiers/api"
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Body |
body required |
Tier object that should to be added |
Tier (Tier) | |
Path |
tierLevel required |
List API or Application or Resource type tiers. Accepted values: api
|
String | |
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. |
Tier |
400 |
Bad Request. Invalid request or validation error |
Error |
415 |
Unsupported media type. The entity of the request was in a not supported format. |