Get available tiers\n
https://apis.wso2.com/api/am/publisher/v0.9/tiers/{tierLevel}
GET
apim:tier_view
curl -H "Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a" http://127.0.0.1:9763/api/am/publisher/v0.9/tiers/api
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
}
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
tierLevel required |
List API or Application or Resource type tiers.\n Accepted values: api
application
resource
|
String | |
Query |
limit optional |
Maximum size of resource array to return.\n |
Integer |
25 |
Query |
offset optional |
Starting point within the complete list of items qualified.\n |
Integer |
0 |
Header |
Accept optional |
Media types acceptable for the response. Default is JSON.\n |
String |
JSON |
Header |
If-None-Match optional |
Validator for conditional requests; based on the ETag of the formerly retrieved\nvariant of the resourec.\n |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK.\nList of tiers returned.\n |
TierList |
304 |
Not Modified.\nEmpty body because the client has already the latest version of the requested resource.\n |
|
406 |
Not Acceptable.\nThe requested media type is not supported\n |
Error |
Add a new tier\n
https://apis.wso2.com/api/am/publisher/v0.9/tiers/{tierLevel}
POST
apim:tier_manage
curl -H "Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a" -H "Content-Type: application/json" -X POST -d @data.json "http://127.0.0.1:9763/api/am/publisher/v0.9/tiers/api"
{
"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: http://localhost:9763/api/am/publisher/v0.9/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"
}
}
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Body |
body required |
Tier object that should to be added\n |
Tier (Tier) | |
Path |
tierLevel required |
List API or Application or Resource type tiers.\n Accepted values: api
application
resource
|
String | |
Header |
Content-Type required |
Media type of the entity in the body. Default is JSON.\n |
String |
JSON |
HTTP Code | Description | Schema |
---|---|---|
201 |
Created.\nSuccessful response with the newly created object as entity in the body.\nLocation header contains URL of newly created entity.\n |
Tier |
400 |
Bad Request.\nInvalid request or validation error\n |
Error |
415 |
Unsupported media type.\nThe entity of the request was in a not supported format.\n |
Remove a tier\n
https://apis.wso2.com/api/am/publisher/v0.9/tiers/{tierLevel}/{tierName}
DELETE
apim:tier_manage
curl -H "Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a" -X POST "http://127.0.0.1:9763/api/am/publisher/v0.9/tiers/api/Low"
HTTP/1.1 200 OK
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
tierName required |
Tier name\n |
String | |
Path |
tierLevel required |
List API or Application or Resource type tiers.\n Accepted values: api
application
resource
|
String | |
Header |
If-Match optional |
Validator for conditional requests; based on ETag.\n |
String | |
Header |
If-Unmodified-Since optional |
Validator for conditional requests; based on Last Modified header.\n |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK.\nResource successfully deleted.\n |
|
404 |
Not Found.\nResource to be deleted does not exist.\n |
Error |
412 |
Precondition Failed.\nThe request has not been performed because one of the preconditions is not met.\n |
Error |
Get tier details\n
https://apis.wso2.com/api/am/publisher/v0.9/tiers/{tierLevel}/{tierName}
GET
apim:tier_view
curl -H "Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a" http://127.0.0.1:9763/api/am/publisher/v0.9/tiers/api/Bronze
HTTP/1.1 200 OK
Content-Type: application/json
{
"unitTime": 60000,
"tierPlan": "FREE",
"tierLevel": "api",
"stopOnQuotaReach": true,
"requestCount": 1,
"description": "Allows 1 request(s) per minute.",
"name": "Bronze",
"attributes": {}
}
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
tierName required |
Tier name\n |
String | |
Path |
tierLevel required |
List API or Application or Resource type tiers.\n Accepted values: api
application
resource
|
String | |
Header |
Accept optional |
Media types acceptable for the response. Default is JSON.\n |
String |
JSON |
Header |
If-None-Match optional |
Validator for conditional requests; based on the ETag of the formerly retrieved\nvariant of the resourec.\n |
String | |
Header |
If-Modified-Since optional |
Validator for conditional requests; based on Last Modified header of the\nformerly retrieved variant of the resource.\n |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK.\nTier returned\n |
Tier |
304 |
Not Modified.\nEmpty body because the client has already the latest version of the requested resource.\n |
|
404 |
Not Found.\nRequested Tier does not exist.\n |
Error |
406 |
Not Acceptable.\nThe requested media type is not supported.\n |
Error |
Update tier details\n
https://apis.wso2.com/api/am/publisher/v0.9/tiers/{tierLevel}/{tierName}
PUT
apim:tier_manage
curl -H "Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a" -H "Content-Type: application/json" -X PUT -d @data.json "http://127.0.0.1:9763/api/am/publisher/v0.9/tiers/api/Low"
{
"unitTime": 60000,
"tierPlan": "FREE",
"tierLevel": "api",
"stopOnQuotaReach": true,
"requestCount": 10,
"description": "Allows 10 request(s) per minute.",
"name": "Low",
"attributes": {
"a": "30",
"b": "10",
"c": "20"
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"unitTime": 60000,
"tierPlan": "FREE",
"tierLevel": "api",
"stopOnQuotaReach": true,
"requestCount": 10,
"description": "Allows 10 request(s) per minute.",
"name": "Low",
"attributes": {
"b": "10",
"c": "20",
"a": "30"
}
}
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
tierName required |
Tier name\n |
String | |
Body |
body required |
Tier object that needs to be modified\n |
Tier (Tier) | |
Path |
tierLevel required |
List API or Application or Resource type tiers.\n Accepted values: api
application
resource
|
String | |
Header |
Content-Type required |
Media type of the entity in the body. Default is JSON.\n |
String |
JSON |
Header |
If-Match optional |
Validator for conditional requests; based on ETag.\n |
String | |
Header |
If-Unmodified-Since optional |
Validator for conditional requests; based on Last Modified header.\n |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK.\nSubscription updated.\n |
Tier |
400 |
Bad Request.\nInvalid request or validation error.\n |
Error |
404 |
Not Found.\nThe resource to be updated does not exist.\n |
Error |
412 |
Precondition Failed.\nThe request has not been performed because one of the preconditions is not met.\n |
Error |
Update tier permission\n
https://apis.wso2.com/api/am/publisher/v0.9/tiers/update-permission
POST
apim:tier_manage
curl -H "Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a" -H "Content-Type: application/json" -X POST -d @data.json "http://127.0.0.1:9763/api/am/publisher/v0.9/tiers/update-permission?tierName=Bronze&tierLevel=api"
{
"permissionType":"deny",
"roles": ["Internal/everyone","admin"]
}
HTTP/1.1 200 OK
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query |
tierName required |
Name of the tier\n |
String | |
Query |
tierLevel required |
List API or Application or Resource type tiers.\n Accepted values: api
application
resource
|
String | |
Header |
If-Match optional |
Validator for conditional requests; based on ETag.\n |
String | |
Header |
If-Unmodified-Since optional |
Validator for conditional requests; based on Last Modified header.\n |
String | |
Body |
permissions optional |
TierPermission (TierPermission) |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK.\nSuccessfully updated tier permissions\n |
Tier |
400 |
Bad Request.\nInvalid request or validation error.\n |
Error |
403 |
Forbidden.\nThe request must be conditional but no condition has been specified.\n |
Error |
404 |
Not Found.\nRequested tier does not exist.\n |
Error |
412 |
Precondition Failed.\nThe request has not been performed because one of the preconditions is not met.\n |
Error |