This request will queue an action to be performed on a device. Actions can only be performed on device of type STB or Android tablets.
An action will be carried out when it is scheduled (using when) or immediately if not scheduled, within a timeframe of +/- 1 minute.
STB actions may be sent as either GET or POST. Android tablet (app) actions must be sent as POST with a JSON body.
| URL | https://api.telecomx.dk/iptv/device/DEVICE_ID/action | ||||
|---|---|---|---|---|---|
| Method | GET or POST | ||||
| Access level | STB: MANAGER or OWNER if customer has feature IPTVBUSINESS STB: RESELLER if customer has IPTVBUSINESS or IPTVPRIVATE ANDROID tablet: requires write access to the customer's FLEXCARE feature ADMIN |
||||
| Params | DEVICE_ID | Id of the device to perform the action on. | |||
| Query | 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) | |||
| MANAGEMENT | ADMIN | Setup remote management on the STB. (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 | ALL | Opens a given app (ANDROID only). | |||
| UPDATE_APP | ADMIN | Updates a given app to the given version (ANDROID only). | |||
| UPDATE_ALL | ADMIN | Update all installed apps on the tablet (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 tablet (ANDROID only). |
|||
| LOCK | RESELLER | Locks the tablet (ANDROID only). | |||
| UNLOCK | RESELLER | Unlocks the tablet (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). | |||
| port | Number | Management port to connect to (type MANAGEMENT only). | |||
| js | String | Javascript code to run. (type JS only). | |||
| firmware | String | Override for the default firmware URL (type FIRMWARE only, ADMIN 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. |
|||
| 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). | |||
| app | String | Name of the package to open/update (type START_APP or UPDATE_APP only). | |||
| version | String | Version of the package to update to (type UPDATE_APP only). | |||
| adbCommandId | ObjectId | Id of the FlexCare ADB command to run (type COMMAND only, ANDROID). | |||
| securityUpdateURL | String | URL of the security update to download and apply (type SECURITY_UPDATE only, ANDROID). | |||
| 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. | |||
https://api.telecomx.dk/iptv/device/12345678901234567890AAAA/action?type=MESSAGE&message=Lunch%20is%20ready. https://api.telecomx.dk/iptv/device/12345678901234567890AAAA/action?type=VIDEO&message=Watch%20this%20video&video=https%3A%2F%2Fsome.host.dom%2Fpath%2Fvideo.mp4 https://api.telecomx.dk/iptv/device/12345678901234567890AAAA/action?type=PLAYCHANNEL&channel=1234578901234567890ABCD https://api.telecomx.dk/iptv/device/12345678901234567890AAAA/action?type=SWITCH_OFF https://api.telecomx.dk/iptv/device/12345678901234567890AAAA/action?type=CHANNELS https://api.telecomx.dk/iptv/device/12345678901234567890AAAA/action?type=UI https://api.telecomx.dk/iptv/device/12345678901234567890AAAA/action?type=REBOOT https://api.telecomx.dk/iptv/device/12345678901234567890AAAA/action?type=DVB https://api.telecomx.dk/iptv/device/12345678901234567890AAAA/action?type=SCREENSHOT https://api.telecomx.dk/iptv/device/12345678901234567890AAAA/action?type=SPEEDTEST https://api.telecomx.dk/iptv/device/12345678901234567890AAAA/action?type=MANAGEMENT&port=1024 https://api.telecomx.dk/iptv/device/12345678901234567890AAAA/action?type=SCRIPT&script=https%3A%2F%2Fsome.host.dom%2Fpath%2Fscript
Android tablet (app) actions must be sent as POST with a JSON body, e.g. running a FlexCare ADB command:
POST https://api.telecomx.dk/iptv/device/12345678901234567890AAAA/action { type: "COMMAND", adbCommandId: "1234567890ABCD1234567890" }
| JSON object | ||
|---|---|---|
| success | Boolean | True on success. |
| id | Id | Id of the request (STB devices). |
| _id | Id | Id of the request (ANDROID tablets). |
{ success: true, id: '12345678901234567890ABCD' }
ANDROID tablet response:
{ success: true, _id: '12345678901234567890ABCD' }
| Error code | Message | Description |
|---|---|---|
| 404 | id | Not found |
| 400 | method | Only POST requests supported for app actions (ANDROID tablets) |
| 422 | type | Type is invalid |
| 409 | type | The type of action has already been scheduled for the STB, but not yet carried out |
| 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 | port | Port is invalid |
| 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) |
| 422 | version | App version is invalid (type UPDATE_APP) |
| 422 | url | URL is invalid (type SECURITY_UPDATE) |
| 422 | adbCommandId | ADB command id is invalid (type COMMAND) |
| 404 | adbCommandId | ADB command not found (type COMMAND) |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |