DELETE https://apis.wso2.com/api/am/publisher/v0.13/tiers/{tierLevel}/{tierName}
This operation can be used to delete an existing tier. The only supported tier level is `api` tiers. `DELETE https://localhost:9443/api/am/publisher/v0.13/tiers/api/Low` **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
DELETE https://localhost:9443/api/am/publisher/v0.13/tiers/api/Low
Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8
HTTP/1.1 200 OK
curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" -X DELETE "https://localhost:9443/api/am/publisher/v0.13/tiers/api/Low"
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
tierName required |
Tier name |
String | |
Path |
tierLevel required |
List API or Application or Resource type tiers. Accepted values: api
|
String | |
Header |
If-Match optional |
Validator for conditional requests; based on ETag (Will be supported in future). |
String | |
Header |
If-Unmodified-Since optional |
Validator for conditional requests; based on Last Modified header (Will be supported in future). |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. Resource successfully deleted. |
|
404 |
Not Found. Resource to be deleted does not exist. |
Error |
412 |
Precondition Failed. The request has not been performed because one of the preconditions is not met. |
Error |
GET https://apis.wso2.com/api/am/publisher/v0.13/tiers/{tierLevel}/{tierName}
This operation can be used to retrieve details of a single tier by specifying the tier level and tier name. Note that the scope of the API is mandatory while retreiving the access token with the following cURL command : `curl -k -d \"grant_type=password&username=username&password=password&scope=apim:tier_view\" -H \"Authorization: Basic <token>\" https://localhost:8243/token`. You will receive the access token as the response, for example `"access_token":"8644c013-7ff1-3217-b150-d7b92cae6be7"`.
apim:tier_view
i
GET https://localhost:9443/api/am/publisher/v0.13/tiers/api/Bronze
Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8
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": {}
}
curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" https://localhost:9443/api/am/publisher/v0.13/tiers/api/Bronze
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
tierName required |
Tier name |
String | |
Path |
tierLevel required |
List API or Application or Resource type tiers. Accepted values: api
application
resource
|
String | |
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. Tier returned |
Tier |
304 |
Not Modified. Empty body because the client has already the latest version of the requested resource (Will be supported in future). |
|
404 |
Not Found. Requested Tier does not exist. |
Error |
406 |
Not Acceptable. The requested media type is not supported. |
Error |
PUT https://apis.wso2.com/api/am/publisher/v0.13/tiers/{tierLevel}/{tierName}
This operation can be used to update an existing tier. The only supported tier level is `api` tiers. `PUT https://localhost:9443/api/am/publisher/v0.13/tiers/api/Low` **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
PUT https://localhost:9443/api/am/publisher/v0.13/tiers/api/Low
Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8
Content-Type: application/json
{
"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"
}
}
curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" -H "Content-Type: application/json" -X PUT -d @data.json "https://localhost:9443/api/am/publisher/v0.13/tiers/api/Low"
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
tierName required |
Tier name |
String | |
Body |
body required |
Tier object that needs to be modified |
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 |
Header |
If-Match optional |
Validator for conditional requests; based on ETag (Will be supported in future). |
String | |
Header |
If-Unmodified-Since optional |
Validator for conditional requests; based on Last Modified header (Will be supported in future). |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. Subscription updated. |
Tier |
400 |
Bad Request. Invalid request or validation error. |
Error |
404 |
Not Found. The resource to be updated does not exist. |
Error |
412 |
Precondition Failed. The request has not been performed because one of the preconditions is not met. |
Error |
POST https://apis.wso2.com/api/am/publisher/v0.13/tiers/update-permission
This operation can be used to update tier permissions which controls access for the particular tier based on the subscribers' roles.
apim:tier_manage
i
POST https://localhost:9443/api/am/publisher/v0.13/tiers/update-permission?tierName=Bronze&tierLevel=api
Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8
Content-Type: application/json
{
"permissionType":"deny",
"roles": ["Internal/everyone","admin"]
}
HTTP/1.1 200 OK
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/update-permission?tierName=Bronze&tierLevel=api"
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query |
tierName required |
Name of the tier |
String | |
Query |
tierLevel required |
List API or Application or Resource type tiers. Accepted values: api
application
resource
|
String | |
Header |
If-Match optional |
Validator for conditional requests; based on ETag (Will be supported in future). |
String | |
Header |
If-Unmodified-Since optional |
Validator for conditional requests; based on Last Modified header (Will be supported in future). |
String | |
Body |
permissions optional |
TierPermission (TierPermission) |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. Successfully updated tier permissions |
Tier |
400 |
Bad Request. Invalid request or validation error. |
Error |
403 |
Forbidden. The request must be conditional but no condition has been specified. |
Error |
404 |
Not Found. Requested tier does not exist. |
Error |
412 |
Precondition Failed. The request has not been performed because one of the preconditions is not met. |
Error |