Marketplace

marketplace.App

Estimated reading: 8 minutes 538 views
Namespace: Marketplace
REST: https://[hoster-api-host]/1.0/marketplace/app/rest/{method-name}
Scripting: marketplace.app.{method-name}
The App service implements a flexible mechanism for users to view and install applications and add-ons from the Marketplace. Additionally, it allows adding and managing personal JPS manifest to the Marketplace (will be visible for the corresponding user only).

Methods

AddApp (appid, session, manifest ) :

Adds the user’s personal JPS manifest to the Marketplace (will be visible for the current user only).

URL

https://[hoster-api-host]/1.0/marketplace/app/rest/addapp

Parameters

  • appid : “string”

    unique identifier of the application for which the session was created (optional).

  • session : “string”
  • manifest : “string”

    custom personal JPS (manifest body or link) to be added.

Example

Method: POST

https://[hoster-api-host]/1.0/marketplace/app/rest/addapp?session=[string]&manifest=[string]&appid=[string]

Response

  • AddAppResponse
    {
       "app_id": "string",
       "error": "string",
       "response": "Object",
       "result": "int"
    }
    

DeleteApp (appid, session, id ) :

Deletes the user’s personal JPS manifest from the Marketplace.

URL

https://[hoster-api-host]/1.0/marketplace/app/rest/deleteapp

Parameters

  • appid : “string”

    unique identifier of the application for which the session was created (optional).

  • session : “string”

    user session or personal access token.

  • id : “string”

    unique identifier of the target personal JPS manifest in the Marketplace..

Example

Method: POST

https://[hoster-api-host]/1.0/marketplace/app/rest/deleteapp?session=[string]&appid=[string]&id=[string]

Response

  • Response
    {
       "error": "string",
       "response": "Object",
       "result": "int"
    }
    

EditApp (appid, session, id, manifest ) :

Adjusts the user’s personal JPS manifest in the Marketplace.

URL

https://[hoster-api-host]/1.0/marketplace/app/rest/editapp

Parameters

  • appid : “string”
    unique identifier of the application for which the session was created (optional).
  • session : “string”
    user session or personal access token.
  • id : “string”
    unique identifier of the target personal JPS manifest in the Marketplace.
  • manifest : “string”
    updated personal JPS (manifest body or link).

Example

Method: POST https://[hoster-api-host]/1.0/marketplace/app/rest/editapp?session=[string]&manifest=[string]&appid=[string]&id=[string]

Response

  • Response
    {
       "error": "string",
       "response": "Object",
       "result": "int"
    }
    

GetAddonList (envName, session, [nodeGroup], [search], [lang] ) :

Returns information about available add-ons (including already installed ones) for the specified environment or node group.

URL

https://[hoster-api-host]/1.0/marketplace/app/rest/getaddonlist

Parameters

  • envName : “string”

    target environment name.

  • session : “string”

    user session or personal access token.

  • nodeGroup : “string” (optional)

    unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.

  • search : “string” (optional)

    JSON object with the search parameters. For example (all fields are optional):

    {
     "name": "string | string[]",
     "isPrivate": "boolean",
     "isFavorite": "boolean",
     "app_id": "string | string[]",
     "nodeType": "string",
     "nodeGroup": "string",
     "dockerOs": "string",
     "guestOSType": "string",
     "dockerName": "string",
     "dockerTag": "string"
    }
  • lang : “string” (optional)

    target localization language.

Example

Method: POST

https://[hoster-api-host]/1.0/marketplace/app/rest/getaddonlist?search=[string]&envName=[string]&session=[string]&lang=[string]&nodeGroup=[string]

Response

  • AppsListResponse
    {
       "apps": "JSONArray",
       "error": "string",
       "response": "Object",
       "result": "int",
       "total": "int"
    }
    

GetAppInfo (appid, session, id, [lang], [ownerUid] ) :

Returns information about the specified application from the Marketplace.

URL

https://[hoster-api-host]/1.0/marketplace/app/rest/getappinfo

Parameters

  • appid : “string”

    unique identifier of the application for which the session was created (optional).

  • session : “string”

    user session or personal access token.

  • id : “string”

    unique identifier of the target JPS manifest in the Marketplace.

  • lang : “string” (optional)

    target localization language.

  • ownerUid : “int” (optional)

    unique identifier of the target user account.

Example

Method: POST

https://[hoster-api-host]/1.0/marketplace/app/rest/getappinfo?session=[string]&appid=[string]&id=[string]&lang=[string]&ownerUid=[int]

Response

  • AppInfoResponse
    {
       "app": "JSONObject",
       "error": "string",
       "response": "Object",
       "result": "int",
       "settings": "JSONObject"
    }
    

GetCategories (appid, session ) :

Returns information about available application categories in the Marketplace.

URL

https://[hoster-api-host]/1.0/marketplace/app/rest/getcategories

Parameters

  • appid : “string”

    unique identifier of the application for which the session was created (optional).

  • session : “string”

    user session or personal access token.

Example

Method: POST

https://[hoster-api-host]/1.0/marketplace/app/rest/getcategories?session=[string]&appid=[string]

Response

  • Response
    {
       "error": "string",
       "response": "Object",
       "result": "int"
    }
    

GetChecksum (appid, session ) :

Returns the current checksum of the Marketplace applications.

URL

https://[hoster-api-host]/1.0/marketplace/app/rest/getchecksum

