Marketplace

marketplace.Favorite

Estimated reading: 4 minutes 664 views
Namespace: Marketplace
REST: https://[hoster-api-host]/1.0/marketplace/favorite/rest/{method-name}
Scripting: marketplace.favorite.{method-name}
This service manages a list of users’ personal favorite applications. It can be viewed in the “Favorite” category of the Marketplace.

Methods

Add (appid, session, id ) :

Adds a specified application to the user’s personal “Favorite” category in the Marketplace.

URL

https://[hoster-api-host]/1.0/marketplace/favorite/rest/add

Parameters

  • appid : “string”

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

  • session : “string”
  • id : “string”

    unique identifier of the target application.

Example

Method: POST

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

Response

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

AddManifest (appid, session, manifest ) : 

Adds a specified custom JPS manifest to the user’s personal “Favorite” category in the Marketplace.

URL

https://[hoster-api-host]/1.0/marketplace/favorite/rest/addmanifest

Parameters

  • appid : “string”

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

  • session : “string”

    user session or personal access token.

  • manifest : “string”

    custom JPS (manifest body or link).

Example

Method: POST

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

Response

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

Delete (appid, session, id ) :

Removes a specified application from the user’s personal “Favorite” category in the Marketplace.

URL

https://[hoster-api-host]/1.0/marketplace/favorite/rest/delete

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

Example

Method: POST

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

Response

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

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

Returns a list applications in user’s personal “Favorite” category of the Marketplace.

URL

https://[hoster-api-host]/1.0/marketplace/favorite/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[]",
     "categories": "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/favorite/rest/getlist?search=[string]&session=[string]&appid=[string]&checksum=[string]&lang=[string]

Response

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

Leave a Comment