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

client = Gcore(
    api_key="My API Key",
)
views = client.streaming.statistics.get_views(
    date_from="date_from",
    date_to="date_to",
)
print(views.data)
{
  "data": [
    {
      "views": 1000,
      "date": "2024-05-01",
      "type": "vod"
    },
    {
      "views": 2000,
      "date": "2024-05-02",
      "type": "vod"
    },
    {
      "views": 1000,
      "date": "2024-05-01",
      "type": "live"
    }
  ]
}

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>

filter by entity's type

Available options:
live,
vod,
playlist
id
string

filter by entity's id

event
enum<string>

filter by event's name

Available options:
init,
start,
watch
host
string

filter by host

country
string

filter by country

group
enum<string>[]

group=1,2,4 OR group=1&group=2&group=3

Response

200
application/json

OK

The response is of type object.