GET
/
streaming
/
statistics
/
heatmap
Python
from gcore import Gcore

client = Gcore(
    api_key="My API Key",
)
views_heatmap = client.streaming.statistics.get_views_heatmap(
    date_from="date_from",
    date_to="date_to",
    stream_id="stream_id",
    type="live",
)
print(views_heatmap.data)
{
  "data": [
    {
      "viewers": 100500,
      "seconds": 500
    },
    {
      "viewers": 3000,
      "seconds": 1000
    }
  ]
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Query Parameters

date_from
string
required

Start of time frame. Datetime in ISO 8601 format.

date_to
string
required

End of time frame. Datetime in ISO 8601 format.

type
enum<string>
required

entity's type

Available options:
live,
vod,
playlist
stream_id
string
required

video streaming ID

Response

200
application/json

OK

The response is of type object.