Creates a new repository item or updates an existing one. Omit repositoryFileMetaDataID to create; include it to update. The response returns the item's repositoryFileMetaDataID, which you use when adding the item to a profile.
Saving an uploaded Android app (APK): pass the uploadedFileUrl returned by getpresignfinal as fileLocation, and provide the app's identity in properties. For an app item, properties must contain both packageName and versionCode - devices need them to install and later upgrade the app. The server does not extract them from the APK during upload - read them from the APK yourself (for example with the Android SDK's aapt dump badging myapp.apk), or call POST /rest/manager/files/url/metadata with the uploaded file's URL and the server will read them from the APK manifest.
Request example (Android APK):
{
"fileName": "My Sales App (1.2.3).apk",
"fileDesc": "Sales kiosk application",
"fileLocation": "<uploadedFileUrl from getpresignfinal>",
"properties": {
"packageName": "com.example.salesapp",
"versionCode": 10203,
"fileSize": 15728640
}
}Common properties keys:
packageName(string, required for apps) - the Android application ID.versionCode(number, required for apps) - the APK versionCode; devices use it to decide whether an installed app needs upgrading.fileSize(number) - file size in bytes, as returned bygetpresignfinal.iconUserSelected/iconUserSelectedName(string, optional) - base64-encoded PNG icon and its display name, shown in the console.
Updating an existing item (repositoryFileMetaDataID provided): the item is replaced with the request as a whole - fileName, fileDesc, fileLocation, properties, arguments and the flags are all overwritten, so send the complete item (read it first with getrepoitems), not just the changed fields. Keep the same packageName and use a strictly higher versionCode; profiles that contain the item are bumped so devices pick up the change on their next sync. For an app that is already deployed through a profile, prefer saving the new version as a new item and updating the profile via its draft flow (see POST /rest/manager/profiles/createorupdate).
Response example:
{ "result": "SUCCESS", "data": { "repositoryFileMetaDataID": "665f1c2ab77e4a3d9c0e8b12" } }| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
400Bad Request
401Unauthorized
403Forbidden
429Too Many Requests
503Service Unavailable