Description

In this section you will find a description of how the Stats API works, which metrics are provided and how the aggregations are made. You will also find the explanation of all client errors.

Exposed Metrics

The following list describes the available metrics. All metrics refer to the latest time window:

Name Description
buffer health The amount playback time (milliseconds) that remains on the buffers of all video players.
buffer filling rate The ratio between the playback time and the download time.
connection type The type of the current devices.
content request response time The elapsed time since the players request for content until the first body chunk of the requested content is delivered to the player (milliseconds).
dropped frames The number of dropped frames reported by all players.
operating system The name of the operating systems of all devices.
platform The name of the platforms of the current devices.
rebuffering The ratio between the rebuffering duration and the actual duration of video played.
throughput The amount of data downloaded during the reporting window.

API key

Every endpoint of the Stats API is authenticated via API key. The API key must be sent as an HTTP header in each request.

Authorization: <API key here>

This API key is specific for the Stats API. Each user is limited to a finite number of requests per second which depends on its customer plan. The API key to be used is labelled as APIS and you will find it in the corresponding section of the Dashboard. For more information, please contact support.

Available Filters

Source

Some endpoints can be filtered by source, this means choosing between CDN or peer-to-peer data.

Examples:

http://example.com/api/v3/stats/throughput/agg?source=cdn
http://example.com/api/v3/stats/throughput/agg?source=p2p

Time

All data returned by the Stats API is aggregated in different time windows and these aggregations can be requested using the right filter. Below are the available time filters:

Examples:

http://example.com/api/v3/stats/throughput/agg?time=live
http://example.com/api/v3/stats/throughput/agg?time=10m

Client Errors

Below you will find all client errors that might be returned by the Stats API.

400 Bad Request

Example of body response:

{
   "error": {
      "status_code": 400,
      "msg": "Bad Request",
      "verbose": "Missing query param <time> in request.",
      "extra": "Request api/v3/summary"
    }
}

Example of body response:

{
   "error": {
      "status_code": 400,
      "msg": "Bad Request",
      "verbose": "Wrong format in query param <source> in request.",
      "extra": "Request api/v3/summary"
   }
}

401 Unauthorized

The responses with this status code do not have a body.

403 Forbidden

The responses with this status code do not have a body.

404 Not Found

Example of body response:

Error: Requested URL /api/v3/dummy_url not found

429 Too Many Requests

Responses with this status code do not have a body.