User Tools

Site Tools


api:flexcare:tabletprofile:create

API : FlexCare : Tablet profile : Create

Introduction

This will create a tablet profile.

A tablet profile is a configuration for a tablet's launcher, which can be shared by many tablets.

Request

URL https://api.telecomx.dk/flexcare/tabletprofile
Method POST
Access level MANAGER, OWNER, RESELLER if customer has feature FLEXCARE
ADMIN
Body
{
    battery: Boolean,
    customer: ObjectId,
    groups: Array<ObjectId>,
    deviceType: String<'ANDROID_TABLET', 'ANDROID_BOX'>,
    mdm: String<'FLEXCARE', 'AIRWATCH', 'MOBILE_IRON', 'SCALEFUSION'>,
    mdmConfig?: ObjectId | null,
    mqttBrokerId?: ObjectId | null,
    name: String,
    powerButton: Boolean,
    lock: {
        activation: String<'OFF', 'ALWAYS', 'MANUAL'>,
        x: Number,
        y: Number
    },
    logo: {
        enabled: Boolean,
        height: Number,
        width: Number,
        image: ObjectId | null,
        useDefault: Boolean,
        margin: {
            top: Number,
            left: Number
        }
    },
    version?: {
        color: String,
        fontSize: Number,
        x: Number,
        y: Number
    },
    volumeBoost: {
        enabled: Boolean,
        level: Number<0, 1000, 2000, 3000>
    },
    apps: [
        {
            _id: String,
            install: Boolean,
            locked: Boolean,
            version: String | null
        }
    ],
    pages: [
        {
            useDefaultBackground: Boolean,
            background?: ObjectId | null,
            clockColor: String,
            name: String,
            clock: {
                enabled: Boolean,
                fontSize: Number,
                x: Number,
                y: Number
            },
            power: {
                height: Number,
                width: Number,
                x: Number,
                y: Number,
                image?: ObjectId | null
            },
            buttons: [
                {
                    _id?: ObjectId,
                    buttonId: String,
                    clearAppData: Boolean,
                    enabled: Boolean,
                    fontSize: Number,
                    includeDeviceId: Boolean,
                    includeTechnicalRoomNumber: Boolean,
                    includeToken: Boolean,
                    label: String,
                    labelColor: String,
                    showBottomMenu: Boolean,
                    showNavigationBar: Boolean,
                    type: String<'APP', 'WEBVIEW', 'MQTT', 'WIDGET', 'PAGE', 'INFOPAGE', 'VIDEOLIST', 'INFOCOLLECTION', 'LINKCOLLECTION', 'WAVECARE', 'VIDEO', 'TV', 'RADIO', 'NAMED_PAGE'>,
                    useStats: Boolean,
                    value: String,
                    x: Number,
                    y: Number,
                    icon: {
                        image?: ObjectId | null,
                        height: Number,
                        width: Number
                    },
                    mqtt?: {
                        cardBackgroundColor: String,
                        cardCornerRadius: Number,
                        conciergeImageHeight: Number,
                        conciergeImageWidth: Number,
                        decrementIcon?: ObjectId | null,
                        decrementIconWIdth: Number,
                        function: String<'concierge', 'slider', 'toggle', 'controller', 'info'>,
                        incrementIcon?: ObjectId | null,
                        incrementIconWidth: Number,
                        infoTextFontColor: String,
                        infoTextFontSize: Number,
                        jsonPublishOffValue: String,
                        jsonPublishOnValue: String,
                        jsonSubscribeOffValue: String,
                        jsonSubscribeOnValue: String,
                        jsonSubscribeValueField: String,
                        maxValue: Number,
                        minValue: Number,
                        publishDevice: String,
                        publishTemplate: String,
                        publishTopic: String,
                        publishValueType: String<'json', 'raw', 'concierge'>,
                        rawPublishOffValue: String,
                        rawPublishOnValue: String,
                        rawSubscribeOffValue: String,
                        rawSubscribeOnValue: String,
                        serviceId?: ObjectId | null,
                        sliderAngle: Number<-90, 0, 90, 180>,
                        sliderBackgroundColor: String,
                        sliderColor: String,
                        sliderCornerRadius: Number,
                        sliderIcon?: ObjectId | null,
                        sliderIconHeight: Number,
                        sliderIconWidth: Number,
                        sliderWidth: Number,
                        stateIconHeight: Number,
                        stateIconWidth: Number,
                        stateIconOff?: ObjectId | null,
                        stateIconOn?: ObjectId | null,
                        steps: Number,
                        subscribeDevice: String,
                        subscribeTopic: String,
                        subscribeValueType: String<'json', 'raw', 'concierge'>,
                        valuePostfix: String,
                        valuePrefix: String
                    }
                }
            ]
        }
    ]
}

Query examples

https://api.telecomx.dk/iptv/tabletprofile

Response

