||
Skip to end of metadata
Go to start of metadata

Note that the contents on this page are deprecated. Click https://docs.wso2.com/display/APPM120/app-manager/store for the recommended list of 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://localhost:9763/store/apis/user/login

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

http://localhost:9763/store/apis/user/logout

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://localhost:9763/store/apis/user/register

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

http://localhost:9763/store/apis/user/exists

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

In order to access this API, you need to provide the user credentials of an admin user (a user who has been assigned the 'admin' role) for basic authentication. Invoking the login API is not required for this API.

Description

Retrieves the details of the app specified with the name and the version.
{app-type} -> webapp/mobileapp/site

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

In order to access this API, you need to provide the user credentials of an admin user (a user who has been assigned the 'admin' role) for basic authentication. Invoking the login API is not required for this API.

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

In order to access this API, you need to provide the user credentials of an admin user (a user who has been assigned the 'admin' role) for basic authentication. Invoking the login API is not required for this API.

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

In order to access this API, you need to provide the user credentials of an admin user (a user who has been assigned the 'admin' role) for basic authentication. Invoking the login API is not required for this API.

Description

Retrieves the details of all the apps created by a given provider name.
{app-type} -> webapp/mobileapp/site

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

In order to access this API, you need to provide the user credentials of an admin user (a user who has been assigned the 'admin' role) for basic authentication. Invoking the login API is not required for this API.

Description

Retrieves the details of apps under the given pagination range (app details in between the app count).
{app-type} -> webapp/mobileapp/site

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

DescriptionSubscribes to a web application.
URIhttp://localhost:9763/store/resources/webapp/v1/subscription/app
URL ParametersapiName=<webapp-name>&apiVersion=<webapp-version>&apiTier=<tier>&subscriptionType=<Subscription Type>&apiProvider=<webapp-provider>&appName=DefaultApplication
HTTP MethodsPOST
Examplecurl -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

DescriptionUnsubscribes to a web application.
URIhttp://localhost:9763/store/resources/webapp/v1/unsubscription/app
URL ParametersapiName=<webapp-name>&apiVersion=<webapp-version>&apiTier=<tier>&subscriptionType=<Subscription Type>&apiProvider=<webapp-provider>&appName=DefaultApplication
HTTP MethodsPOST
Examplecurl -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

DescriptionRetrieves details of all subscribers of a particular webapp.
URIhttp://localhost:9763/store/resources/webapp/v1/subscriptions/{providerName}/{webappName}/
HTTP MethodsGET
Example curl -b cookies http://localhost:9763/store/resources/webapp/v1/subscriptions/admin/HelloWorld/v1.0.0

Get subscription details of a given user

DescriptionRetrieves subscription details of a given user.
URI

http://localhost:9763/store/resources/webapp/v1/subscription/{username}

HTTP MethodsGET
Example

curl -b cookies  http://localhost:9763/store/resources/webapp/v1/subscription/admin

Get all tags in the App Store

DescriptionRetrieves 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.
URIhttp://localhost:9763/store/apis/tag/{app-type}
HTTP MethodsGET
Examplecurl -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://localhost:9763/store/apps/devices/uninstall

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://localhost:9763/store/apis/enterprise/get-devices

HTTP Methods

GET

Example

curl -b cookies -X GET  http://localhost:9763/store/apis/enterprise/get-devices

Sample Response

HTTP/1.1 200 OK

[{"id" : "11", "platform" : "android", "model" : "Nexus", "platform_version" : "5.0", "name" : "My Nexus", "image" : "/store/extensions/assets/mobileapp/resources/models/nexus.png", "type" : "phone"}, {"id" : "12", "platform" : "ios", "model" : "iPhone", "platform_version" : "8.0", "name" : "My iPhone", "image" : "/store/extensions/assets/mobileapp/resources/models/iphone.png", "type" : "phone"}]

  • Get roles

Description

Retrieves the list of roles.

URI

http://localhost:9763/store/apis/enterprise/get-all-roles

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

{"aaData" : [["admin"], ["Application/app-1"], ["Application/app1-1"], ["Application/appeng-eng.com-1"]]}

  • Get users

Description

Retrieves the user list.

URI

http://localhost:9763/store/apis/enterprise/get-all-users

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

{"aaData" : [["admin"], ["user1"]]}

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
{"status" : "success"}

  • 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
{"status" : "success"}

  • 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
{"status" : "success"}

  • 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
{"status" : "success"}

JAX-RS APIs

In order to access these APIs, you need to provide the user credentials of an admin user (a user who has been assigned the 'admin' role) for basic authentication. Invoking the login API is not required for these 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

Name

Description

Required

Type

search

Get the apps list of given name

False

String

platform

Get the app list of given platform

False

String

limit

Number of records to be displayed

False

number

offset

Offset of the app list

False

number

Example

  1. Get list of all the apps

curl -X GET "http://localhost:9763/api/v1/apps/mobile/list/tenant/carbon.super" --user admin:admin   

  1. Get apps containing the text “sample” in its name

curl -X GET "http://localhost:9763/api/v1/apps/mobile/list/tenant/carbon.super?search=sample" --user admin:admin

  1. Get five android apps containing the text “sample” in their name

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 
  1. By role

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

 

  1. 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"}]

  2. 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
  1. 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"}]

  2. 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"}]

  • No labels