User Tools

Site Tools


api:iptv:app:heartbeat

API : IPTV : App : Heartbeat

Introduction

This request is used by the Android tablets, to report tablet statistics to the server. Telecom X responds with a list of actions for the tablet to perform.

Request

URL https://api.telecomx.dk/iptv/app/heartbeat
Method POST
Body token String Session token for authentication
cpuUsage String [optional] CPU usage of device
wifiLinkSpeed Number [optional] Wi-Fi link speed
wifiSignalStrength Number [optional] Wi-Fi signal strength
freeMemory Number [optional] Available RAM from 0-100 (percentage)
uptime Number [optional] Uptime in seconds
remoteRtt Number [optional] Average round trip time in milliseconds between the STB and the streaming servers.
remotePacketLoss Number [optional] Packet loss percentage between the STB and the streaming servers.
batteryState Number [optional] How much battery is left - only relevant for battery devices
chargingState Boolean [optional] Whether the device is charging or not - only relevant for battery devices
place String [optional] Which app, or sub-section of an app, that is currently open
awakeState Boolean [optional] Whether the device is currently awake or standby
turnedOff Boolean [optional] If true, the device is turning off, and sending this heartbeat just before turning off.
interactions Number [optional] Interactions on the device since last heartbeat.
temperatureZones String [optional] Comma-separated list of temperature values for the device. Each value is a number.
noEvents Boolean [optional] If true, will not remove the events from the tablet's queue, but will still return them. Used to only report statistics, but not perform actions on the tablet.
appStatus Object  [optional] Application object containing info about installed applications on device
appStatus.<PACKAGE_NAME> Object  Application from device
appStatus.<PACKAGE_NAME>.name String  Name of application
appStatus.<PACKAGE_NAME>.versionCode Number  Build version number from application
appStatus.<PACKAGE_NAME>.versionName String Version of application ex. “2.0.4”
appStatus.<PACKAGE_NAME>.installed Boolean  Whether app is installed or not

Query examples

https://api.telecomx.dk/iptv/app/heartbeat

Response

Array of actions to perform.

Action object
type String Type of action to perform - see Action for types.
date Number Timestamp - when the request was created.
type = MESSAGE
message  String  Text message
notify  String/Number  possible values ['SOUND', 'READ', 0]. Defines if and how user is notified when receiving message
repeat  Boolean  True if said notify should be repeated every 90 seconds until duration is over
duration  Number Defines how long a message should show up on device
type = START_APP or UPDATE_APP
app String Android package name (type START_APP and UPDATE_app only)
type = START_APP
includeToken Boolean True if launcher sends token when starting app (type START_APP only)
includeDeviceId Boolean True if launcher sends device id when starting app (type START_APP only)
includeTechnicalRoomNumber Boolean True if launcher sends technical room number when starting app (type START_APP only)
type = UPDATE_APP
version String Android package version (type UPDATE_APP only)
type = VIDEO
video String Video url (type VIDEO only)

Example

[
  {
    type: 'MESSAGE',
    message: 'We need to reboot your box'
    date: 149465756
  },
  {
    type: 'REBOOT',
    date: 149465758
  },
  {
    type: 'START_APP',
    date: 123975990,
    app: 'com.android.raider',
    includeToken: true,
    includeDeviceId: true,
    includeTechnicalRoomNumber: false
  },
  {
   type: 'UPDATE_APP',
   date: 123868998,
   app: 'dr.ramasjang.dk',
   version: '19.31.3'
  },
  {
   type: 'MESSAGE',
   date: 123868998,
   message: 'App is now updated',
   duration: 12345678,
   notify: 'SOUND',
   repeat: true
  },
  {
   type: 'MESSAGE',
   date: 123868998,
   message: 'Lunch is ready at 12:00',
   notify: 0,
   duration: 0,
   repeat: false
  }
]

Errors

403 access_denied Insufficient access level
403 mac Mac not authorized
403 mac Device not enabled
403 customer Customer not active
403 portal Portal not found
500 internal_error <Unspecified>
api/iptv/app/heartbeat.txt · Last modified: 2025/03/04 08:09 by Gudni Sigurdsson

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki