Retrieve Sample Ad Sessions
Retrieve Sample Ad Sessions:
-
Only accounts with Ad Insights permission can use this endpoint.
-
This endpoint only returns ended sessions.
-
By default, returns 50 sample sessions (use the ?limit query parameter to specify up to 1500 sessions).
-
The maximum length of a query time range per API request is 3 hours.
-
The query start timestamp must be within the last 31 days.
-
Only accounts with Viewer Module API permission will receive sessions with viewer_id in the response.
Method
GET
Endpoint
https://api.conviva.com/insights/3.0/sessions/ad
Request Parameters
| Parameter | Datatype | Description |
|---|---|---|
| client_id | string | Filter sessions by client id. |
| is_exit_before_video_start | boolean | Filter sessions that have an exit before video start. |
| is_video_playback_failure | boolean | Filter sessions that have a video playback failure error. |
| is_video_playback_failure_business | boolean | Filter sessions that have a video playback failure business error. |
| is_video_playback_failure_tech | boolean | Filter sessions that have a video playback failure tech error. |
| is_video_start_failure | boolean | Filter sessions that have a video start failure error. |
| is_video_start_failure_business | boolean | Filter sessions that have a video start failure business error. |
| is_video_start_failure_tech | boolean | Filter sessions that have a video start failure tech error. |
| limit | integer |
Number of sessions in response >= 1 <= 1500. Default: 50 |
| session_id | string | Filter sessions by Session ID. |
| tag_{customTagName} | string | Filter by custom dimension tag (where tag_ is a prefix and {customTagName} is a placeholder of the tag name). |
| {dimension_name} | string | Filter sessions by a dimension label (where {dimension_name} is a placeholder of a Conviva-defined dimension; see Filtering by Dimensions for a list available dimensions). |
API Responses
200: OK
Example cURL
curl --request GET \
--url https://api.conviva.com/insights/3.0/sessions/ad \
--header 'Accept: application/json'
Example Response
{
"sessions": [
{
"conviva_session_id": "2.3.4.5.6",
"client_id": "2.3.4.5",
"session_id": "6",
"viewer_id": "### REDACTED ###",
"timestamps": {
"start": {
"epoch_ms": 1678850703506,
"iso_date": "2023-03-15T03:25:03.506Z"
},
"end": {
"epoch_ms": 1678850718509,
"iso_date": "2023-03-15T03:25:18.509Z"
}
},
"status_info": {
"is_ended": true,
"ended_status": "Graceful End",
"is_exit_before_video_start": false,
"is_video_start_failure": false,
"is_video_start_failure_business": false,
"is_video_start_failure_tech": false,
"is_video_playback_failure": false,
"is_video_playback_failure_business": false,
"is_video_playback_failure_tech": false,
"errors": []
},
"lifetime_metrics": {
"average_framerate_fps": 0,
"average_peak_bitrate_bps": 6556000,
"average_percentage_complete": 87,
"bitrate_switches_count": 1,
"connection_induced_rebuffering_ratio_percent": 7.148468,
"connection_induced_rebuffering_time_ms": 1001,
"last_play_head_time_ms": -1,
"playing_time_ms": 13002,
"paused_ratio_percent": 0,
"paused_time_ms": 0,
"rebuffering_ratio_percent": 7.148468,
"rebuffering_time_ms": 1001,
"video_restart_time_ms": 0,
"video_start_time_ms": 1000
},
"content_info": {
"asset": "Comfort Sneakers",
"category": "VoD",
"length_ms": 15000,
"stream_url": "example.com"
},
"device_info": {
"browser": {
"name": "",
"version": ""
},
"name": "",
"os": "",
"os_family": "",
"os_version": ""
},
"geo_info": {
"city": "Los Angeles, California, United States",
"state": {
"name": "California, United States",
"code": "CA"
},
"country": {
"name": "United States",
"code": "US"
},
"continent": "North America",
"postal_code": "90060",
"dma": "Los Angeles"
},
"network_info": {
"asn": {
"value": "60068",
"description": "CDN77, GB"
},
"cdn": [
"UNKNOWN"
],
"isp": "UNKNOWN",
"last_cdn_edge_server": "",
"last_cdn_group_id": ""
},
"tags": {
"selected_dimensions": {
"ad_creative_id": "57478278",
"ad_id": "98842223",
"ad_media_file_api_framework": "NA",
"ad_planned_duration": "15",
"ad_position": "Mid-roll",
"ad_sequence": "2",
"ad_system": "DCM",
"ad_technology": "Client Side",
"app_version": "Chromecast_2.18",
"browser_name": "",
"browser_version": "",
"content_category": "VoD",
"content_meta_channel": "The News Channel",
"content_meta_show_title": "Morning News With Jesse Culver: S2, E1",
"content_session_id": "-1002353665",
"device_hardware_type": "",
"device_manufacturer": "",
"device_marketing_name": "",
"device_model": "",
"device_name": "",
"device_os": "",
"device_os_family": "",
"device_os_version": "",
"platform_version": "",
"player_framework_name": "",
"player_framework_version": "",
"player_name": "Chromecast",
"video_asset_name": "Morning News With Jesse Culver: S2, E1"
},
"custom_tags": {
"absoluteIndex": "",
"ad_break_duration": "90",
"age": "45",
"demo_version": "2022.10.13+rollback_eff17a6",
"has_ad": "true",
"has_preroll": "true",
"linked_ad": "pre-roll",
"podIndex": "",
"podPlannedDuration": "",
"podRollPostion": ""
}
}
}
]
}