api:iptv:stats:archiveandrecording
Table of Contents
API : Archive and recording statistics
Introduction
This request will return archive and recording statistics on base channels. It shows how many users are watching either archive or recordings from a base channel, and how many are watching a specific program.
Request
| URL | https://api.telecomx.dk/iptv/stats/archiveandrecording | |
|---|---|---|
| Method | GET | |
| Access level | ADMIN. | |
Query examples
https://api.telecomx.dk/iptv/stats/archiveandrecording
Response
The response is a JSON array of “baseChannel”-objects, as described below.
| JSON object | ||
|---|---|---|
| stats | Array | Contains details about how many recordings and archive plays there currently are on each archive server |
| stats[]._id | Number | Archive server number (archive1 is 1, archive2 is 2, etc.) |
| stats[].recording | Number | How many are playing recordings from this server |
| stats[].archive | Number | How many are playing recordings from this server |
| baseChannels | Array | Contains baseChannel objects, containing archive and recording statistics for each base channel, see definition below |
| Base channel | ||
| baseChannel | Object | Describes a base channel and which programs are currently viewed as a recording, or from archive |
| baseChannel._id | Number | Base channel number |
| baseChannel.name | String | Name of the base channel |
| baseChannel.archive | Object | Contains archive stats |
| baseChannel.recording | Object | Contains recording stats |
| baseChannel.archiveServers | Array | Contains information about which archive server the content is being played from |
| baseChannel.archiveServers[]._id | Number | Archive server number |
| baseChannel.archiveServers[].total | Number | Amount of viewers |
| Archive/recording stats | ||
|---|---|---|
| baseChannel.<recording/archive>.total | Number | How many viewers are currently watching archive on this base channel |
| baseChannel.<recording/archive>.programs | Array | List of programs that are being watched through archive. Definition is below under “program” |
| baseChannel.<recording/archive> | Array | Contains information about which archive server the content is being played from |
| baseChannel.<recording/archive>[]._id | Number | Archive server number |
| baseChannel.<recording/archive>[].total | Number | Amount of viewers |
| Program | ||
|---|---|---|
| programs[]._id | Object | Contains program stats |
| programs[].total | Number | How many viewers are currently watching archive on this base channel |
| programs[].name | String | Name of program |
Note that properties holding no value may be omitted from the object.
Example - normal
{ "stats": [ { "_id": 1, "recording": 4, "archive": 2 }, { "_id": 2, "recording": 0, "archive": 7 } ], "baseChannels": [ { "_id": 1, "name": "DR 1" "recording": { "total": 13, "programs": [ { "_id": "1_1494160800", "total": 4, "title": "Den Store Bagedyst", "archiveServers": [ { "_id": 1, "total": 3 }, { "_id": 2, "total": 1 } ] }, { "_id": "1_7689416080", "total": 9, "title": "Hammerslag", "archiveServers": [ { "_id": 1, "total": 4 }, { "_id": 2, "total": 5 } ] }, ] }, "archive": { "total": 9, "programs": [ { "_id": "1_1904160800", "total": 7, "titel": "Ørkenens Sønner", "archiveServers": [ { "_id": 5, "total": 4 }, { "_id": 6, "total": 3 } ] }, { "_id": "1_1394160800", "total": 2, "title": "Pirates of the Carribean", "archiveServers": [ { "_id": 4, "total": 0 }, { "_id": 5, "total": 2 } ] }, ] } } ] }
Errors
| Error code | Message | Description |
|---|---|---|
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/iptv/stats/archiveandrecording.txt · Last modified: 2021/05/31 13:11 by Joakim Andersen