The following information will guide you on retrieving and saving your analytics v2 data.
With the Ooyala v2 Analytics API you can easily create a report that will provide you with your analytics data. The results will be in JSON format. (JSON is a lightweight data-interchange format that is easy to read and write.)
To retrieve analytics results from a specific date range you simply need to define the type of result you need with the api call /v2/analytics/reports/, either in a terminal emulator such as Terminal on a Mac or in the Ooyala Scratchpad.
What is an API?
In computer programming. API (Application Programming Interface) is the name of a set of routines and protocols for software applications. An API expresses a software component in terms of its operations and results.
Where can I locate my API Credentials?
How Does the API Work?
An Ooyala API call requires 4 basic elements: API Key, API Secret, a Signature and an Expiration time.
API calls are made via HTTP methods. The GET API call is used to retrieve data without directly modifying it and allows you to get a typed JSON document response based on the id of the object.
What are the Available Results I can Retrieve with the Ooyala v2 Analytics API?
On the v2 Analytics API there are 4 key qualifiers that you need to identify in order to retrieve your results:
asset_id: This value is referred to by different names depending on where you look for it. In the Backlot API, asset_id is the identifier for a specific asset. asset_id has the same value as the content ID found in the Backlot UI that represents a piece of content. The value is the same for all scenarios. asset_id can be used if you want to retrieve results for a specific asset. Alternatively, you can retrieve results for your account, which would include all of your assets.
date_range: Defines the date range for this report. Analytics is based on dates. You can define the date following the format (YYYY-MM-DD) or you can define a date range with (YYYY-MM-DD...YYYY-MM-DD).
Dimension: Dimensions are common criteria that are used to aggregate data, such as the date when the user activity occurred or the country where the users were located. Every Dimension also has “Drilldowns”, which allow you to filter your results by specific values for each dimension.
Common query string parameters and attributes can be found at Common Attributes and Query String Parameters (Deprecated).
What is the API Call Format?
The v2 Analytics API follows a specific order on the body of the API.
For example, the API call: /v2/analytics/reports/account/performance/[:dimension/:drilldown]/:date_range
How Can I Use the Scratchpad to Save Reports?
The Scratchpad is a tool created by Ooyala that allows you to make API queries in your browser.
Additional Query Examples
How can I Create my own API Report?
You should only create your own API script if you are comfortable with the Ooyala API and have created scripts before or if you have the technical resources available who can modify the pre-made query to retrieve the data for you.