Control Panel — API documentation

Viewers

Viewer counts Read-only

The Viewers object displays viewer minutes and unique session counts summarized by day, hour, or minute. Data can further be summarized by application, instance, stream, server, or destination.

Descriptions

app String Immutable

Application Name

The application name must begin with "username-"

Default:

Sample value:username-origin

stream String Immutable

Stream Name

May only contain alpha numerical characters, dashes (-), and underscores (_)

Default:

Sample value:mystreamname

date String Immutable

Date and time the data represents

String

Default:

Sample value:2019-12-23 19:25

unique_sessions Integer Synthetic

Number of unique sessions

Default:0

Sample value:50

viewer_minutes Integer Synthetic

Number of minutes the sessions were active

Default:0

Sample value:50

type String

Granularity of viewer data (live, minute, hour, or day).

Enum:live, min, minute, hour, day

Default:live

Sample value:day

start_date String

Limits starting date and time to logs on or after this date.

Default:+1 hour ago

Sample value:2019-12-23 00:00:00

end_date String

Limits ending date and time to logs on or after this date.

Default:

Sample value:2019-12-23 00:00:00

Only for:

app String

Only streams in this application

Default:

Sample value:example-origin

stream String

Only show data for this stream name

Default:

Sample value:mystream

fields String

Array of columns to display

Default:date

Sample value:date,stream,unique_sessions

None
None

Examples

Get the Viewers object with id .

Example URL

https://api.scaleengine.net/dev/v2/viewers/

Example cURL

curl --user 158:8fc8c48da81e6a2a06a9556379bf798af508dc0792497c678b4c3532ba8b637f https://api.scaleengine.net/dev/v2/viewers/

Example request body

None

Example response data

{
    "app": "username-origin",
    "stream": "mystreamname",
    "date": "2019-12-23 19:25",
    "unique_sessions": 50,
    "viewer_minutes": 50
}

This object is read-only and cannot be created.

This object is read-only and cannot be updated.

This object is read-only and cannot be deleted.

Errors

ACCESS_VIOLATION

You do not have access to modify this field

TYPE_MISMATCH

Data type does not conform to required field type

APP_INVALID

The application name must begin with "username-"

STREAM_INVALID

May only contain alpha numerical characters, dashes (-), and underscores (_)