Developer

Deploying Hybrid Apps Using the REST API

Deploy a new or updated hybrid app to SAP Mobile Platform Server using the deploy application REST API.

Once the application is deployed, it is considered to be a new version. You can make it the current version using the promotion REST API. After the application is promoted, users can download a patch to upgrade the application on their devices.

Syntax

Perform a POST request to the following URI:

https://<host>:<admin_port>/Admin/kapsel/jaxrs/KapselApp/{APP_ID}

Parameters

  • file The file that contains the application archive, sent as multipart/form-data.

Returns

A response providing information about the new and current version of the application. For example:
{"newVersion":
  {"requiredKapselVersion":"1.5",
   "developmentVersion":"1.2.5",
   "description":"An update for the sample app.",
   "revision":-1},
 "currentVersion":
  {"requiredKapselVersion":"1.5",
   "developmentVersion":"1.2.4",
   "description":"A sample app.",
   "revision":2}
}

On successful deployment, the client receives a 201 status code; otherwise, an HTTP failure code and message.

Examples

  • Deploy application to all platforms
    curl --user <user>:<password> --cacert <your-server.pem> --form "file=@C:\work\app1.zip" https://localhost:8083/Admin/kapsel/jaxrs/KapselApp/MyTestAppId