api:iptv:device:groupaction
Table of Contents
API : IPTV : Device : Group Action
Introduction
This request will perform an action on a group of devices. STB device groups are supported, and Android tablet groups are supported via a POST request with deviceType=ANDROID.
An action will be carried out within 1-60 seconds depending on the type.
If the requested action has already been scheduled for an STB but not yet carried out, it will be skipped for that STB (counted in skipped). This de-duplication applies to STB devices only.
Request
| URL | https://api.telecomx.dk/iptv/device/action | ||||
|---|---|---|---|---|---|
| Method | GET or POST | ||||
| Access level | STB (GET): MANAGER or OWNER if customer has feature IPTVBUSINESS STB (GET): RESELLER if customer has IPTVBUSINESS or IPTVPRIVATE ANDROID tablets (POST, deviceType=ANDROID): RESELLER admin with the TV employee feature ADMIN |
||||
| Query | group | Id | Id of the device group to perform the action on, or ALL or WORLD. | ||
| reseller | Id | If group is ALL, and user is ADMIN, this is the reseller/customer that the devices belongs to. Ignored in all other cases. | |||
| deviceType | String | Set to ANDROID to target Android tablets (group app action, POST only). Omit (or any other value) to target STB devices. | |||
| type | String | Type of action to perform. | |||
| Type | Access | Description | |||
| MESSAGE | ALL | Display a text message. May contain simple HTML. (STB and ANDROID) | |||
| VIDEO | ALL | Show the video as specified in the URL. (STB and ANDROID) | |||
| PLAYCHANNEL | ALL | Switch to the specified TV channel. (STB only) | |||
| SWITCH_OFF | ALL | Turn the STB off. (STB only) | |||
| CHANNELS | ALL | Update the channels list. (STB only) | |||
| UI | ALL | Reload the user-interface. (STB and ANDROID) | |||
| REBOOT | ALL | Reboot the device. (STB and ANDROID) | |||
| DVB | ALL | Update DVB channel configuration. (STB only) | |||
| SCREENSHOT | RESELLER, ADMIN | Take a screenshot of the user-interface. (STB only) | |||
| SPEEDTEST | RESELLER, ADMIN | Perform a speed test, to check the performance of the STB's internet connection. (STB only) | |||
| SCRIPT | ADMIN | Download and run configuration script pointed to by the URL. (STB only) | |||
| JS | ADMIN | Run javascript command in the UI. (STB only) | |||
| FIRMWARE | RESELLER, ADMIN | Initiate an automatic firmware upgrade. (STB only) | |||
| PLAYRADIOCHANNEL | ALL | Play the specified radio channel. (STB only) | |||
| UIDEBUG | ADMIN | Enable the UI debug service. (STB only) | |||
| VOLUME | ALL | Set the volume to the specified level. (STB only) | |||
| EMULATEKEYS | ALL | Emulate pressing keys on the remote control. (STB only) | |||
| START_APP | RESELLER | Opens a given app. App must exist in the whitelist (ANDROID only). | |||
| UPDATE_APP | ADMIN | Updates a given app to the given version. App must exist in the whitelist (ANDROID only). | |||
| UPDATE_ALL | ADMIN | Update all installed apps on the tablets (ANDROID only). | |||
| SECURITY_UPDATE | ADMIN | Download and apply a security update from securityUpdateURL (ANDROID only). |
|||
| COMMAND | ADMIN | Run a predefined FlexCare ADB command (referenced by adbCommandId) on the tablets (ANDROID only). |
|||
| LOCK | RESELLER | Locks the tablets (ANDROID only). | |||
| UNLOCK | RESELLER | Unlocks the tablets (ANDROID only). | |||
| message | String | Message to display (type MESSAGE or VIDEO only). | |||
| video | String | URL of video to play (type VIDEO only). | |||
| channel | String | Id of the TV channel to show (type PLAYCHANNEL only). | |||
| script | String | URL of script to load and run (type SCRIPT only). | |||
| js | String | Javascript code to run. (type JS only). | |||
| firmware | String | Override for the default firmware URL (type FIRMWARE only). | |||
| radiochannel | String | Id of the radio channel to play (type PLAYRADIOCHANNEL only). | |||
| volume | Number | Volume level to set, 0-100 (type VOLUME only). | |||
| debugserver | String | Host and port of the UI debug server, blank for defaults (type UIDEBUG only). | |||
| keys | Array | List of remote control key pressed to emulate. Choose from: NOOP, POWER, MUTE, MIC, CLOCK, NUM1, NUM2, NUM3, NUM4, NUM5, NUM6, NUM7, NUM8, NUM9, NUM0, MENU, BACK, CHANNEL_PREV, CHANNEL_NEXT, EXIT, REFRESH, DELETE, UP, DOWN, LEFT, RIGHT, OK, PAGE_NEXT, PAGE_PREV, NEXT, PREV, VOL_UP, VOL_DOWN, RED, GREEN, YELLOW, BLUE, SERVICES, TV, PHONE, EPG, WEB, APP, REW, FFWD, PLAY, PAUSE, CONTINUE, STOP, REC, INFO, FRAME, AUDIO, NULL, KEYBOARD. |
|||
| app | String | Name/package of the app to open/update. Must exist in the app whitelist (type START_APP or UPDATE_APP, ANDROID). | |||
| version | String | Version to update the package to (type UPDATE_APP, ANDROID). | |||
| adbCommandId | ObjectId | Id of the FlexCare ADB command to run (type COMMAND, ANDROID). | |||
| securityUpdateURL | String | URL of the security update to download and apply (type SECURITY_UPDATE, ANDROID). | |||
| when | Date | Date and time to deliver the request. Null if as soon as possible. | |||
| duration | Number | How long a message should be shown (type MESSAGE only). On ANDROID tablets, 0-172800 seconds (max 48 hours). | |||
| notify | String (enum) | (Type MESSAGE on ANDROID tablets only) Possible values: SOUND, READ; when set the device will either read the message or play a sound. | |||
| repeat | Boolean | (ANDROID tablets, only applicable when notify is set) When true “notify” will be repeated until duration is out. | |||
Query examples
https://api.telecomx.dk/iptv/device/action?group=12345678901234567890AAAA&type=MESSAGE&message=Lunch%20is%20ready. https://api.telecomx.dk/iptv/device/action?group=12345678901234567890AAAA&type=VIDEO&message=Watch%20this%20video&video=https%3A%2F%2Fsome.host.dom%2Fpath%2Fvideo.mp4 https://api.telecomx.dk/iptv/device/action?group=12345678901234567890AAAA&type=PLAYCHANNEL&channel=1234578901234567890ABCD https://api.telecomx.dk/iptv/device/action?group=12345678901234567890AAAA&type=SWITCH_OFF https://api.telecomx.dk/iptv/device/action?group=12345678901234567890AAAA&type=CHANNELS https://api.telecomx.dk/iptv/device/action?group=12345678901234567890AAAA&type=UI https://api.telecomx.dk/iptv/device/action?group=12345678901234567890AAAA&type=REBOOT https://api.telecomx.dk/iptv/device/action?group=12345678901234567890AAAA&type=DVB https://api.telecomx.dk/iptv/device/action?group=12345678901234567890AAAA&type=SCREENSHOT https://api.telecomx.dk/iptv/device/action?group=12345678901234567890AAAA&type=SPEEDTEST https://api.telecomx.dk/iptv/device/action?group=12345678901234567890AAAA&type=SCRIPT&script=https%3A%2F%2Fsome.host.dom%2Fpath%2Fscript
Android tablet group actions must be sent as POST with a JSON body and deviceType=ANDROID, e.g. running a FlexCare ADB command on a group:
POST https://api.telecomx.dk/iptv/device/action { deviceType: "ANDROID", group: "12345678901234567890AAAA", type: "COMMAND", adbCommandId: "1234567890ABCD1234567890" }
Response
| JSON object (STB) | ||
|---|---|---|
| success | Boolean | True on success. |
| devices | Number | Number of devices the action has been scheduled for. |
| skipped | Number | Number of devices the action was skipped for. |
| JSON object (ANDROID) | ||
|---|---|---|
| success | Boolean | True on success. |
| devices | Number | Number of tablets the action was pushed to (0 if no tablet profile uses the given app). |
Example
{ success: true, devices: 23, skipped: 2 }
ANDROID tablet response:
{ success: true, devices: 23 }
Errors
| Error code | Message | Description |
|---|---|---|
| 404 | group | Not found |
| 422 | type | Type is invalid |
| 422 | reseller | Reseller not found (group=ALL as ADMIN, when reseller is missing/invalid) |
| 422 | message | Message is missing (STB) / Message is invalid (ANDROID) |
| 422 | video | Video is missing or URL is invalid (STB) / Video is invalid (ANDROID) |
| 422 | channel | Channel is invalid |
| 422 | data | Data is missing or invalid for the selected type of action (type SCRIPT) |
| 422 | js | Javascript code is missing |
| 422 | firmware | URL is invalid |
| 422 | radiochannel | Channel is invalid |
| 422 | volume | Volume is invalid |
| 422 | debugserver | Invalid server |
| 422 | keys | Invalid key detected |
| 422 | keys | No keys specified |
| 422 | app | App is invalid (type START_APP or UPDATE_APP, ANDROID) |
| 404 | app | App not found in whitelist (type START_APP or UPDATE_APP, ANDROID) |
| 422 | version | App version is invalid (type UPDATE_APP, ANDROID) |
| 422 | url | URL is invalid (type SECURITY_UPDATE, ANDROID) |
| 422 | adbCommandId | ADB command id is invalid (type COMMAND, ANDROID) |
| 404 | adbCommandId | ADB command not found (type COMMAND, ANDROID) |
| 404 | device.group | No devices found in the given group (ANDROID) |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/iptv/device/groupaction.txt · Last modified: by Mikkel Frederiksen