This guide outlines how to access the MediaMelon SmartSight Analytics API.
The MediaMelon SmartSight Analytics API provides RESTful endpoints to retrieve data from the SmartSight backend. Using these APIs, you can fetch and process data according to your requirements. The APIs are secured via OAuth2 authentication.
Prerequisites
To fetch data from the backend, Smarthsight Analytics API authenticates users via an OAuth Token. To obtain this token, you need these prerequisites:
Username - Your SmartSight username
Password - Your SmartSight password
Contact your MediaMelon representative in case you're not aware of the above mentioned prerequisites
Fetch OAuth Token POST
Retrieve an OAuth access token for authentication.
If you run this request yourself it will not work, you should replace the bearer token (6ABBCCCD-EEE1-FFF2-GGG3-HIJKLMNOP456) in this example with your own OAuth access token you get by running Fetch OAuth Token
A mandatory query parameter in comma-separated string format. It needs to in the format of start date and end date (eg: start=1729104657,end=1730244657) in epoch time. For reference, use this Epoch Time converter
metrics string
A mandatory query parameter in string format. The request can also be made with comma-separated format to retrieve combinations of metrics. (e.g. viewercount, playdur, bufferingratio, latency, subscriberid, errors, viewercount, subscribertag, ipaddress, timestamp, starttime, endtime, etc.)
Optional request query parameters
limit string
An optional query parameter in string format to return maximum number of records (e.g., 10)
dimension string
An optional query parameter in string format to return the target level for data (eg: microscope)
filter string
An optional query parameter in string format to return data with filter criteria (e.g., subscriberid={subscriber-id})
orderas string
An optional query parameter in string format to return data in order (e.g., DESCOR ASEC)
offset string
An optional query parameter in string format to return data with starting index (e.g., 1)
agg string
An optional query parameter in string format to return data by enabling or disabling aggregation (values: 1 or 2)
aggby string
An optional query parameter in string format to return aggregated data with aggregation by (eg.: subscriberid={subscriber-id})
orderby string
An optional query parameter in string format to return data with order by (eg.: viewercount)