Analytics API (ENG)

Analytics API (ENG)

INTRODUCTION

This API stores video access/usage statistics for the linear channels and vod items.

API PATH

/api/analytics

API METHODS

ADDING NEW RECORD

Adds a new analytics record of either on-demand video usage or linear channel viewing statistics

REQUEST

Parameters:

Name
Value
Requirement
Info
action
addVideoAccess
Mandatory
Identifies a request type
companyId
number
Mandatory
Identifies Icareus Suite company
groupId
number
Mandatory
Identifies Icareus Suite group
itemType
number
Mandatory
Specifies video item type. The type ids can be configured in Icareus Suite properties. Default values: 1 - VOD, 2 - linear channel
itemId
number
Mandatory
It could be either assetId or linear channelId depending on the item type
deviceUdid
sting
Mandatory
A unique device identifier to report statistics. The device should be registered in the system
presetId
number
Optional
A video preset to report statistics
startTime
number
Mandatory
UTC timestamp

It is possible to use organizationId instead of companyId and groupId.

organizationId
number
Optional
Identifies Icareus Suite organization

RESPONSE

JSON response parameters

Name
Info
status
request status code ("ok", "error")
message
request status message
videoAccessId
report access id that should be stored to update statistics data

Example:
http://127.0.0.1/api/analytics?action=addVideoAccess&companyId=10154&groupId=10180&itemType=1&deviceUdid=1&presetId=1&temId=1&startTime=1408454880000

Response:

{"message":"","status":"ok","videoAccessId":371745}

UPDATING RECORD

The response from addVideoAccess contains videoAccessId which should be used to update video duration.

REQUEST

Name
Value
Requirement
Info
action
updateVideoAccess
Mandatory
Identifies a request type
videoAccessId
number
Mandatory
access id parameter to update statistics (it should be obtained from addVideoAccess API call)
duration
number
Mandatory
access duration (seconds)

Example:
http://127.0.0.1/api/analytics?action=updateVideoAccess&videoAccessId=118313&duration=30

RESPONSE

{"message":"Duration updated","status":"ok"}