Parameters

  • appid : “string”

    unique identifier of the application for which the session was created (optional).

  • session : “string”

    user session or personal access token.

Example

Method: POST

https://[hoster-api-host]/1.0/marketplace/app/rest/getchecksum?session=[string]&appid=[string]

Response

  • ChecksumResponse
    {
       "checksum": "string",
       "error": "string",
       "response": "Object",
       "result": "int"
    }
    

GetList (appid, session, [search], [lang], [checksum] ) :

Returns information about applications available in the Marketplace for the current user.

URL

https://[hoster-api-host]/1.0/marketplace/app/rest/getlist

Parameters

  • appid : “string”

    unique identifier of the application for which the session was created (optional).

  • session : “string”

    user session or personal access token.

  • search : “string” (optional)

    JSON object with the search parameters. For example (all fields are optional):

    {
     "name": "string | string[]",
     "isPrivate": "boolean",
     "isFavorite": "boolean",
     "category": "string | string[]",
     "app_id": "string | string[]",
     "jpsType": "string",
     "nodeType": "string",
     "nodeGroup": "string",
     "dockerOs": "string",
     "guestOSType": "string",
     "dockerName": "string",
     "dockerTag": "string",
     "count": "number",
     "offset": "number"
    }
  • lang : “string” (optional)

    target localization language.

  • checksum : “string” (optional)

    checksum of the Marketplace applications (to verify that you possess the most recent checksum and applications copy). If you send the same ‘checksum’ parameter as received in the previous response and if this ‘checksum’ hasn’t changed on the server side, then the server assumes you have the latest local copy of applications on the client side. In this case, it will return an empty applications list, speeding up the response time.

Example

Method: POST

https://[hoster-api-host]/1.0/marketplace/app/rest/getlist?search=[string]&session=[string]&appid=[string]&checksum=[string]&lang=[string]

Response

  • AppsListResponse
    {
       "apps": "JSONArray",
       "error": "string",
       "response": "Object",
       "result": "int",
       "total": "int"
    }
    

Install (appid, session, id, [envName], [settings], [displayName], [region], [envGroups], [ownerUid], [nodes], [overrideNodes], [skipEmail], [skipNodeEmails] ) :

Installs one of the applications available in the Marketplace.

URL

https://[hoster-api-host]/1.0/marketplace/app/rest/install

Parameters

  • appid : “string”

    unique identifier of the application for which the session was created (optional).

  • session : “string”

    user session or personal access token.

  • id : “string”

    unique identifier of the target JPS manifest in the Marketplace.

  • envName : “string” (optional)

    target environment name.

  • settings : “string” (optional)

    JSON object with custom settings for the JPS manifest.

  • displayName : “string” (optional)

    custom alias (display name) for the deployed application.

  • region : “string” (optional)

    target environment region.

  • envGroups : “string” (optional)

    target environment group name or JSON array of group names.

  • ownerUid : “int” (optional)

    unique identifier of the target user account.

  • nodes : “string” (optional)

    JSON object with a list of environment nodes and their settings. Considered for ‘jpsType: install’ only.

  • overrideNodes : “boolean” (optional)

    defines whether to override (true) or merge (false) nodes from the ‘nodes’ parameter with the nodes specified in the manifest.

  • skipEmail : “boolean” (optional)

    defines whether to send email after the successful installation (false) or not (true).

  • skipNodeEmails : “boolean” (optional)

    defines whether to send emails after the new nodes creation (false) or not (true).

Example

Method: POST

https://[hoster-api-host]/1.0/marketplace/app/rest/install?settings=[string]&envGroups=[string]&session=[string]&displayName=[string]&skipNodeEmails=[boolean]&nodes=[string]&skipEmail=[boolean]&envName=[string]&appid=[string]&overrideNodes=[boolean]&id=[string]&region=[string]&ownerUid=[int]

Response

  • InstallResponse
    {
       "action": "string",
       "appid": "string",
       "data": "JSONObject",
       "error": "string",
       "message": "string",
       "reason": "string",
       "response": "Object",
       "result": "int",
       "startPage": "string",
       "successText": "string",
       "type": "string",
       "uniqueName": "string"
    }
    

InstallAddon (envName, session, id, [settings], [nodeGroup], [skipEmail] ) :

Installs one of the add-ons available for the specified environment.

URL

https://[hoster-api-host]/1.0/marketplace/app/rest/installaddon

Parameters

  • envName : “string”

    target environment name.

  • session : “string”

    user session or personal access token.

  • id : “string”

    unique identifier of the target JPS manifest in the Marketplace.

  • settings : “string” (optional)

    JSON object with custom settings for the JPS manifest.

  • nodeGroup : “string” (optional)

    unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.

  • skipEmail : “boolean” (optional)

    defines whether to send email after the successful installation (false) or not (true).

Example

Method: POST

https://[hoster-api-host]/1.0/marketplace/app/rest/installaddon?settings=[string]&skipEmail=[boolean]&envName=[string]&session=[string]&id=[string]&nodeGroup=[string]

Response

  • InstallResponse
    {
       "action": "string",
       "appid": "string",
       "data": "JSONObject",
       "error": "string",
       "message": "string",
       "reason": "string",
       "response": "Object",
       "result": "int",
       "startPage": "string",
       "successText": "string",
       "type": "string",
       "uniqueName": "string"
    }
    

Leave a Comment