Throttling Tier (Individual)


Delete a Tier

DELETE https://apis.wso2.com/api/am/publisher/v0.16/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.16/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.

OAuth 2.0 Scope

Not required

Examples

Parameters

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

Responses

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 details of a tier

GET https://apis.wso2.com/api/am/publisher/v0.16/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"`.

OAuth 2.0 Scope

Not required

Examples

Parameters

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

Responses

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

Update a Tier

PUT https://apis.wso2.com/api/am/publisher/v0.16/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.16/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.

OAuth 2.0 Scope

Not required

Examples

Parameters

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

Responses

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

Update tier permission

POST https://apis.wso2.com/api/am/publisher/v0.16/tiers/update-permission

This operation can be used to update tier permissions which controls access for the particular tier based on the subscribers' roles.

OAuth 2.0 Scope

Not required

Examples

Parameters

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)

Responses

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