Playback statistics and reports
Two sources: /statistic with one record per playback (kept about two months) and /statistic/get-report with hourly totals (kept longer).
The statistic controller exposes playback facts in two ways. GET /statistic returns every playback as a separate record with an exact time and filters by screenA device running the Advision player that shows content; the cabinet calls it a media device., file and playlistA set of files with a playback schedule that is assigned to screens or networks.: it is the backend of the «Statistics» page in the cabinet. GET /statistic/get-report returns hourly totals for charts. Base URL http://api.advision.digital, header Authorization: Bearer $ADV_T. There is no CSV export on the API side.
Method and path | What it does | Important |
|---|---|---|
| Event statistics: one record per playback, | Key |
| Hourly aggregate: | Step is fixed at 1 hour, no per-file breakdown; kept longer than event data |
| Fleet counters: | Not playback statistics, but a quick check that everything is online |
Parameters of /statistic
Parameter | Type | Required | Note |
|---|---|---|---|
| number | no | ScreenA device running the Advision player that shows content; the cabinet calls it a media device. ID; also works as |
| number | no | File ID; also works as |
| number | no | PlaylistA set of files with a playback schedule that is assigned to screens or networks. ID |
|
| yes | Period; |
| number | no | Page size, default 100, verified up to 500; |
| number | no | Page number |
Record field | Meaning |
|---|---|
| Exact playback time, unix UTC |
| Time the event was written to the database, usually 10–20 s later |
| Playback duration in seconds |
| Which clip played |
| On which screenA device running the Advision player that shows content; the cabinet calls it a media device. |
| Within which playlistA set of files with a playback schedule that is assigned to screens or networks. |
| ScreenA device running the Advision player that shows content; the cabinet calls it a media device. channel ( |
| Number of playbacks matching the filter; this is the number of plays of the clip |
Count plays of a clip
Fastest way: itemsPerPage=1 and read total. curl: curl -s -H "Authorization: Bearer $ADV_T" "http://api.advision.digital/statistic?points=<POINT_ID>&files=<FILE_ID>&from=2026-10-01&to=2026-10-07&itemsPerPage=1"
Python: total = c.get("/statistic", params={"points": POINT_ID, "files": FILE_ID, "from": "2026-10-01", "to": "2026-10-07", "itemsPerPage": 1}).json()["total"]
Download the playback log
Page through until you have total records: page = 1; rows = [], then in a loop j = c.get("/statistic", params={**params, "itemsPerPage": 500, "page": page}).json(); rows += j["data"]; page += 1, stopping when len(rows) >= j["total"] or j["data"] is empty. Playback time: datetime.fromtimestamp(int(r["playbackDt"]), timezone.utc). Build the CSV yourself: format=csv and export=1 return the same JSON.
Screen load by hour
curl: curl -s -H "Authorization: Bearer $ADV_T" "http://api.advision.digital/statistic/get-report?instances[]=<POINT_ID>&from=2026-10-01&to=2026-10-07"
Response: a continuous series of {"ts": 1759300000, "shows": 12} with a one-hour step; hours without playback have 0. Detail parameters (interval, step, groupBy, granularity) and the fileId/playlistId filters are ignored: for a per-clip breakdown use /statistic.
What to choose
Task | Endpoint |
|---|---|
How many times a specific clip played |
|
Exact time of every playback |
|
Playback log as CSV |
|
ScreenA device running the Advision player that shows content; the cabinet calls it a media device. load chart or a period older than two months |
|
Any plays on a screenA device running the Advision player that shows content; the cabinet calls it a media device. with | None: statistics are not collected for such a screenA device running the Advision player that shows content; the cabinet calls it a media device. |
How the cabinet counts plays is described in proof of play. These two endpoints give the same numbers as the cabinet report; a mismatch usually means the screenA device running the Advision player that shows content; the cabinet calls it a media device. has not synced or has not sent its statistics.
Related articles
- How-to · 5 minGet a token and make the first requestWhere to create an API token in the cabinet, how to pass it in the Authorization header and verify it with /user/info.
- ReferenceScreens: reading, schedule, statusesEndpoints of the point controller: screen list and card, daily schedule, content assignment, screen capture, device control, networks.
- ConceptHow shows are counted: proof of playA show is one playback of a file on a screen that the player recorded and sent to the server. «By Hours» adds shows into totals, «List» keeps each one separately.
- How-to · 3 minBuild a playback reportPeriod up to 30 days, screens, playlists and files in the filters, the Run report button and the total number of shows in a minute.