{
    _id: ObjectId,
    battery: Boolean,
    customer: ObjectId,
    groups: Array<ObjectId>,
    deviceType: String<'ANDROID_TABLET', 'ANDROID_BOX'>,
    mdm: String<'FLEXCARE', 'AIRWATCH', 'MOBILE_IRON', 'SCALEFUSION'>,
    mdmConfig?: ObjectId | null,
    mqttBrokerId?: ObjectId | null,
    name: String,
    powerButton: Boolean,
    lock: {
        activation: String<'OFF', 'ALWAYS', 'MANUAL'>,
        x: Number,
        y: Number
    },
    logo: {
        enabled: Boolean,
        height: Number,
        width: Number,
        image: ObjectId | null,
        useDefault: Boolean,
        margin: {
            top: Number,
            left: Number
        }
    },
    version?: {
        color: String,
        fontSize: Number,
        x: Number,
        y: Number
    },
    volumeBoost: {
        enabled: Boolean,
        level: Number<0, 1000, 2000, 3000>
    },
    apps: [
        {
            _id: String,
            install: Boolean,
            locked: Boolean,
            version: String | null
        }
    ],
    pages: [
        {
            useDefaultBackground: Boolean,
            background?: ObjectId | null,
            clockColor: String,
            name: String,
            clock: {
                enabled: Boolean,
                fontSize: Number,
                x: Number,
                y: Number
            },
            power: {
                height: Number,
                width: Number,
                x: Number,
                y: Number,
                image?: ObjectId | null
            },
            buttons: [
                {
                    _id?: ObjectId,
                    buttonId: String,
                    clearAppData: Boolean,
                    enabled: Boolean,
                    fontSize: Number,
                    includeDeviceId: Boolean,
                    includeTechnicalRoomNumber: Boolean,
                    includeToken: Boolean,
                    label: String,
                    labelColor: String,
                    showBottomMenu: Boolean,
                    showNavigationBar: Boolean,
                    type: String<'APP', 'WEBVIEW', 'MQTT', 'WIDGET', 'PAGE', 'INFOPAGE', 'VIDEOLIST', 'INFOCOLLECTION', 'LINKCOLLECTION', 'WAVECARE', 'VIDEO', 'TV', 'RADIO', 'NAMED_PAGE'>,
                    useStats: Boolean,
                    value: String,
                    x: Number,
                    y: Number,
                    icon: {
                        image?: ObjectId | null,
                        height: Number,
                        width: Number
                    },
                    mqtt?: {
                        cardBackgroundColor: String,
                        cardCornerRadius: Number,
                        conciergeImageHeight: Number,
                        conciergeImageWidth: Number,
                        decrementIcon?: ObjectId | null,
                        decrementIconWIdth: Number,
                        function: String<'concierge', 'slider', 'toggle', 'controller', 'info'>,
                        incrementIcon?: ObjectId | null,
                        incrementIconWidth: Number,
                        infoTextFontColor: String,
                        infoTextFontSize: Number,
                        jsonPublishOffValue: String,
                        jsonPublishOnValue: String,
                        jsonSubscribeOffValue: String,
                        jsonSubscribeOnValue: String,
                        jsonSubscribeValueField: String,
                        maxValue: Number,
                        minValue: Number,
                        publishDevice: String,
                        publishTemplate: String,
                        publishTopic: String,
                        publishValueType: String<'json', 'raw', 'concierge'>,
                        rawPublishOffValue: String,
                        rawPublishOnValue: String,
                        rawSubscribeOffValue: String,
                        rawSubscribeOnValue: String,
                        serviceId?: ObjectId | null,
                        sliderAngle: Number<-90, 0, 90, 180>,
                        sliderBackgroundColor: String,
                        sliderColor: String,
                        sliderCornerRadius: Number,
                        sliderIcon?: ObjectId | null,
                        sliderIconHeight: Number,
                        sliderIconWidth: Number,
                        sliderWidth: Number,
                        stateIconHeight: Number,
                        stateIconWidth: Number,
                        stateIconOff?: ObjectId | null,
                        stateIconOn?: ObjectId | null,
                        steps: Number,
                        subscribeDevice: String,
                        subscribeTopic: String,
                        subscribeValueType: String<'json', 'raw', 'concierge'>,
                        valuePostfix: String,
                        valuePrefix: String
                    }
                }
            ]
        }
    ]
}

