api:iptv:tabletprofile:copy
Table of Contents
API : IPTV : Tablet profiles : Copy
Introduction
This will copy an existing 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/iptv/tabletprofile/TABLET_PROFILE_ID/copy | ||
|---|---|---|---|
| Method | POST | ||
| Access level | MANAGER, OWNER, RESELLER if customer has feature FLEXCARE RESELLER_ADMIN, ADMIN |
||
| Params | TABLET_PROFILE_ID | Id of the tablet profile (24 hex-char string) | |
| Body | name | String | Name of the tablet profile |
| customer | ObjectId | Unique id of new customer for tablet profile | |
Query examples
https://api.telecomx.dk/iptv/tabletprofile/60894a2f80515c5918292e31/copy
Response
| JSON object | ||
|---|---|---|
| _id | ObjectId | Unique ID for the profile |
| name | String | Name of the tablet profile |
| customer | ObjectId | Unique ID of customer that owns the profile |
| rowSpacing | Integer | Vertical distance between apps in pixels |
| horizontalTopSpacing | Integer | Distance between logo in the top left and clock in the top right (Only for here historical reasons, is put on pages individually) |
| topRowSpacing | Integer | Distance from apps to the top border of the screen (Only for here historical reasons, is put on pages individually) |
| powerButton | Boolean | True if the power button is visible, false if not |
| externalPowerOff | Boolean | True if the power button calls an external app instead of powering off (is used as a sort of standby) |
| deviceType | String (enum) | Can either be 'ANDROID_TABLET' or 'ANDROID_BOX' |
| mdm | String (enum) | Which MDM (mobile device management system) is used with this tablet profile. Can be 'FLEXCARE', 'MOBILE_IRON', 'SCALEFUSION', or 'AIRWATCH' |
| battery | Boolean | True if the tablet profile is meant for devices that are battery-driven |
| useLegacy | Boolean | True if the tablet profile is made before the new designer |
| webViewWifiButton | Object | Settings for the wifi button placed in web views, on tablets that don't use PoE |
| webViewWifiButton.active | Boolean | True if wifi button is visible |
| webViewWifiButton.topSpacing | Integer | Distance from top border in pixels |
| webViewWifiButton.leftSpacing | Integer | Distance from left border in pixels |
| webViewWifiButton.rightSpacing | Integer | Distance from right border in pixels |
| hotspot | Object | Hotspot settings |
| hotspot.active | Boolean | True if hotspot is enabled |
| hotspot.url | String | URL of hotspot page to redirect to |
| hotspot.checkUrl | String | URL to check if the tablet has wifi |
| apps | Array | List of apps that this tablet profile. This is used to determine which version and which apps the users of this tablet profile has, and which apps will be installed on the tablet |
| apps[]._id | Id | Package ID of the app, e.g 'com.skype.android'. |
| apps[].version | String | Version number of the app. If null, it will use the latest version. |
| apps[].locked | Boolean | The property is set to true if a user manually adds an app to a tablet profile. It is false in case that the app is added dynamically, because an app is used on a button. Apps with locked set to false will be removed from the list, in case the app is no longer used in the tablet profile. |
| apps[].install | Boolean | True if FlexMDM should try to install the app. False if the app should merely be whitelisted on the device, but FlexMDM will not try to install it (in case multiple MDMs are used on a device) |
| pages | Array | List of pages that the profile has. |
| Page | Object | Contains page specific properties, and a list of buttons for the given page |
|---|---|---|
| name | String | Name for the page, to make it easier to differentiate |
| background | String | URL to a background image |
| clockColor | String | Hex-color for the clock |
| leftSpacing | Integer | Distance from left border of the screen |
| rowSpacing | Integer | Vertical distance between apps in pixels |
| horizontalTopSpacing | Integer | Distance between logo in the top left and clock in the top right |
| topRowSpacing | Integer | Distance from apps to the top border of the screen |
| buttons | Array | Array of the buttons for this page |
| clock | Object | Contains properties concerning the clock on each page. |
| clock.x | Number | X coordinate |
| clock.y | Number | Y.coordinate |
| clock.fontSize | Number | Font size |
| clock.enabled | Boolean | If true, then the clock is visible on the current page |
| power | Object | Contains properties concerning the power button on each page. |
| power.width | Number | Width of power button |
| power.height | Number | Height of power button |
| Button | Object | The buttons that make up the layout of the tablet |
|---|---|---|
| row | Integer | Row that the button is positioned in |
| position | Integer | Position that the button has in its row |
| fontSize | Number | Font size of button label |
| label | String | Button label, shown below icon |
| labelColor | String | Hex-formatted text color for the label |
| enabled | Boolean | True if button is active and visible |
| type | Enum | Determines the functionality of the button. “PAGE” jumps to another page with a page number, “NAMED_PAGE goes to a page with a name (TV, RADIO, etc), “APP” opens an app installed on the device, and “WEBVIEW” opens a web view with a given url. “MODULE” “PAGE”, “APP”, “VIDEO”, or “WEBVIEW” |
| value | String | The value of the button, used together with type. If the type is a page, it will be a page number. If the type is an app, it will be an app name (package name). If the type is webview or video, it will be an URL. |
| clearAppData | Boolean | True if the app data (cache, logins, etc) will be deleted when the app is closed |
| appId | Number | App ID, used for Pinfo apps. |
| mqtt | Object | Properties for the button's mqtt settings |
| mqtt.function | Enum | Defines what type of mqtt button it is. “concierge”, “slider”, “controller”, “toggle”, “info” |
| mqtt.cardBackgroundColor | String | Background of the whole card |
| mqtt.cardCornerRadius | String | Corner radius of card |
| mqtt.infoTextFontColor | String | Color of info text |
| mqtt.infoTextFontSize | Number | Font size of info text |
| mqtt.stateIconOn | ObjectId | File id of icon |
| mqtt.stateIconOff | ObjectId | File id of icon |
| mqtt.stateIconWidth | Number | Width of “stateIcon” |
| mqtt.stateIconHeight | Number | Height of “stateIcon” |
| mqtt.valuePrefix | String | Value to show before value from mqtt broker |
| mqtt.valuePostfix | string | Value to show after value from mqtt broker |
| mqtt.incrementIcon | ObjectId | File id to icon |
| mqtt.incrementIconWidth | Number | Width of “incrementIcon” |
| mqtt.decrementIcon | ObjectId | File id to icon |
| mqtt.decrementIconWidth | Number | Width of “decrementIcon” |
| mqtt.sliderIcon | ObjectId | id of icon file for the slider |
| mqtt.sliderIconWidth | Number | Width of given slider icon |
| mqtt.sliderIconHeight | Number | Height of given slider icon |
| mqtt.sliderColor | String | Color of selected area of slider |
| mqtt.sliderWidth | Number | Width of slider |
| mqtt.sliderCornerRadius | Number | Border radius of slider |
| mqtt.sliderBackgroundColor | String | Background color of slider |
| mqtt.sliderAngle | Enum | Angle of slider. 0, 90, -90, 180 |
| mqtt.minValue | Number | Minimum value of slider |
| mqtt.maxValue | Number | Max value of slider |
| mqtt.steps | Number | Step value of slider |
| mqtt.conciergeImageWidth | Number | Width of “conciergeImage” |
| mqtt.conciergeImageHeight | Number | Height of “conciergeImage” |
| mqtt.subscribeValueType | Enum | Whether to use a simple/raw value to save on mqtt broker or to save a “json” object “raw”, “json” |
| mqtt.subscribeTemplate | String | Json template if subscribeValueType is “json” |
| mqtt.subscribeTopic | String | Path to where device is located on mqtt broker |
| mqtt.subscribeDevice | String | Device name on mqtt broker |
| mqtt.jsonSubsribeOnValue | String | Value that is set when type is “toggle” and value is on |
| mqtt.jsonSubscribeOffValue | String | Value that is set when type is “toggle” and value is off |
| mqtt.rawSubscribeOnValue | String | Value that is set when function is “toggle” and subscribeValueType “raw” and value is “on” |
| mqtt.rawSubscribeOffValue | String | Value that is set when function is “toggle” and subscribeValueType “raw” and value is “off” |
| mqtt.publishValueType | Enum | Whether to use a simple/raw value to save on mqtt broker or to save a “json” object “raw”, “json” |
| mqtt.publishTemplate | String | Json template if publishValueType is “json” |
| mqtt.publishTopic | String | Path to where device is located on mqtt broker |
| mqtt.publishDevice | String | Device name on mqtt broker |
| mqtt.jsonPublishOnValue | String | Value that is set when type is “toggle” and value is on |
| mqtt.jsonPublishOffValue | String | Value that is set when type is “toggle” and value is off |
| mqtt.rawPublishOnValue | String | Value that is set when function is “toggle” and publishValueType “raw” and value is “on” |
| mqtt.rawPublishOffValue | String | Value that is set when function is “toggle” and publishValueType “raw” and value is “off” |
| Icon | Object | Properties for the button/app icon |
| icon.url | String | URL for the image |
| icon.image | String | Object ID of image |
| icon.width | Integer | Width of the image |
| icon.height | Integer | Width of the image |
| icon.hoverIcon | String | [optional] Alternate icon if user is hovering (using keyboard or fly mouse) |
Example - normal
{ _id: '1234567890ABCDEFGHIJKLMN', name: 'Main profile', customer '2345678901ABCDEFGHIJKLMN', rowSpacing: 60, horizontalTopSpacing: 30, topRowSpacing: 20, powerButton: false, externalPowerOff: false, deviceType: 'ANDROID_TABLET', mdm: 'FLEXCARE', battery: false, 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, topRowSpacing: 20, clock: { x: 20, y: 40, fontSize: 13, enabled: true }, 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: 13, 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, clock: { x: 20, y: 40, fontSize: 13, enabled: true }, buttons: [{ row: 0, position: 0, fontSize: 13, 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: 13, 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, horizontalTopSpacing: 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, horizontalTopSpacing: 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 |
| 404 | id | Tablet profile not found |
| 500 | internal_error | <Unspecified> |
api/iptv/tabletprofile/copy.txt · Last modified: 2024/11/19 08:50 by Mikkel Frederiksen