User Tools

Site Tools


api:flexcare:appwhitelist:update

API : FlexCare : App whitelist : Update

Introduction

This will update a whitelisted app.

This whitelist is used to determine which apps can be assigned to a tablet profile.

Releases (APK versions) cannot be changed through this endpoint. Use the Create release, Update release and Delete release endpoints instead.

Request

All body fields are optional — send only the fields you want to change (the update is merged onto the existing app). At least one field must be sent.

URL https://api.telecomx.dk/flexcare/appwhitelist/APP_ID
Method POST
Access level ADMIN, or RESELLER admin with the TV employee feature
Param APP_ID Unique id (ObjectId) of the app
body packageName String [optional] Android package name for the app
name String [optional] App name
description String [optional] App description
icon ObjectId [optional] Id of the icon image (null to clear)
iconUrl String [optional] Default icon url, used for having a default icon for tablet profile (null to clear)
private Boolean [optional] Should be set if app is not in an app store
whitelistOnly Boolean [optional] True if app should not be installed nor validated for correct version
autoUpdateDefault Boolean [optional] Used to tell the automatic version fetcher that it should move the default flag to the newest version when one is found
androidTV Boolean [optional] Used to tell the automatic version fetcher that it should find the Android TV version of the application
minimumVersion Number [optional] Minimum build version wanted
customerWhitelist Array [optional] Array of customer IDs (ObjectIds). If the list is empty, then the app is allowed to be added to all tablet profiles. If it's not empty, then the customers added to this list are the only ones allowed to use this app. Note that if a reseller is added to this list, then all of their customers are also allowed to access this app.

apks is not accepted. If sent, it is ignored and the app's releases are left unchanged. Use the release endpoints to add, change or remove releases.

Query examples

https://api.telecomx.dk/flexcare/appwhitelist/1234567890ABCD1234567890

Body example

{
  name: "MaraFUN",
  autoUpdateDefault: true,
  customerWhitelist: [
    "7234567890ABCD1234567890"
  ]
}

Response

The full app is returned, reflecting the merged changes. apks is sorted by versionCode with the highest (newest) first.

JSON object
_id ObjectId Unique id of the app
packageName String Android package name
name String App name
description String App description
icon ObjectId Id of the icon image (null if none)
iconUrl String Icon URL (as stored; it is not derived from icon). May be null.
private Boolean Should be set if app is not in an app store
whitelistOnly Boolean True if app should not be installed nor validated for correct version
autoUpdateDefault Boolean Used to tell the automatic version fetcher that it should move the default flag to the newest version when one is found
androidTV Boolean Used to tell the automatic version fetcher that it should find the Android TV version of the application
minimumVersion Number Minimum build version wanted
apks Array List of APKs for different versions of this app, sorted by versionCode with the highest (newest) first
apks[]._id ObjectId Unique object id of the APK
apks[].version String App version
apks[].versionCode Number Android version code (build number)
apks[].default Boolean True if this is chosen as the default version of the app
apks[].minAndroidVersion Number Minimum Android version required for this APK
apks[].file ObjectId File id of the APK (null if none)
apks[].notes String Release notes for this version
apks[].releaseDate Date Date the version was added
apks[].bundle Array Array of files from apk bundle
apks[].bundle[].file ObjectId Unique id of the bundle file
apks[].bundle[].url String Url where file is located
customerWhitelist Array Array of customer IDs (ObjectIds). If the list is empty, then the app is allowed to be added to all tablet profiles. If it's not empty, then the customers added to this list are the only ones allowed to use this app. Note that if a reseller is added to this list, then all of their customers are also allowed to access this app.

Example

{
  _id: "ABCDEF1234567890ABCDEF12",
  packageName: "com.fitnessapps.marafun",
  name: "MaraFUN",
  description: "",
  icon: "1234567890ABCD1234567890",
  iconUrl: "https://fitnessapps.com/img/marafun200x200.png",
  private: false,
  whitelistOnly: false,
  autoUpdateDefault: true,
  androidTV: false,
  minimumVersion: 0,
  apks: [
    {
      _id: "1234567890ABCD1234657890",
      version: "1.0",
      versionCode: 100,
      default: true,
      minAndroidVersion: 8,
      file: "4434567890ABCD1234567980",
      notes: "",
      releaseDate: "2025-02-17T14:28:00.372Z",
      bundle: []
    }
  ],
  customerWhitelist: [
    "7234567890ABCD1234567890"
  ]
}

Errors

Error code Message Description
422 id Invalid app id (must be a 24-character hex ObjectId).
422 <field> Invalid body field (e.g. packageName, icon, iconUrl, minimumVersion, customerWhitelist).
400 bad_request No properties to update. The body contained none of the updatable fields.
403 access_denied Insufficient access level, or the reseller admin lacks the TV employee feature.
404 id App not found
500 internal_error <Unspecified>
api/flexcare/appwhitelist/update.txt · Last modified: by Mikkel Frederiksen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki