AppsApi


Enterprise Download/Install App

Enterprise Download a new App

URL

http://apis.wso2.com/api/appm/store/v1.1/administration/apps/download

HTTP Method

POST

Scope

appm:administration

CURL Example

curl -X POST -H "Authorization: Bearer fcd3a2474ffb23414f8cc0b398d3f7d3" -H "Content-Type: application/json" -d '{"type": "user", "typeIds": ["admin","user1"], "appId": "5acd652e-9d6e-465f-86bf-e30838a16123"}' "http://localhost:9763/api/appm/store/v1.1/administration/apps/download"

Sample Request

{"type": "user","typeIds": ["admin"],"appId": "cec2027d-2dd6-4826-97c5-33be4eb83ae1"}

Sample Response

HTTP/1.1 200 OK

Parameters

Type Name Description Schema Default
Header

Content-Type

required

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

String

JSON

Body

install

optional

AdminInstall (AdminInstall)

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

Enterprise uninstall App

Enterprise uninstall an existing App

URL

http://apis.wso2.com/api/appm/store/v1.1/administration/apps/uninstallation

HTTP Method

POST

Scope

appm:administration

CURL Example

curl -X POST -H "Authorization: Bearer 6d781e9fce073db36d6481054da46311" -H "Content-Type: application/json" -d '{ "type": "role", "typeIds": ["admin","role1"], "appId": "5acd652e-9d6e-465f-86bf-e30838a16123"}' "http://localhost:9763/api/appm/store/v1.1/administration/apps/uninstallation"

Sample Request

{"type": "user","typeIds": ["admin"],"appId": "cec2027d-2dd6-4826-97c5-33be4eb83ae1"}

Sample Response

HTTP/1.1 200 OK

Parameters

Type Name Description Schema Default
Header

Content-Type

required

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

String

JSON

Body

install

optional

AdminInstall (AdminInstall)

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

Get all Apps

Get a list of available Apps qualifying under a given search condition.

URL

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

HTTP Method

GET

Scope

appm:read

CURL Example

curl -X GET -H "Authorization: Bearer c8c4399ba38982a21372012294ad1a54" "http://localhost:9763/api/appm/store/v1.1/apps/mobileapp"

Sample Response

{"previous":"","count":1,"next":"","appList":[{"name":"phone","context":null,"id":"5c9c8551-d696-4c44-85a6-dcd86f1a1e25","version":"1.0","description":"phone","provider":"admin","lifecycleState":"CREATED","rating":0.0}]}

Parameters

Type Name Description Schema Default
Path

appType

required

The App type (either Webapp/Mobile app).

String

Query

query

optional

A search condition. You can search attributes by using an **\"attribute:\"** modifier. Eg. \"provider:wso2\" will match an App if the provider of the App contains \"wso2\". Supported attribute modifiers are [**provider, app_name, app_version, app_id, business_owner_id**] If no advanced attribute modifier has been specified, the search will match the given query string against the App name.

String

Query

field-filter

optional

Used to limit the fields in the response. Supported filters are [**basic, all**]

Accepted values:

basic all
String

basic

Query

limit

optional

Maximum size of resource array to return.

Integer

25

Query

offset

optional

Starting point within the complete list of items qualified.

Integer

0

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

Responses

HTTP Code Description Schema

200

OK. List of qualifying Apps 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

Get app details

Get details of an App.

URL

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

HTTP Method

GET

Scope

appm:read

CURL Example

curl -X GET -H "Authorization: Bearer c8c4399ba38982a21372012294ad1a54" "http://localhost:9763/api/appm/store/v1.1/apps/mobileapp/id/5c9c8551-d696-4c44-85a6-dcd86f1a1e25"

Sample Response

