Analytics API (1.0.0)
Download OpenAPI specification:Download
Access analytics about your videos and livestreams programmatically.
Authentication
You'll need both API key and Site/Workspace id in most of the API call. You can find your API key and siteid (workspaceid) under workspace/settings.
In all analytics request both API key and Site/Workspace id must be provided as headers with the name x-flowplayer-site-id
and x-flowplayer-api-key
.
See sample below:
x-flowplayer-api-key:<your_api_key>
x-flowplayer-site-id:<your_site_id>
Requesting the API
Base url for the API is:
https://api.flowplayer.com/analytics/
Requesting endpoints is done by specifying needed authentication headers and do a get request to wanted endpoint.
--header: x-flowplayer-site-id:<your_site_id>
--header: x-flowplayer-api-key:<your_api_key>
https://api.flowplayer.com/analytics/videos/{video_id}
Content Type
The Analytics API only support Json
-format output.
Video summarised
Return summarised analytics for a specific video. The returned video retention is divided into 100 segments
and every segment
represents 1% for the video duration. The return value of this endpoint includes viewing counts for each of these 100 segments.
path Parameters
id required | string ID of the video |
query Parameters
start | string Starting date/time of the interval, format |
end | string Ending date/time of the interval, format |
Responses
Response samples
- 200
{- "displays": 100,
- "plays": {
- "total": 0,
- "device": {
- "desktop": 0,
- "mobile": 0,
- "tablet": 0
}, - "mobile_os": {
- "android": 0,
- "ios": 0,
- "windows_phone": 0
}
}, - "engagement": {
- "duration": 20,
- "average_seconds_viewed": 32.45,
- "total_seconds_viewed": 3230,
- "play_rate": 0.2,
- "completion_rate": 0.42,
- "average_completion": 0.5
}, - "domains": [
- {
- "name": "flowplayer.com",
- "plays": 150
}
], - "countries": [
- {
- "name": "Finland",
- "iso_3166_2": "FI",
- "plays":