Application Policy (Individual)


Delete an Application Throttling policy
DELETE https://apis.wso2.com/api/am/admin/v0.11/throttling/policies/application/{policyId}

Deletes an Application level throttling policy.

OAuth 2.0 Scope

apim:tier_managei

Request

DELETE https://localhost:9443/api/am/admin/v0.11/throttling/policies/application/f7becc49-9cc1-463f-bc2b-fc4c82582479 Authorization: Bearer 0d63e133-7ad6-3aeb-9ca9-9299e0708122

Response

HTTP/1.1 200 OK

Sample CURL

curl -k -X DELETE -H "Authorization: Bearer 0d63e133-7ad6-3aeb-9ca9-9299e0708122" https://localhost:9443/api/am/admin/v0.11/throttling/policies/application/f7becc49-9cc1-463f-bc2b-fc4c82582479

Parameters

Type Name Description Schema Default
Path

policyId

required

Thorttle policy UUID

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 (Will be supported in future).

Error

Get an Application Policy
GET https://apis.wso2.com/api/am/admin/v0.11/throttling/policies/application/{policyId}

Retrieves an Application Policy.

OAuth 2.0 Scope

apim:tier_viewi

Request

GET https://localhost:9443/api/am/admin/v0.11/throttling/policies/application/6fc88136-dd36-4e81-ac6c-746225c5001b Authorization: Bearer 0c6439fd-9b16-3c2e-be6e-1086e0b9aa93

Response

HTTP/1.1 200 OK Content-Type: application/json { "policyId": "6fc88136-dd36-4e81-ac6c-746225c5001b", "policyName": "10PerMwin", "displayName": "10PerwMin", "description": "Allows 10 request per minute", "isDeployed": true, "defaultLimit": { "type": "RequestCountLimit", "timeUnit": "min", "unitTime": 1, "requestCount": 10 } }

Sample CURL

curl -k -H "Authorization: Bearer 0c6439fd-9b16-3c2e-be6e-1086e0b9aa93" https://localhost:9443/api/am/admin/v0.11/throttling/policies/application/6fc88136-dd36-4e81-ac6c-746225c5001b

Parameters

Type Name Description Schema Default
Path

policyId

required

Thorttle policy UUID

String

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. Policy returned

ApplicationThrottlePolicy

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 an Application Throttling policy
PUT https://apis.wso2.com/api/am/admin/v0.11/throttling/policies/application/{policyId}

Updates an existing Application level throttling policy. Upon succesfull, you will receive the updated application policy as the response.

OAuth 2.0 Scope

apim:tier_managei

Request

PUT https://localhost:9443/api/am/admin/v0.11/throttling/policies/application/f7becc49-9cc1-463f-bc2b-fc4c82582479 Authorization: Bearer 0c6439fd-9b16-3c2e-be6e-1086e0b9aa93 Content-Type: application/json { "policyName": "1PerMin", "displayName": "1PerMin", "description": "Allows single request per minute", "defaultLimit": { "type": "RequestCountLimit", "timeUnit": "min", "unitTime": 1, "requestCount": 1 } }

Response

HTTP/1.1 200 OK Content-Type: application/json { "policyId": "f7becc49-9cc1-463f-bc2b-fc4c82582479", "policyName": "1PerMin", "displayName": "1PerMin", "description": "Allows single request per minute", "isDeployed": true, "defaultLimit": { "type": "RequestCountLimit", "timeUnit": "min", "unitTime": 1, "requestCount": 1 } }

Sample CURL

curl -k -X PUT -H "Authorization: Bearer 0c6439fd-9b16-3c2e-be6e-1086e0b9aa93" -H "Content-Type: application/json" https://localhost:9443/api/am/admin/v0.11/throttling/policies/application/f7becc49-9cc1-463f-bc2b-fc4c82582479 -d @data.json

Parameters

Type Name Description Schema Default
Path

policyId

required

Thorttle policy UUID

String

Body

body

required

Policy object that needs to be modified

ApplicationThrottlePolicy (ApplicationThrottlePolicy)

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. Policy updated.

ApplicationThrottlePolicy

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