SubscriptionsApi


Get subscriptions for current user

Get subscriptions for current user.

URL

http://apis.wso2.com/api/appm/store/v1.1/apps/{appType}/id/{appId}/subscription

HTTP Method

GET

Scope

appm:read

CURL Example

curl -X GET -H "Authorization: Bearer c8c4399ba38982a21372012294ad1a54" "http://localhost:9763/api/appm/store/v1.1/apps/webapp/id/80391fcb-45fc-4bb4-a83d-fc991a99084d/subscription"a

Sample Response

{"previous":"","next":"","count":2,"appList":[{"name":"app1","context":null,"id":"af929140-1257-46ed-97c0-d26098e140e9","rating":0.0,"lifecycleState":"IN-REVIEW","provider":"admin","description":"asdasd","version":"1"},{"name":"app2","context":null,"id":"5c9c8551-d696-4c44-85a6-dcd86f1a1e25","rating":0.0,"lifecycleState":"CREATED","provider":"admin","description":"phone","version":"1.0"}]}

Parameters

Type Name Description Schema Default
Path

appType

required

The App type (either Webapp/Mobile app).

String

Path

appId

required

**APP ID** consisting of the **UUID** of the App. The following combination is also accepted as a valid APP ID: the provider of the app, name of the App and the version. Should be formatted as **provider-name-version**.

String

Header

Accept

optional

Media types acceptable for the response. Default is JSON.

String

JSON

Header

If-None-Match

optional

Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource.

String

Header

If-Modified-Since

optional

Validator for conditional requests; based on the Last Modified header of the formerly retrieved variant of the resource.

String

Responses

HTTP Code Description Schema

200

OK. Qualifying App is returned.

AppList

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. The resource to be updated does not exist.

Error

Subscribe to an App

Subscribe to an existing App

URL

http://apis.wso2.com/api/appm/store/v1.1/apps/{appType}/id/{appId}/subscription

HTTP Method

POST

Scope

appm:subscribe

CURL Example

curl -X POST -H "Authorization: Bearer c8c4399ba38982a21372012294ad1a54" -H "Content-Type: application/json" -d '' "http://localhost:9763/api/appm/store/v1.1/apps/webapp/id/80391fcb-45fc-4bb4-a83d-fc991a99084d/subscription"

Sample Response

HTTP/1.1 200 OK

Parameters

Type Name Description Schema Default
Path

appType

required

The App type (either Webapp/Mobile app).

String

Path

appId

required

**APP ID** consisting of the **UUID** of the App. The following combination is also accepted as a valid APP ID: the provider of the app, name of the App and the version. Should be formatted as **provider-name-version**.

String

Header

Content-Type

required

Media type of the entity in the body. Default is JSON.

String

JSON

Responses

HTTP Code Description Schema

200

OK.

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. 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 subscribed user list

Get subscribed user list for a given App.

URL

http://apis.wso2.com/api/appm/store/v1.1/apps/{appType}/id/{appId}/subscription/users

HTTP Method

GET

Scope

appm:read

CURL Example

curl -X GET -H "Authorization: Bearer c8c4399ba38982a21372012294ad1a54" "http://localhost:9763/api/appm/store/v1.1/apps/webapp/id/80391fcb-45fc-4bb4-a83d-fc991a99084d/subscription"

Sample Response

{"userIds":["admin","user1","user2"]}

Parameters

Type Name Description Schema Default
Path

appType

required

The App type (either Webapp/Mobile app).

String

Path

appId

required

**APP ID** consisting of the **UUID** of the App. The following combination is also accepted as a valid APP ID: the provider of the app, name of the App and the version. Should be formatted as **provider-name-version**.

String

Header

Accept

optional

Media types acceptable for the response. Default is JSON.

String

JSON

Header

If-None-Match

optional

Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource.

String

Header

If-Modified-Since

optional

Validator for conditional requests; based on the Last Modified header of the formerly retrieved variant of the resource.

String

Responses

HTTP Code Description Schema

200

OK. Qualifying App is returned.

UserIdList

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. The resource to be updated does not exist.

Error

Check for subscription workflow

Check for subscription workflow.

URL

http://apis.wso2.com/api/appm/store/v1.1/apps/{appType}/id/{appId}/subscription-workflow

HTTP Method

POST

Scope

appm:subscribe

CURL Example

curl -X POST -H "Authorization: Bearer c8c4399ba38982a21372012294ad1a54" -H "Content-Type: application/json" -d '' "http://localhost:9763/api/appm/store/v1.1/apps/webapp/id/80391fcb-45fc-4bb4-a83d-fc991a99084d/subscription-workflow"

Sample Response

HTTP/1.1 200 OK

Parameters

Type Name Description Schema Default
Path

appType

required

The App type (either Webapp/Mobile app).

String

Path

appId

required

**APP ID** consisting of the **UUID** of the App. The following combination is also accepted as a valid APP ID: the provider of the app, name of the App and the version. Should be formatted as **provider-name-version**.

String

Header

Content-Type

required

Media type of the entity in the body. Default is JSON.

String

JSON

Responses

HTTP Code Description Schema

200

OK.

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