POST https://apis.wso2.com/api/am/publisher/v0.13/subscriptions/block-subscription
This operation can be used to block a subscription. Along with the request, `blockState` must be specified as a query parameter. 1. `BLOCKED` : Subscription is completely blocked for both Production and Sandbox environments. 2. `PROD_ONLY_BLOCKED` : Subscription is blocked for Production environment only.
apim:subscription_block
i
POST https://localhost:9443/api/am/publisher/v0.13/subscriptions/block-subscription?subscriptionId=64eca60b-2e55-4c38-8603-e9e6bad7d809&blockState=PROD_ONLY_BLOCKED
Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8
HTTP/1.1 200 OK
Content-Type: application/json
{
"subscriptionId": "64eca60b-2e55-4c38-8603-e9e6bad7d809",
"tier": "Gold",
"apiIdentifier": "admin-PhoneVerification-1.0.0",
"applicationId": "896658a0-b4ee-4535-bbfa-806c894a4015",
"status": "PROD_ONLY_BLOCKED"
}
curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" -X POST "https://localhost:9443/api/am/publisher/v0.13/subscriptions/block-subscription?subscriptionId=64eca60b-2e55-4c38-8603-e9e6bad7d809&blockState=PROD_ONLY_BLOCKED"
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query |
subscriptionId required |
Subscription Id |
String | |
Query |
blockState required |
Subscription block state. Accepted values: BLOCKED
PROD_ONLY_BLOCKED
|
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. Subscription was blocked successfully. |
|
400 |
Bad Request. Invalid request or validation error |
Error |
404 |
Not Found. Requested subscription 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/subscriptions/{subscriptionId}
This operation can be used to get details of a single subscription.
apim:subscription_view
i
GET https://localhost:9443/api/am/publisher/v0.13/subscriptions/64eca60b-2e55-4c38-8603-e9e6bad7d809
Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8
HTTP/1.1 200 OK
Content-Type: application/json
{
"subscriptionId": "64eca60b-2e55-4c38-8603-e9e6bad7d809",
"tier": "Gold",
"apiIdentifier": "admin-PhoneVerification-1.0.0",
"applicationId": "896658a0-b4ee-4535-bbfa-806c894a4015",
"status": "UNBLOCKED"
}
curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" https://localhost:9443/api/am/publisher/v0.13/subscriptions/64eca60b-2e55-4c38-8603-e9e6bad7d809
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
subscriptionId required |
Subscription Id |
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. Subscription returned |
ExtendedSubscription |
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 Subscription does not exist. |
Error |
POST https://apis.wso2.com/api/am/publisher/v0.13/subscriptions/unblock-subscription
This operation can be used to unblock a subscription specifying the subscription Id. The subscription will be fully unblocked after performing this operation.
apim:subscription_block
i
POST https://localhost:9443/api/am/publisher/v0.13/subscriptions/unblock-subscription?subscriptionId=64eca60b-2e55-4c38-8603-e9e6bad7d809
Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8`
HTTP/1.1 200 OK
Content-Type: application/json
{
"subscriptionId": "64eca60b-2e55-4c38-8603-e9e6bad7d809",
"tier": "Gold",
"apiIdentifier": "admin-PhoneVerification-1.0.0",
"applicationId": "896658a0-b4ee-4535-bbfa-806c894a4015",
"status": "UNBLOCKED"
}
curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" -X POST "https://localhost:9443/api/am/publisher/v0.13/subscriptions/unblock-subscription?subscriptionId=64eca60b-2e55-4c38-8603-e9e6bad7d809"
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query |
subscriptionId required |
Subscription Id |
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. Subscription was unblocked successfully. |
|
400 |
Bad Request. Invalid request or validation error |
Error |
404 |
Not Found. Requested subscription does not exist. |
Error |
412 |
Precondition Failed. The request has not been performed because one of the preconditions is not met. |
Error |