v3 Analytics Reporting API Syntax

The v3 Analytics Reporting API GET or POST request must be signed by your Ooyala-issued API key and secret as detailed in Setup/Mechanics for the v3 Analytics Reporting API and must include the expires keyword and timestamp.

In addition, the individual values of query string parameters and the entire value for filters= must be URL-encoded.

General Syntax of Reporting GET

The base syntax of the route and query string is as follows. For ease of reading, the single-line request has been split across several lines.

[GET] /v3/analytics/reports/?
            report_type=type
            &dimensions=dimensions
            &metrics=metrics
            &filters=filter_type=='filter_value'
            &start_date=date
            &end_date=date
            &other_parms
            &api_key=your_api_key
         
  • The required query string parameters (shown in bold) are report_type, start_date, and api_key.
  • If no dimensions are specified, total values across all dimension are returned.
  • For time ranges up to 1 month you can query by up to 3 dimensions at a time with unlimited rows of data. For time ranges greater than one month you can query by up to 2 dimensions at a time with up to 10,000 rows of data.
  • If no metrics are specified, all metrics are returned.
Note: You may pass the API key either as a query parameter or via the header X-API-KEY.
Note: At this time, the only valid value for report_type is performance.
Note: You can only use 1 dimension (url) for url queries.

GET Concurrent Users

To GET information on concurrent users, send a GET request to the v3/analytics/reports endpoint, in which the report_type variable takes the value "concurrent":

[GET] /v3/analytics/reports?report_type=concurrent&metrics=<comma separated metrics>&start_date=<start>&end_date=<end>

Below are detailed descriptions of the parameters:

  • report_type: A required parameter. In this case, it should be set to concurrent.
  • start_date: The start date is specified as YYYY-MM-DD or YYYY-MM-DDTHH:MM. If no HH:MM time is specified, it is set to 00:00 by default. The start date's time, if specified, would be in the provider's time zone. This parameter is required when report_type = concurrent.
  • end_date: The end date is specified as YYYY-MM-DD or YYYY-MM-DDTHH:MM. If no HH:MM time is specified, it is set to 23:59 by default. The end date's time, if specified, would be in the provider's time zone. The end date itself is excluded from the time range, so that the time range is actually [start_date, end_date). This parameter is required when report_type = concurrent.
  • metrics: An optional parameter. A comma-separated list of the metrics to be returned in the response. Different report types have different available metrics. See the metrics section for details. * means all metrics. This parameter's default value is *.

General Syntax of Reporting Long Queries POST

For queries with query parameters that would exceed the HTTP GET specification limit of 230 characters , please use a POST request. Some browsers and http clients may support more than 230 characters, but we will not provide official support for queries that violate the HTTP GET specification. For POST requests, pass a JSON object in the request body instead of the query string parameters.

[POST] /v3/analytics/reports

{
    "report_type":"type",
    "dimensions":"dimensions",
    "metrics":"metrics",
    "filters":"(filter_type==\"filter_value\")",
    "start_date":"date",
    "end_date":"date",
    "other_parms":"other_param_value",
    "api_key":"your_api_key"
}
         

해당 내용이 도움 되었습니까?