Subscription (Individual)


Block a subscription

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

OAuth 2.0 Scope

Not required

Examples

Parameters

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

Responses

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

GET https://apis.wso2.com/api/am/publisher/v0.16/subscriptions/{subscriptionId}

This operation can be used to get details of a single subscription.

OAuth 2.0 Scope

Not required

Examples

Parameters

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

Responses

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

Unblock a Subscription

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

OAuth 2.0 Scope

Not required

Examples

Parameters

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

Responses

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