This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Store APIs
WSO2 App Manager Store provides the following REST APIs for App management.
Note
When you access any API other than the login, logout and application detail retrieval APIs through an external REST client such as cURL, first invoke the login API to ensure that the user is authenticated. When the login API is invoked, the system stores the generated session cookie in a file, which we use in the next API invocations.
Common REST APIs
The following REST APIs are common to all asset types.
App Store login
Description | Logs in to the App Store. |
URI | |
HTTP Methods | POST |
Content-Type | application/json |
Payload | '{"username":"xxxxxx","password":"xxxxxx"} |
Example | curl -c cookies -H "Content-Type: application/json" -X POST -d '{"username":"admin","password":"admin"}' http://localhost:9763/store/apis/user/login |
App Store logout
Description | Logs out from the App Store. |
URI | |
Payload | None |
HTTP Methods | GET |
Example | curl -b cookies http://localhost:9763/store/apis/user/logout |
User signup
Description | Adds a new store user. |
URI | |
HTTP Methods | POST |
Payload | '{"username":"xxxxxx","password":"xxxxxx"}' |
Content-Type | application/json |
Example | curl -b cookies -H "Content-Type: application/json" -X POST -d '{"username":"storeUser","password":"stroreUser123"}' http://localhost:9763/store/apis/user/register |
Check for user existence
Description | Checks whether or not a given user exists in the system. |
URI | |
Content-Type | application/json |
Payload | {"username":"<username>"} |
HTTP Methods | POST |
Example | curl -b cookies -H "Content-Type: application/json" -X POST -d '{"username":"storeUser"}' http://localhost:9763/store/apis/user/exists |
Get details of a given app with a given version
Description | Retrieves the details of the app specified with the name and the version. |
URI | http://localhost:9763/store/apis/v1/assets/{app-type}/{provider-name}/{app-name}/{app-version} |
HTTP Methods | GET |
Example | curl -k -X GET "http://localhost:9763/store/apis/v1/assets/webapp/admin/helloWorld/v1" --user admin:admin |
Get details of all the versions of a given app
Description | Retrieves the details of all the versions of the app under a given name. {app-type} -> webapp/mobileapp/site |
URI | http://localhost:9763/store/apis/v1/assets/{app-type}/{provider-name}/{app-name} |
HTTP Methods | GET |
Example | curl -k -X GET "http://localhost:9763/store/apis/v1/assets/webapp/admin/helloWorld" --user admin:admin |
Get details of all apps
Description | Retrieves the details of all the available apps. {app-type} -> webapp/mobileapp/site |
URI | http://localhost:9763/store/apis/v1/assets/{app-type}/ |
HTTP Methods | GET |
Example | curl -k -X GET "http://localhost:9763/store/apis/v1/assets/webapp" --user admin:admin |
Get details of all apps under a given provider
Description | Retrieves the details of all the apps created by a given provider name. |
URI | http://localhost:9763/store/apis/v1/assets/{app-type}/{provider-name} |
HTTP Methods | GET |
Example | curl -k -X GET "http://localhost:9763/store/apis/v1/assets/webapp/admin" --user admin:admin |
Get details of paginated app
Description | Retrieves the details of apps under the given pagination range (app details in between the app count). |
URI | http://localhost:9763/store/apis/{version}/assets/{type}?start={start}&count={count} |
HTTP Methods | GET |
Example | curl -k -X GET "http://localhost:9763/store/apis/v1/assets/webapp?start=0&count=5" --user admin:admin |
APIs specific to web applications
The following REST APIs are specific to web applications.
Subscribing to a webapp
Description | Subscribes to a web application. |
URI | http://localhost:9763/store/resources/webapp/v1/subscription/app |
URL Parameters | apiName=<webapp-name>&apiVersion=<webapp-version>&apiTier=<tier>&subscriptionType=<Subscription Type>&apiProvider=<webapp-provider>&appName=DefaultApplication |
HTTP Methods | POST |
Example | curl -b cookies -X POST -d 'apiName=HelloWorldApp&apiVersion=v1.0.0&apiTier=Unlimited&subscriptionType=INDIVIDUAL&apiProvider=admin&appName=DefaultApplication' http://localhost:9763/store/resources/webapp/v1/subscription/app |
Unsubscribing to a webapp
Description | Unsubscribes to a web application. |
URI | http://localhost:9763/store/resources/webapp/v1/unsubscription/app |
URL Parameters | apiName=<webapp-name>&apiVersion=<webapp-version>&apiTier=<tier>&subscriptionType=<Subscription Type>&apiProvider=<webapp-provider>&appName=DefaultApplication |
HTTP Methods | POST |
Example | curl -b cookies -X POST -d 'apiName=dwqdqwdq&apiVersion=qwdqwd&apiTier=Unlimited&subscriptionType=INDIVIDUAL&apiProvider=admin&appName=DefaultApplication' http://localhost:9763/store/resources/webapp/v1/unsubscription/app |
Get all subscriptions of a webapp
Description | Retrieves details of all subscribers of a particular webapp. |
URI | http://localhost:9763/store/resources/webapp/v1/subscriptions/{providerName}/{webappName}/ |
HTTP Methods | GET |
Example | curl -b cookies http://localhost:9763/store/resources/webapp/v1/subscriptions/admin/HelloWorld/v1.0.0 |
Get subscription details of a given user
Description | Retrieves subscription details of a given user. |
URI | http://localhost:9763/store/resources/webapp/v1/subscription/{username} |
HTTP Methods | GET |
Example | curl -b cookies http://localhost:9763/store/resources/webapp/v1/subscription/admin |
Get all tags in the App Store
Description | Retrieves all tags used in the App Store under the given app type. The response contains an array of tag values along with the number of applications created under each tag. |
URI | http://localhost:9763/store/apis/tag/{app-type} |
HTTP Methods | GET |
Example | curl -b cookies http://localhost:9763/store/apis/tag/webapp |
APIs specific to mobile applications
The following REST APIs are specific to mobile applications.
Install (subscribe) and uninstall (unsubscribe)
- Install (subscribe) mobile apps to a user
Description | Installs (subscribes) the app given in the POST data to the logged in user. |
URI | http://localhost:9763/store/apps/user/install |
HTTP Methods | POST |
Content type | application/x-www-form-urlencoded |
Payload | asset={mobileAppId} |
Example | curl -b cookies -H "Content-Type: application/x-www-form-urlencoded" -X POST -d 'asset=be21eb62-a7b9-4508-9781-0bb5525ce558' http://localhost:9763/store/apps/user/install |
Sample Response | HTTP/1.1 200 OK |
- Install (subscribe) mobile apps to devices
Description | Installs (subscribes) the app given in the POST data to the specified device. |
URI | http://localhost:9763/store/apps/devices/{deviceId}/install |
HTTP Methods | POST |
Content type | application/x-www-form-urlencoded |
Payload | asset={mobileAppId} |
Example | curl -b cookies -H "Content-Type: application/x-www-form-urlencoded" -X POST -d 'asset=889602a2-c38f-4135-887d-2f7549ceee1d' http://localhost:9763/store/apps/devices/12/install |
Sample Response | HTTP/1.1 200 OK |
- Uninstall (unsubscribe) mobile apps from devices
Description | if "Self Unsubscription" is enabled, uninstalls (unsubscribes) previously installed (subscribed) apps given in the POST data. |
URI | |
HTTP Methods | POST |
Content type | application/x-www-form-urlencoded |
Payload | asset={mobileAppId} |
Example | curl -b cookies -H "Content-Type: application/x-www-form-urlencoded" -X POST -d 'asset=889602a2-c38f-4135-887d-2f7549ceee1d' http://localhost:9763/store/apps/devices/uninstall |
Sample Response | HTTP/1.1 200 OK |
Get devices, roles and users
- Get devices
Description | Retrieves the list of devices. |
URI | |
HTTP Methods | GET |
Example | curl -b cookies -X GET http://localhost:9763/store/apis/enterprise/get-devices |
Sample Response | HTTP/1.1 200 OK |
- Get roles
Description | Retrieves the list of roles. |
URI | |
HTTP Methods | GET |
Example | curl -b cookies -X GET http://localhost:9763/store/apis/enterprise/get-all-roles |
Sample Response | HTTP/1.1 200 OK |
- Get users
Description | Retrieves the user list. |
URI | |
HTTP Methods | GET |
Example | curl -b cookies -X GET http://localhost:9763/store/apis/enterprise/get-all-users |
Sample Response | HTTP/1.1 200 OK |
Enterprise install (subscribe) and enterprise uninstall (unsubscribe)
- Install to given roles
Description | Installs the app to users who have been assigned the specified roles. |
URI | http://localhost:9763/store/apis/enterprise/perform/install/role |
HTTP Methods | POST |
Content type | application/x-www-form-urlencoded |
Payload | app={appId}&data[]={role name 1}&data[]={role name 2}&data[]={role name n} |
Example | curl -b cookies -H "Content-Type: application/x-www-form-urlencoded" -X POST -d 'app=889602a2-c38f-4135-887d-2f7549ceee1d&data[]=Application/app-1&data[]=admin' http://localhost:9763/store/apis/enterprise/perform/install/role |
Sample Response | HTTP/1.1 200 OK Content-Type: application/json |
- Uninstall from given roles
Description | Uninstalls the app from users who have been assigned the given roles. |
URI | http://localhost:9763/store/apis/enterprise/perform/uninstall/role |
HTTP Methods | POST |
Content type | application/x-www-form-urlencoded |
Payload | app={appId}&data[]={role name 1}&data[]={role name 2}&data[]={role name n} |
Example | curl -b cookies -H "Content-Type: application/x-www-form-urlencoded" -X POST -d 'app=889602a2-c38f-4135-887d-2f7549ceee1d&data[]=Application/app-1&data[]=admin' http://localhost:9763/store/apis/enterprise/perform/uninstall/role |
Sample Response | HTTP/1.1 200 OK Content-Type: application/json |
- Install to given users
Description | Installs the app to the given users. |
URI | http://localhost:9763/store/apis/enterprise/perform/install/user |
HTTP Methods | POST |
Content type | application/x-www-form-urlencoded |
Payload | app={appId}&data[]={user name 1}&data[]={role name 2}&data[]={user name n} |
Example | curl -b cookies -H "Content-Type: application/x-www-form-urlencoded" -X POST -d 'app=889602a2-c38f-4135-887d-2f7549ceee1d&data[]=user1&data[]=admin' http://localhost:9763/store/apis/enterprise/perform/install/user |
Sample Response | HTTP/1.1 200 OK Content-Type: application/json |
- Uninstall from given users
Description | Uninstalls the app from the given users. |
URI | http://localhost:9763/store/apis/enterprise/perform/uninstall/user |
HTTP Methods | POST |
Content type | application/x-www-form-urlencoded |
Payload | app={appId}&data[]={user name 1}&data[]={role name 2}&data[]={user name n} |
Example | curl -b cookies -H "Content-Type: application/x-www-form-urlencoded" -X POST -d 'app=889602a2-c38f-4135-887d-2f7549ceee1d&data[]=user1&data[]=admin' http://localhost:9763/store/apis/enterprise/perform/uninstall/user |
Sample Response | HTTP/1.1 200 OK Content-Type: application/json |
JAX-RS APIs
Get Application List
Description | Retrieves the mobile app list from the given tenant domain. A combination of optional query parameters can be used to sort and paginate the list. | ||||||||||||||||||||
Authentication | Basic Auth | ||||||||||||||||||||
URI | http://localhost:9763/api/v1/apps/mobile/list/tenant/{tenantDomain} | ||||||||||||||||||||
HTTP Methods | GET | ||||||||||||||||||||
Query Params |
| ||||||||||||||||||||
Example |
curl -X GET "http://localhost:9763/api/v1/apps/mobile/list/tenant/carbon.super" --user admin:admin
curl -X GET "http://localhost:9763/api/v1/apps/mobile/list/tenant/carbon.super?search=sample" --user admin:admin
curl -X GET "http://localhost:9763/api/v1/apps/mobile/list/tenant/carbon.super?search=sample&platform=android&limit=5&offset=0" --user admin:admin | ||||||||||||||||||||
Sample Response | HTTP/1.1 200 OK Content-Type: application/json {"apps":[{"iconImage":"http://localhost:9763/publisher/api/mobileapp/getfile/YTZenjMYmSUxOIl.jpg","identifier":"http://webapp.com","version":"1","platform":"webapp","name":"Sample webapp","id":"96e71b11-9e2a-4e68-8ec4-f99b6d30cd45","type":"webapp"},{"iconImage":"http://localhost:9763/publisher/api/mobileapp/getfile/nDwq0WNEBPiYLyp.jpg","identifier":"com.avtobiografia.rimichka","version":"1.0","platform":"android","packageName":"com.avtobiografia.rimichka","name":"android app","id":"098c9c11-9b1f-476d-a5cf-79dc2be75f64","type":"enterprise"}],"query":{"found":2,"limit":0,"total":2,"offset":0}} |
Get subscribed apps list
By role
By username
Description
Retrieves the subscribed app list from the given tenant domain for the given username.
URI
http://localhost:9763/api/v1/apps/mobile/subscriptions/tenant/{tenantDomain}/user/{userName}
Authentication
Basic Auth
HTTP Methods
GET
Example
curl -X GET "http://localhost:9763/api/v1/apps/mobile/subscriptions/tenant/carbon.super/user/admin" --user admin:admin
Sample Response
HTTP/1.1 200 OK
Content-Type: application/json
[{"iconImage":"http://localhost:9763/publisher/api/mobileapp/getfile/nDwq0WNEBPiYLyp.jpg","identifier":"com.avtobiografia.rimichka","version":"1.0","platform":"android","packageName":"com.avtobiografia.rimichka","name":"android app","location":"http://localhost:9763/publisher/api/mobileapp/getfile/9KHwfJZ3x2WQCMT.apk","id":"098c9c11-9b1f-476d-a5cf-79dc2be75f64","type":"enterprise"},{"iconImage":"http://localhost:9763/publisher/api/mobileapp/getfile/YTZenjMYmSUxOIl.jpg","identifier":"http://webapp.com","version":"1","platform":"webapp","name":"Sample webapp","location":"http://webapp.com","id":"96e71b11-9e2a-4e68-8ec4-f99b6d30cd45","type":"webapp"}]
Install (subscribe) apps
For a specific user
Description
Installs the given apps list for the given user for the given tenant.
URI
http://localhost:9763/api/v1/apps/mobile/subscribe/tenant/{tenantDomain}/user/{username}
HTTP Methods
POST
Content type
application/json
Payload
["app id1","app id2"]
Example
curl -H "Content-Type: application/json" -X POST -d '["96e71b11-9e2a-4e68-8ec4-f99b6d30cd45","098c9c11-9b1f-476d-a5cf-79dc2be75f64"]' http://localhost:9763/api/v1/apps/mobile/subscribe/tenant/carbon.super/user/admin --user admin:admin
Sample Response
HTTP/1.1 200 OK
Content-Type: application/json
[{"iconImage":"http://localhost:9763/publisher/api/mobileapp/getfile/YTZenjMYmSUxOIl.jpg","identifier":"http://webapp.com","version":"1","platform":"webapp","name":"Sample webapp","location":"http://webapp.com","id":"96e71b11-9e2a-4e68-8ec4-f99b6d30cd45","type":"webapp"},{"iconImage":"http://localhost:9763/publisher/api/mobileapp/getfile/nDwq0WNEBPiYLyp.jpg","identifier":"com.avtobiografia.rimichka","version":"1.0","platform":"android","packageName":"com.avtobiografia.rimichka","name":"android app","location":"http://localhost:9763/publisher/api/mobileapp/getfile/9KHwfJZ3x2WQCMT.apk","id":"098c9c11-9b1f-476d-a5cf-79dc2be75f64","type":"enterprise"}]
For a specific role
Description
Installs the given apps list for the given role for the given tenant.
URI
http://localhost:9763/api/v1/apps/mobile/subscribe/tenant/{tenantDomain}/role/{rolename}
HTTP Methods
POST
Content type
application/json
Payload
["app id1","app id2"]
Example
curl -H "Content-Type: application/json" -X POST -d '["96e71b11-9e2a-4e68-8ec4-f99b6d30cd45","098c9c11-9b1f-476d-a5cf-79dc2be75f64"]' http://localhost:9763/api/v1/apps/mobile/subscribe/tenant/carbon.super/role/admin --user admin:admin
Sample Response
HTTP/1.1 200 OK
Content-Type: application/json
[{"iconImage":"http://localhost:9763/publisher/api/mobileapp/getfile/YTZenjMYmSUxOIl.jpg","identifier":"http://webapp.com","version":"1","platform":"webapp","name":"Sample webapp","location":"http://webapp.com","id":"96e71b11-9e2a-4e68-8ec4-f99b6d30cd45","type":"webapp"},{"iconImage":"http://localhost:9763/publisher/api/mobileapp/getfile/nDwq0WNEBPiYLyp.jpg","identifier":"com.avtobiografia.rimichka","version":"1.0","platform":"android","packageName":"com.avtobiografia.rimichka","name":"android app","location":"http://localhost:9763/publisher/api/mobileapp/getfile/9KHwfJZ3x2WQCMT.apk","id":"098c9c11-9b1f-476d-a5cf-79dc2be75f64","type":"enterprise"}]
Uninstall (unsubscribe) apps
From a specific user
Description
Uninstalls the given apps list from a given user for a given tenant.
URI
http://localhost:9763/api/v1/apps/mobile/unsubscribe/tenant/{tenantDomain}/user/{username}
HTTP Methods
POST
Content type
application/json
Payload
["app id1","app id2"]
Example
curl -H "Content-Type: application/json" -X POST -d '["96e71b11-9e2a-4e68-8ec4-f99b6d30cd45","098c9c11-9b1f-476d-a5cf-79dc2be75f64"]' http://localhost:9763/api/v1/apps/mobile/unsubscribe/tenant/carbon.super/user/admin --user admin:admin
Sample Response
HTTP/1.1 200 OK
Content-Type: application/json
[{"iconImage":"http://localhost:9763/publisher/api/mobileapp/getfile/YTZenjMYmSUxOIl.jpg","identifier":"http://webapp.com","version":"1","platform":"webapp","name":"Sample webapp","location":"http://webapp.com","id":"96e71b11-9e2a-4e68-8ec4-f99b6d30cd45","type":"webapp"},{"iconImage":"http://localhost:9763/publisher/api/mobileapp/getfile/nDwq0WNEBPiYLyp.jpg","identifier":"com.avtobiografia.rimichka","version":"1.0","platform":"android","packageName":"com.avtobiografia.rimichka","name":"android app","location":"http://localhost:9763/publisher/api/mobileapp/getfile/9KHwfJZ3x2WQCMT.apk","id":"098c9c11-9b1f-476d-a5cf-79dc2be75f64","type":"enterprise"}]
From a specific role
Description
Uninstalls the given apps list from a given role for a given tenant.
URI
http://localhost:9763/api/v1/apps/mobile/unsubscribe/tenant/{tenantDomain}/role/{roleName}
HTTP Methods
POST
Content type
application/json
Payload
["app id1","app id2"]
Example
curl -H "Content-Type: application/json" -X POST -d '["96e71b11-9e2a-4e68-8ec4-f99b6d30cd45","098c9c11-9b1f-476d-a5cf-79dc2be75f64"]' http://localhost:9763/api/v1/apps/mobile/unsubscribe/tenant/carbon.super/role/admin --user admin:admin
Sample Response
HTTP/1.1 200 OK
Content-Type: application/json
[{"iconImage":"http://localhost:9763/publisher/api/mobileapp/getfile/YTZenjMYmSUxOIl.jpg","identifier":"http://webapp.com","version":"1","platform":"webapp","name":"Sample webapp","location":"http://webapp.com","id":"96e71b11-9e2a-4e68-8ec4-f99b6d30cd45","type":"webapp"},{"iconImage":"http://localhost:9763/publisher/api/mobileapp/getfile/nDwq0WNEBPiYLyp.jpg","identifier":"com.avtobiografia.rimichka","version":"1.0","platform":"android","packageName":"com.avtobiografia.rimichka","name":"android app","location":"http://localhost:9763/publisher/api/mobileapp/getfile/9KHwfJZ3x2WQCMT.apk","id":"098c9c11-9b1f-476d-a5cf-79dc2be75f64","type":"enterprise"}]