[object Object] Icon

Encoding
Learn how to create, start, manage and modify Encodings

[object Object] Icon

Player
Learn how to create, start, manage and modify Players

[object Object] Icon

Analytics
Learn how to create, start, manage and modify Analyticss

Docs Home
User shortcuts for search
Focus by pressing f
Hide results by pressing Esc
Navigate via   keys

Wed Jun 02 2021

How to recreate dashboard queries via the API

IntroductionLink Icon

This tutorial shows how to recreate the metrics in the Bitmovin Analytics dahsboard via using API queries. If you want to get started with an API integration we recommend exploring the API first via using the API Explorer in the Bitmovin Analytics dashboard. You can follow this tutorial to familiarize yourself with query language and all the inputs necesary.

Audience metricsLink Icon

For a definition for each of the audience metrics, please follow this link.

Plays

1 queryBuilder
2 .between('2020-11-01T00:58:28.454Z', '2020-11-04T00:58:28.454Z')
3 .licenseKey('….removed....')
4 .count('IMPRESSION_ID')
5 .filter('VIDEO_STARTUPTIME', 'GT', 0)
6 .query()

Play Attempts

1 queryBuilder
2 .between('2020-11-01T00:58:28.454Z', '2020-11-04T00:58:28.454Z')
3 .licenseKey('….removed....')
4 .count('PLAY_ATTEMPTS')
5 .query()

Unique Users

1 queryBuilder
2 .between('2020-11-01T00:58:28.454Z', '2020-11-04T00:58:28.454Z')
3 .licenseKey('….removed....')
4 .count('USER_ID')
5 .filter('VIDEO_STARTUPTIME', 'GT', 0)
6 .query()

Concurrent Viewers

1 metricsBuilder
2 .between('2020-11-01T00:58:28.454Z', '2020-11-04T00:58:28.454Z')
3 .licenseKey('….removed....')
4 .metric('max_concurrentviewers')
5 .query()

Total Page Loads

1 queryBuilder
2 .between('2020-11-01T00:58:28.454Z', '2020-11-04T00:58:28.454Z')
3 .licenseKey('….removed....')
4 .count('IMPRESSION_ID')
5 .filter('PLAYER_STARTUPTIME', 'GT', 0)
6 .query()

Total Hours Watched

1 queryBuilder
2 .between('2020-11-01T00:58:28.454Z', '2020-11-04T00:58:28.454Z')
3 .licenseKey('….removed....')
4 .sum('PLAYED')
5 .filter('PLAYED', 'GT', 0)
6 .query()

View Time

1 queryBuilder
2 .between('2020-11-01T00:58:28.454Z', '2020-11-04T00:58:28.454Z')
3 .licenseKey('….removed....')
4 .avg('VIEWTIME')
5 .query()

Quality of ExperienceLink Icon

For a definition for each of the quality of service metrics, please follow this link.

Total Startup Time

1 queryBuilder
2 .between('2020-11-01T00:58:28.454Z', '2020-11-04T00:58:28.454Z')
3 .licenseKey('….removed....')
4 .median('STARTUPTIME')
5 .filter('PAGE_LOAD_TYPE', 'EQ', 1)
6 .filter('STARTUPTIME', 'GT', 0)
7 .query()

Player Startup Time

1 queryBuilder
2 .between('2020-11-01T00:58:28.454Z', '2020-11-04T00:58:28.454Z')
3 .licenseKey('….removed....')
4 .median('PLAYER_STARTUPTIME')
5 .filter('PAGE_LOAD_TYPE', 'EQ', 1)
6 .filter('PLAYER_STARTUPTIME', 'GT', 0)
7 .query()

Video Startup Time

1 queryBuilder
2 .between('2020-11-01T00:58:28.454Z', '2020-11-04T00:58:28.454Z')
3 .licenseKey('….removed....')
4 .median('VIDEO_STARTUPTIME')
5 .filter('VIDEO_STARTUPTIME', 'GT', 0)
6 .query()

DRM Load Time

1 queryBuilder
2 .between('2020-11-01T00:58:28.454Z', '2020-11-04T00:58:28.454Z')
3 .licenseKey('….removed....')
4 .median('DRM_LOAD_TIME')
5 .filter('DRM_LOAD_TIME', 'GT', 0)
6 .query()

Seek Time

1 queryBuilder
2 .between('2020-11-01T00:58:28.454Z', '2020-11-04T00:58:28.454Z')
3 .licenseKey('….removed....')
4 .median('SEEKED')
5 .filter('SEEKED', 'GT', 0)
6 .query()

Error Percentage

1 queryBuilder
2 .between('2020-11-01T00:58:28.454Z', '2020-11-04T00:58:28.454Z')
3 .licenseKey('….removed....')
4 .avg('ERROR_PERCENTAGE')
5 .query()

Start Failures

1 queryBuilder
2 .between('2020-11-01T00:58:28.454Z', '2020-11-04T00:58:28.454Z')
3 .licenseKey('….removed....')
4 .count('VIDEOSTART_FAILED')
5 .filter('VIDEOSTART_FAILED_REASON', 'NE', 'PAGE_CLOSED')
6 .filter('VIDEOSTART_FAILED', 'EQ', true)
7 .query()

Rebuffer Percentage

1 queryBuilder
2 .between('2020-11-01T00:58:28.454Z', '2020-11-04T00:58:28.454Z')
3 .licenseKey('….removed....')
4 .avg('REBUFFER_PERCENTAGE')
5 .query()

Buffering Time

1 queryBuilder
2 .between('2020-11-01T00:58:28.454Z', '2020-11-04T00:58:28.454Z')
3 .licenseKey('….removed....')
4 .avg('BUFFERED')
5 .query()

Data Downloaded

1 queryBuilder
2 .between('2020-11-01T00:58:28.454Z', '2020-11-04T00:58:28.454Z')
3 .licenseKey('….removed....')
4 .sum('VIDEO_SEGMENTS_DOWNLOAD_SIZE')
5 .query()

Bandwidth

1 queryBuilder
2 .between('2020-11-01T00:58:28.454Z', '2020-11-04T00:58:28.454Z')
3 .licenseKey('….removed....')
4 .avg('DOWNLOAD_SPEED')
5 .query()

Video Bitrate

1 queryBuilder
2 .between('2020-11-01T00:58:28.454Z', '2020-11-04T00:58:28.454Z')
3 .licenseKey('….removed....')
4 .avg('VIDEO_BITRATE')
5 .filter('VIDEO_BITRATE', 'GT', 0)
6 .query()

Scale Factor

1 queryBuilder
2 .between('2020-11-01T00:58:28.454Z', '2020-11-04T00:58:28.454Z')
3 .licenseKey('….removed....')
4 .avg('SCALE_FACTOR')
5 .query()

Give us feedback