app-market/upload
An app to upload.
POST
Upload an app (an APK or IPA file) to the policy console.
Use this resource to upload an app without any confirmation response from the client. If you upload an APK or IPA file with the same package name of an APK or IPA file already in the policy console, the file you choose overwrites the old one.
If you want to explicitly confirm an upload before overwriting another file with the same package name, use POST app-market/upload-no-replace.
Parameters
Parameter | Description |
---|---|
File | Required. The binary data for the APK or IPA file you want to upload. The APK or IPA must be sent as raw multipart data, not as a URL. In cURL, for example, use the --data-binary option to send the APK or IPA file: curl --data-binary @file_name -L -b c.txt -c c.txt \ where file_name is the path and filename for your APK or IPA file and servername is your policy console server. |
filename | Optional. The name to give the APK or IPA file. When you download the secured app from the policy console with GET app-market/{GUID}/apk or POST app-market/export-for-codesigning, this is the default filename. Unlike most other POST parameters, filename must be appended to the URL in your request. Example value: com.qwe.superapp.apk |
Example request
Request
curl --data-binary @file_name -v -L -b c.txt -c c.txt -X \
POST https://bc.qwe.com/mocana-app-control/rest/app-market/upload?filename=com.qwe.superapp.apk
Response
{
"message": "",
"status": "OK",
"upload_info": {
"app_id": "3cae6656-4b4e-4739-8a15-d3bf1d70d00b",
"app_isnew": true,
"icon_url": "https://bc.qwe.com:443/mocana-app-control/rest/files/9b770662-3105-482d-8ec3-e797724b5f50",
"name": "Adobe Reader",
"package_name": "com.adobe.reader"
}
}