Example - normal

  {
      _id: '1234567890ABCDEFGHIJKLMN',
      name: 'Main profile',
      customer '2345678901ABCDEFGHIJKLMN',
      rowSpacing: 60,
      horizontalTopSpacing: 30,
      topRowSpacing: 20,
      powerButton: false,
      externalPowerOff: false,
      deviceType: 'ANDROID_TABLET',
      mdm: 'SCALEFUSION',
      battery: true,
      useLegacy: true,
      webViewWifiButton: {
        active: true,
        topSpacing: 20,
        leftSpacing: 20,
        rightSpacing: 35
      },
      hotspot: {
        active: true,
        url: 'https://hotspot.hospitalnorth.dk',
        checkUrl: 'https://google.dk'
      },
      pages: [{
          background: '#FFAABB',
          clockColor: '#000000',
          leftSpacing: 20,
          rowSpacing: 20,
          clock: {
              x: 20,
              y: 40,
              fontSize: 14,
              enabled: true
          }
          topRowSpacing: 20,
          horizontalTopSpacing: 20,
          buttons: [{
              row: 0,
              position: 0,
              fontSize: 13,
              label: 'TV',
              labelColor: '#FFFFFF',
              type: 'NAMED_PAGE',
              value: 'tv',
              clearAppData: false,
              icon: {
                url: 'https://placeholder.com/img/tv.png',
                width: 20,
                height: 30,
                hoverIcon: 'https://placeholder.com/img/tv_hover.png'
              }
            },
            {
              row: 0,
              position: 1,
              fontSize: 14,
              label: 'RADIO',
              labelColor: '#FFFFFF',
              type: 'NAMED_PAGE',
              value: 'radio',
              clearAppData: false,
              icon: {
                url: 'https://placeholder.com/img/radio.png',
                width: 20,
                height: 30,
                hoverIcon: 'https://placeholder.com/img/radio_hover.png'
              }
            }
          ]
        },
        {
          background: '#1ECCBB',
          clockColor: '#000000',
          leftSpacing: 20,
          rowSpacing: 20,
          topRowSpacing: 20,
          horizontalTopSpacing: 20,
          clock: {
              x: 20,
              y: 40,
              fontSize: 14,
              enabled: false
          }
          buttons: [{
              row: 0,
              position: 0,
              fontSize: 20,
              label: 'Skype',
              labelColor: '#FFFFFF',
              type: 'APP',
              value: 'com.skype',
              clearAppData: false,
              icon: {
                url: 'https://placeholder.com/img/skype.png',
                width: 20,
                height: 30,
                hoverIcon: 'https://placeholder.com/img/skype_hover.png'
              }
            },
            {
              row: 0,
              position: 1,
              fontSize: 16,
              label: 'Chess',
              labelColor: '#FFFFFF',
              type: 'app',
              value: 'com.chess_fun',
              clearAppData: false,
              icon: {
                url: 'https://placeholder.com/img/chess.png',
                width: 20,
                height: 30,
                hoverIcon: 'https://placeholder.com/img/chess_hover.png'
              }
            }
          ]
        }
      ]
    },
    {
      _id: '1234567890ABCDEFGHIJKLMN',
      name: 'Ambulance profile',
      customer '2345678901ABCDEFGHIJKLMN',
      rowSpacing: 60,
      horizontalTopSpacing: 30,
      topRowSpacing: 20,
      powerButton: false,
      externalPowerOff: false,
      webViewWifiButton: {
        active: true,
        topSpacing: 20,
        leftSpacing: 20,
        rightSpacing: 35
      },
      hotspot: {
        active: true,
        url: 'https://hotspot.hospitalnorth.dk',
        checkUrl: 'https://google.dk'
      },
      pages: [{
          background: '#FFAABB',
          clockColor: '#000000',
          leftSpacing: 20,
          rowSpacing: 20,
          topRowSpacing: 20,
          buttons: [{
              row: 0,
              position: 0,
              label: 'TV',
              labelColor: '#FFFFFF',
              type: 'NAMED_PAGE',
              value: 'tv',
              clearAppData: false,
              icon: {
                url: 'https://placeholder.com/img/tv.png',
                width: 20,
                height: 30,
                hoverIcon: 'https://placeholder.com/img/tv_hover.png'
              }
            },
            {
              row: 0,
              position: 1,
              label: 'RADIO',
              labelColor: '#FFFFFF',
              type: 'NAMED_PAGE',
              value: 'radio',
              clearAppData: false,
              icon: {
                url: 'https://placeholder.com/img/radio.png',
                width: 20,
                height: 30,
                hoverIcon: 'https://placeholder.com/img/radio_hover.png'
              }
            }
          ]
        },
        {
          background: '#1ECCBB',
          clockColor: '#000000',
          leftSpacing: 20,
          rowSpacing: 20,
          topRowSpacing: 20,
          buttons: [{
              row: 0,
              position: 0,
              label: 'Skype',
              labelColor: '#FFFFFF',
              type: 'APP',
              value: 'com.skype',
              clearAppData: false,
              icon: {
                url: 'https://placeholder.com/img/skype.png',
                width: 20,
                height: 30,
                hoverIcon: 'https://placeholder.com/img/skype_hover.png'
              }
            },
            {
              row: 0,
              position: 1,
              label: 'Chess',
              labelColor: '#FFFFFF',
              type: 'app',
              value: 'com.chess_fun',
              clearAppData: false,
              icon: {
                url: 'https://placeholder.com/img/chess.png',
                width: 20,
                height: 30,
                hoverIcon: 'https://placeholder.com/img/chess_hover.png'
              }
            }
          ]
        }
      ]
    }

Errors

Error code Message Description
403 access_denied Insufficient access level
403 customer Customer does not have required feature
403 button.value The app is not whitelisted for this customer
422 button.position Button has the same row and position as another button
422 button.value Button has reference to a page that does not exist
500 internal_error <Unspecified>
api/flexcare/tabletprofile/create.txt · Last modified: 2025/12/05 10:59 by Mikkel Frederiksen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki