V3 > Statistics

Viewers per media.

Get the number of viewers for the provided media list.

get/2/vod/statistics/{channel}/media/viewers

Path parameters

channelinteger required

The Channel unique identifier

Query parameters

fromstring nullable

<note><strong>Date</strong>: any accepted <a href="https://www.php.net/manual/fr/datetime.formats.date.php" target="_blank">PHP date format</a></note> <note><strong>Timestamp</strong>: a Timestamp</note> <note><strong>Time interval</strong>: a positive or negative interval with pattern: <pre>/+|-\d+[YyMdhims]/</pre>

<table> <thead> <tr> <td>symbol</td> <td>description</td> </tr> </thead> <tbody> <tr> <td>Y|y</td> <td>Year</td> </tr> <tr> <td>M</td> <td>Month</td> </tr> <tr> <td>d</td> <td>Day</td> </tr> <tr> <td>h</td> <td>Hour</td> </tr> <tr> <td>i|m</td> <td>Minute</td> </tr> <tr> <td>s</td> <td>Second</td> </tr> </tbody> </table> </note>
Example:+10d
mediastring required

A list of items, (either comma separated or as an array) (no duplicates) with the following rules: <note><bold>1</bold>: Identifier of an existing Media</note>

Example:1jhvl2upwoctc,1jhvl2upwoctc,1jhvl2upwoctc
tostring nullable

<note><strong>Date</strong>: any accepted <a href="https://www.php.net/manual/fr/datetime.formats.date.php" target="_blank">PHP date format</a></note> <note><strong>Timestamp</strong>: a Timestamp</note> <note><strong>Time interval</strong>: a positive or negative interval with pattern: <pre>/+|-\d+[YyMdhims]/</pre>

<table> <thead> <tr> <td>symbol</td> <td>description</td> </tr> </thead> <tbody> <tr> <td>Y|y</td> <td>Year</td> </tr> <tr> <td>M</td> <td>Month</td> </tr> <tr> <td>d</td> <td>Day</td> </tr> <tr> <td>h</td> <td>Hour</td> </tr> <tr> <td>i|m</td> <td>Minute</td> </tr> <tr> <td>s</td> <td>Second</td> </tr> </tbody> </table> </note>
Example:+10d
topinteger nullable

Limit the response size to the top N results.

Response

OK

result'success' | 'error' | 'asynchronous' required

Result of the HTTP request

Example response

{
  "result": "success",
  "data": [
    {
      "id": "1jhvl2upzafkt",
      "name": "my product",
      "thumbnail": "https://api.vod2.infomaniak.com/2/vod/res/thumbnails/1jijk01u18kf3.jpg",
      "viewers": 200,
      "viewing_time": 60,
      "consumption": 1000,
      "unique_viewers": 10
    }
  ]
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.