{"name":"phone","context":null,"id":"5c9c8551-d696-4c44-85a6-dcd86f1a1e25","type":"mobileapp","displayName":null,"transport":[],"lifecycle":null,"category":"Business","version":"1.0","icon":"/publisher/api/mobileapp/getfile/1KKX5LeQII1Ev8t.jpeg","description":"phone","provider":null,"lifecycleState":null,"tags":[],"rating":0.0,"thumbnailUrl":null,"banner":"/publisher/api/mobileapp/getfile/ABi7iIcbQYpyI8e.jpeg","marketType":null,"recentChanges":"-","platform":"ios","isSite":null,"appDefinition":null,"isDefaultVersion":null,"bundleversion":"1.0","screenshots":["/publisher/api/mobileapp/getfile/PiP8X797UcqF6De.jpeg"],"createdtime":null,"appType":"enterprise","lifecycleAvailableActions":null}

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.

App

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

Get App rating details

Get rating details of an App.

URL

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

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/rate"

Sample Response

{"rating": 1.6428571428571428}

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

Query

limit

optional

Maximum size of resource array to return.

Integer

25

Query

offset

optional

Starting point within the complete list of items qualified.

Integer

0

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. App rating is returned.

AppRatingList

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

Change App rating

Change App rating

URL

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

HTTP Method

PUT

Scope

appm:read

CURL Example

curl -X PUT -H "Authorization: Bearer 3cdc86c3ee6edbe18260392fb488c4e7" -d '{"rating": 4, "review": "good"}' "http://localhost:9763/api/appm/store/v1.1/apps/webapp/id/80391fcb-45fc-4bb4-a83d-fc991a99084d/rate"

Sample Request

{"rating": 4,"review": "good"}

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

Body

rating

required

App rating object that needs to be added.

AppRatingInfo (AppRatingInfo)

Header

Content-Type

required

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

String

JSON

Header

If-Match

optional

Validator for conditional requests; based on ETag.

String

Header

If-Unmodified-Since

optional

Validator for conditional requests; based on the Last Modified header.

String

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

Unsubscribe to an App

Unsubscribe to an existing App

URL

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

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/unsubscription"

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

Download App

Download a new App

URL

http://apis.wso2.com/api/appm/store/v1.1/apps/download

HTTP Method

POST

Scope

appm:subscribe

CURL Example

curl -X POST -H "Authorization: Bearer 3500931880f806ad2523c4ce7079c505" -H "Content-Type: application/json" -d '{"type": "user","appId": "fcf96617-093a-4d0f-9d27-6f41b0d0c8b8"}' "http://localhost:9763/api/appm/store/v1.1/apps/download"

Sample Request

{"type": "user","appId": "fcf96617-093a-4d0f-9d27-6f41b0d0c8b8"}

Sample Response

HTTP/1.1 202 Accepted

Parameters

Type Name Description Schema Default
Header

Content-Type

required

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

String

JSON

Body

install

optional

Install (Install)

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

Publish Stats

Publish user hit stat details.

URL

http://apis.wso2.com/api/appm/store/v1.1/apps/event-publish

HTTP Method

POST

Scope

appm:read

CURL Example

curl -X POST -H "Authorization: Bearer 62651cabf9c83f8f7379dcc9b2909f8d" -H "Content-Type: application/json" -d ' {"events": [{"appId":"init","userId":"init","tenantId":-1234,"appName":"init","appVersion":"1","context":"/init","item":"My_App","action":"init","timestamp":1462277036369},{"appId":"80391fcb-45fc-4bb4-a83d-fc991a99084d","userId":"admin","tenantId":"-1234","appName":"app3","appVersion":"1.0","context":"/app3","item":"My_App","action":"page-load","timestamp":1462277038291},{"appId":"80391fcb-45fc-4bb4-a83d-fc991a99084d","userId":"admin","tenantId":"-1234","appName":"app3","appVersion":"1.0","context":"/app3","item":"noname","action":"click","timestamp":1462277042436},{"appId":"80391fcb-45fc-4bb4-a83d-fc991a99084d","userId":"admin","tenantId":"-1234","appName":"app3","appVersion":"1.0","context":"/app3","item":"My_App","action":"page-unload","timestamp":1462277042437}]}' "http://localhost:9763/api/appm/store/v1.1/apps/event-publish"

Sample Request

