DELETE https://apis.wso2.com/api/am/admin/v0.15/throttling/policies/subscription/{policyId}
This operation can be used to delete a subscription-level throttling policy specifying the Id of the policy as a path paramter.
apim:tier_manage
i
DELETE https://localhost:9443/api/am/admin/v0.15/throttling/policies/subscription/3cc8902e-f7c7-49dc-987b-b146e9bd8ee8
Authorization: Bearer 0d63e133-7ad6-3aeb-9ca9-9299e0708122
Content-Type: application/json
HTTP/1.1 200 OK
curl -k -X DELETE -H "Authorization: Bearer 0d63e133-7ad6-3aeb-9ca9-9299e0708122" -H "Content-Type: application/json" https://localhost:9443/api/am/admin/v0.15/throttling/policies/subscription/3cc8902e-f7c7-49dc-987b-b146e9bd8ee8
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 |
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 https://apis.wso2.com/api/am/admin/v0.15/throttling/policies/subscription/{policyId}
Retrieve a single subscription-level throttling policy. We should provide the Id of the policy as a path parameter.
apim:tier_view
i
GET https://localhost:9443/api/am/admin/v0.15/throttling/policies/subscription/6dd9fc11-bbe1-4daf-aee5-06a4d0e44476
Authorization: Bearer 0d63e133-7ad6-3aeb-9ca9-9299e0708122
HTTP/1.1 200 OK
Content-Type: application/json
{
"policyId": "6dd9fc11-bbe1-4daf-aee5-06a4d0e44476",
"policyName": "Platinum",
"displayName": "Platinum",
"description": "Allows 4000 requests per minute",
"isDeployed": true,
"defaultLimit": {
"type": "RequestCountLimit",
"timeUnit": "min",
"unitTime": 1,
"requestCount": 4000
},
"rateLimitCount": -1,
"rateLimitTimeUnit": "NA",
"customAttributes": [
{
"name": "customAttr1",
"value": "value1"
},
{
"name": "customAttr2",
"value": "value2"
}
],
"stopOnQuotaReach": true,
"billingPlan": "COMMERCIAL"
}
curl -k -H "Authorization: Bearer 0d63e133-7ad6-3aeb-9ca9-9299e0708122" https://localhost:9443/api/am/admin/v0.15/throttling/policies/subscription/6dd9fc11-bbe1-4daf-aee5-06a4d0e44476
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 |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. Policy returned |
SubscriptionThrottlePolicy |
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 Policy does not exist. |
Error |
406 |
Not Acceptable. The requested media type is not supported. |
Error |
PUT https://apis.wso2.com/api/am/admin/v0.15/throttling/policies/subscription/{policyId}
Updates an existing subscription-level throttling policy.
apim:tier_manage
i
PUT https://localhost:9443/api/am/admin/v0.15/throttling/policies/subscription/6dd9fc11-bbe1-4daf-aee5-06a4d0e44476
Authorization: Bearer 0d63e133-7ad6-3aeb-9ca9-9299e0708122
Content-Type: application/json
{
"policyName": "Platinum",
"displayName": "Platinum",
"description": "Allows 10000 requests per minute",
"defaultLimit": {
"type": "RequestCountLimit",
"timeUnit": "min",
"unitTime": 1,
"requestCount": 10000
},
"isDeployed": true,
"rateLimitCount": -1,
"rateLimitTimeUnit": "NA",
"customAttributes": [
{
"name": "customAttr0",
"value": "value1"
},
{
"name": "customAttr1",
"value": "value1"
}
],
"stopOnQuotaReach": true,
"billingPlan": "COMMERCIAL"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"policyId": "6dd9fc11-bbe1-4daf-aee5-06a4d0e44476",
"policyName": "Platinum",
"displayName": "Platinum",
"description": "Allows 10000 requests per minute",
"isDeployed": true,
"defaultLimit": {
"type": "RequestCountLimit",
"timeUnit": "min",
"unitTime": 1,
"requestCount": 10000
},
"rateLimitCount": -1,
"rateLimitTimeUnit": "NA",
"customAttributes": [
{
"name": "customAttr0",
"value": "value1"
},
{
"name": "customAttr1",
"value": "value1"
}
],
"stopOnQuotaReach": true,
"billingPlan": "COMMERCIAL"
}
curl -k -X PUT -H "Authorization: Bearer 0d63e133-7ad6-3aeb-9ca9-9299e0708122" -H "Content-Type: application/json" https://localhost:9443/api/am/admin/v0.15/throttling/policies/subscription/6dd9fc11-bbe1-4daf-aee5-06a4d0e44476 -d @data.json
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
policyId required |
Thorttle policy UUID |
String | |
Body |
body required |
Policy object that needs to be modified |
SubscriptionThrottlePolicy (SubscriptionThrottlePolicy) | |
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. Policy updated. |
SubscriptionThrottlePolicy |
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 (Will be supported in future). |
Error |