There's a specific workflow you need to follow to query a report.

  1. Retrieve report pack

    You can retrieve report packs using the resource given below. Skip this step if you already know the report pack you need. The sample request and response below shows how to list all report packs. (See List QoS Monitor report packs).

    GET: /media-analytics/v2/qos-monitor/report-packs

[
            {
                "id": 6833,
                "name": "ReportPack Qos",
                "isActive": true,
                "type": "qos",
                "subType": "QoS_Live Events",
                "timezone": "GMT"
            },
            {
                "id": 6311,
                "name": "HDS Test",
                "isActive": true,
                "type": "qos",
                "subType": "QoS_On-demand Streams",
                "timezone": "Asia/Calcutta"
            }
        ]
  1. Retrieve report pack details

    Report pack details include report pack name, data stores, data sources, metrics, and dimensions used in the report pack.

    You can run the API operation below to retrieve details for a specific report pack using its ID as a parameter.

    GET: /media-analytics/v2/qos-monitor/report-packs/{reportPackId}

    The sample request and response below shows how to retrieve details of a report pack. (See Get a QoS Monitor report pack).

    GET: /media-analytics/v2/qos-monitor/report-packs/6311

{
            "id": 6311,
            "name": "HDS Qos Test",
            "isActive": true,
            "type": "qos",
            "subType": "QoS_On-demand Streams",
            "dataSources": [
                { "id": 4553, "name": "Qos Monitor Data Source" }
            ],
            "dimensions": [
                { "id": 160, "name": "Title", "type": "standard" },
                { "id": 12, "name": "Time", "type": "standard" },
                { "id": 96, "name": "Start Up Time Range", "type": "standard" },
                { "id": 57, "name": "Country", "type": "custom" }
            ],
            "metrics": [
                { "id": 437, "name": "Plays with Rebuffers" },
                { "id": 156, "name": "Downshifts" },
                { "id": 179, "name": "Bitrate Views" },
                { "id": 188, "name": "Plays Started" }
            ],
            "filters": null,
            "dataStores": [
                {
                    "id": 1238,
                    "name": "Data Store for qos_vod",
                    "type": "standard",
                    "description": "Stores data relevant to qos_vod"
                },
                {
                    "id": 1435,
                    "name": "Encoded Bitrate(VOD)",
                    "type": "standard",
                    "description": "Encoded bitrate data store for VoD data"
                }
            ],
            "timezone": "GMT"
        }
  1. Retrieve report data

    To retrieve data for a specific report, you can use the sample request and response below that shows how to generate a QoS Monitor report. The first GET line represents the URL template syntax. The second GET line is an actual sample URL. (See Get QoS Monitor report data).

    GET: /media-analytics/v2/qos-monitor/report-packs/{reportPackId}/data{?startDate,endDate,aggregation,dimensions,metrics,limit,offset,filterParams,sortParams}

    Assume that the dimension ID 12,57 represents Time and the metric ID 437 represents the metric Plays with Rebuffers. The sample URL below reports on the number of plays with rebuffers by time for a period starting 11/13/2014:00:00 to 11/13/2014:05:00 for a specific report pack:

    GET: /media-analytics/v2/qos-monitor/report-packs/6311/data?dimensions=12,57&metrics=437&startDate=11/13/2014:00:00&endDate=11/13/2014:00:05&limit=5

{
            "columns": [
                {
                    "type": "dimension",
                    "name": "Time",
                    "description": "Indicates the time at which content was consumed in the time zone specified in the report pack.",
                    "index": 0
                },
                {
                    "type": "dimension",
                    "name": "Country",
                    "description": "Set to viewer's country based on mapping of the viewer's IP address to their location by the Akamai EdgeScape service.",
                    "index": 1
                },
                {
                    "type": "metric",
                    "name": "Plays with Rebuffers",
                    "description": "Sum of plays with at least one rebuffering event.",
                    "index": 2,
                    "aggregate": "418",
                    "peak": "156",
                    "unit": null
                }
            ],
            "rows": [
                [ "1415837040", "US", "156" ],
                [ "1415837040", "CH", "136" ],
                [ "1415836980", "US", "113" ],
                [ "1415836980", "CH", "103" ],
                [ "1415836920", "US", "95" ]
            ],
            "metaData": {
                "aggregation": 60,
                "limit": 5,
                "startTimeInEpoch": 1415836800,
                "hasMoreData": false,
                "timeZone": "GMT",
                "offset": 0,
                "reportPack": "HDS QoS Test",
                "endTimeInEpoch": 1415837100
            }
        }