{"events": [{"appId":"init","userId":"init","tenantId":-1234,"appName":"init","appVersion":"1","context":"/init","item":"My_App","action":"init","timestamp":1462277036369},{"appId":"80391fcb-45fc-4bb4-a83d-fc991a99084d","userId":"admin","tenantId":"-1234","appName":"app3","appVersion":"1.0","context":"/app3","item":"My_App","action":"page-load","timestamp":1462277038291},{"appId":"80391fcb-45fc-4bb4-a83d-fc991a99084d","userId":"admin","tenantId":"-1234","appName":"app3","appVersion":"1.0","context":"/app3","item":"noname","action":"click","timestamp":1462277042436},{"appId":"80391fcb-45fc-4bb4-a83d-fc991a99084d","userId":"admin","tenantId":"-1234","appName":"app3","appVersion":"1.0","context":"/app3","item":"My_App","action":"page-unload","timestamp":1462277042437}]}

Sample Response

HTTP/1.1 200 OK

Parameters

Type Name Description Schema Default
Body

events

required

Events (Events)

Header

Content-Type

required

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

String

JSON

Responses

HTTP Code Description Schema

202

Accepted.

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

Check if it is a favourite page

Check if it is a favourite page.

URL

http://apis.wso2.com/api/appm/store/v1.1/apps/favourite-page

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/favourite-page"

Sample Response

{"isDefaultPage": true}

Parameters

Type Name Description Schema Default
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

Responses

HTTP Code Description Schema

200

OK.

FavouritePage

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 app and get app url

Subscribe to a mobile App

URL

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

HTTP Method

POST

Scope

appm:subscribe

CURL Example

curl -X POST -H "Authorization: Bearer 3500931880f806ad2523c4ce7079c505" -H "Content-Type: application/json" -d '{"type": "user","appId": "fcf96617-093a-4d0f-9d27-6f41b0d0c8b8"}' "http://localhost:9763/api/appm/store/v1.1/apps/download"

Sample Response

HTTP/1.1 200 Ok { "appUrl":"http://localhost:9763/api/appm/store/v1.1/apps/mobile/binaries/one-time/07463547-c3dd-469b-9027-80da107ad101" }

Parameters

Type Name Description Schema Default
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

Retrieving images, pdf and document files

Retrieving images for banners, screenshots, etc.

URL

http://apis.wso2.com/api/appm/store/v1.1/apps/static-contents/{fileName}

HTTP Method

GET

Scope

appm:read

CURL Example

curl -X GET -H "Authorization: Bearer 980c5e45f2415f0b1ab8923f2c593c85" "http://localhost:9763/api/appm/publisher/v1.1/apps/static-contents/DCJGZqVpOBo4swf.jpg?appType=mobileapp"

Sample Response

HTTP/1.1 200 OK

Parameters

Type Name Description Schema Default
Query

appType

required

The application type.

String

Path

fileName

required

The file name.

String

Header

If-Match

optional

Validator for conditional requests; based on ETag.

String

Header

If-Unmodified-Since

optional

Validator for conditional requests; based on the Last Modified header.

String

Responses

HTTP Code Description Schema

200

OK. Static content retrieved successfully.

file

400

Bad Request. Invalid request or validation error

Error

404

Not Found. Requested entity does not exist.

Error

412

Precondition Failed. The request has not been performed because one of the preconditions is not met.

Error

Uninstall App

Uninstall an existing App

URL

http://apis.wso2.com/api/appm/store/v1.1/apps/uninstallation

HTTP Method

POST

Scope

appm:subscribe

CURL Example

curl -X POST -H "Authorization: Bearer 3500931880f806ad2523c4ce7079c505" -H "Content-Type: application/json" -d '{"type": "user","appId": "fcf96617-093a-4d0f-9d27-6f41b0d0c8b8"}' "http://localhost:9763/api/appm/store/v1.1/apps/uninstallation"

Sample Request

{"type": "user","appId": "fcf96617-093a-4d0f-9d27-6f41b0d0c8b8"}

Sample Response

HTTP/1.1 202 Accepted

Parameters

Type Name Description Schema Default
Header

Content-Type

required

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

String

JSON

Body

install

optional

Install (Install)

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