api:iptv:device:logdashboard:logsovertime
Table of Contents
API : IPTV : Device : Log : Dashboard : Logs Over Time
Introduction
This request will return hourly counts of logged events, broken down by device type, for the selected period. It is intended to feed a time-series chart: a shared list of hourly labels plus one dataset per device type. The result may optionally be scoped to a single customer and/or a single device type. Buckets are always one hour wide and computed in server local time (Europe/Copenhagen).
Request
| URL | https://api.telecomx.dk/iptv/device/log/dashboard/logsovertime | |
|---|---|---|
| Method | GET | |
| Access level | RESELLER_ADMIN with employee feature TV ADMIN |
|
| Query | from | [required] Start of the period. Normalized to the start of the day (00:00:00.000) in server local time. |
| to | [required] End of the period. Normalized to the end of the day (23:59:59.999) in server local time. Must be on or after from, and the period may not span more than 7 days. |
|
| customerId | [optional] Limit the result to a single customer (id of the customer). |
|
| type | [optional] Limit the result to a single device type. One of: STB, IOS, ANDROID, ANDROIDTV, APPLETV, WEB. When set, a single dataset is returned; otherwise all device types are returned. |
|
Query example
https://api.telecomx.dk/iptv/device/log/dashboard/logsovertime?from=2020-01-01T00:00:00.000Z&to=2020-01-07T23:59:59.999Z&customerId=12345678901234567890ABCD&type=STB
Response
| JSON object | ||
|---|---|---|
| labels | Array | Hourly labels covering the period, formatted YYYY-MM-DD HH:00 in server local time. Hours in the future are not included. |
| datasets | Array | List of datasets, one per device type. |
| datasets[].type | String | Device type the dataset represents (STB, IOS, ANDROID, ANDROIDTV, APPLETV or WEB). |
| datasets[].lineColor | String | Suggested chart line color for the type, as an rgb() string. |
| datasets[].fillColor | String | Suggested chart fill color for the type, as an rgba() string. |
| datasets[].data | Array | Event count per hour. Same length and order as labels (index i corresponds to labels[i]). |
Note that properties holding no value may be omitted from the object.
Example
{ "labels": [ "2020-01-01 00:00", "2020-01-01 01:00", "2020-01-01 02:00" ], "datasets": [ { "type": "STB", "lineColor": "rgb(31, 119, 180)", "fillColor": "rgba(31, 119, 180, 0.2)", "data": [42, 17, 8] }, { "type": "IOS", "lineColor": "rgb(127, 127, 127)", "fillColor": "rgba(127, 127, 127, 0.2)", "data": [3, 0, 1] }, { ... } ] }
Errors
| Error code | Message | Description |
|---|---|---|
| 422 | invalid_data | Invalid or missing query parameter (e.g. bad date, from after to, or a period spanning more than 7 days) |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/iptv/device/logdashboard/logsovertime.txt · Last modified: by Mikkel Frederiksen