Skip to main content

Totals

Totals

Totals requests are analogous to requests over a period of time, and give you the sum of clients active in that period and/or the total average bytes per second transferred in that period, for as many points along the period as possible/feasible.

The request looks like this:

{
"totals": {
//array of stream names to accumulate. Empty (or left out) means all.
"streams": ["streama", "streamb", "streamc"],
//array of protocols to accumulate. Empty (or left out) means all.
"protocols": ["HLS", "HSS"],
//list of requested data fields. Empty (or left out) means all.
"fields": ["clients", "downbps", "upbps"],
//unix timestamp of data start. Negative means X seconds ago. Empty (or left out) means earliest available.
"start": 1234567
//unix timestamp of data end. Negative means X seconds ago. Empty (or left out) means latest available (usually 'now').
"end": 1234567
}
}
//Or, when requesting multiple clients responses simultaneously:
{
"totals": [
{},//request object as above
{}//repeat the structure as many times as wanted
]
}

The calls are responded to as follows:

{
"totals": {
//unix timestamp of start of data. Always present, always absolute.
"start": 1234567,
//unix timestamp of end of data. Always present, always absolute.
"end": 1234567,
//array of actually represented data fields.
"fields": [...]
// Time between datapoints. Here: 10 points with each 5 seconds afterwards, followed by 10 points with each 1 second afterwards.
"interval": [[10, 5], [10, 1]],
//the data for the times as mentioned in the "interval" field, in the order they appear in the "fields" field.
"data": [[x, y, z], [x, y, z], [x, y, z]]
}
}

In case of the second method, the response is an array of responses like this, in the same order as the requests.