The following shows how to generate the delivery/ivm/video-policy-stats report with the Generate a report POST operation of the Reporting API v2. See also other available reports.

Report definition

Provides policy stats for videos configured to use Image and Video Manager.

Data available for: 90 days

Required products: Image and Video Manager

Available metrics

Metric nameDescriptionConfiguration
hitsThe number of video hits received over the ​Akamai​ network.type: LONG,
filterable:true,
mandatory:false
bytesThe number of bytes of video content delivered over the ​Akamai​ network.type: LONG,
filterable:true,
mandatory:false
bytes2xxThe volume of data served with successful responses.type: LONG,
filterable:true,
mandatory:false
hits2xxThe number of requests that returned successful responses.type: LONG,
filterable:true,
mandatory:false
ms2xxThe number of milliseconds served with successful responses.type: LONG,
filterable:true,
mandatory:false
pristineBytesThe volume of traffic from the origin.type: LONG,
filterable:true,
mandatory:false

Available dimensions

Dimension nameDescriptionConfiguration
cpcodeContent provider (CP) code.type: LONG,
filterable:true,
mandatory:false filterType: TEXT,
authorizable:true
time1dayDatapoint timestamp for 1 day granularity.type: LONG,
filterable:true,
mandatory:false filterType: TEXT,
authorizable:false
tokenThe Image and Video Manager policy token for which you want data included.type: STRING,
filterable:true,
mandatory:false filterType: TEXT,
authorizable:false
tokenWithVersionThe Image and Video Manager policy token with the version for which you want data included.type: STRING,
filterable:true,
mandatory:false filterType: TEXT,
authorizable:false
contentTypeThe content type of a video.type: STRING,
filterable:true,
mandatory:false filterType: TEXT,
authorizable:false
browserTypeThe type of a browser.type: STRING,
filterable:true,
mandatory:false filterType: TEXT,
authorizable:false
imWidthThe resolution of a video, in pixels.type: LONG,
filterable:true, filterType: TEXT,
authorizable:false
osTypeThe type of an operating system (OS).type: STRING,
filterable:true,
mandatory:false filterType: TEXT,
authorizable:false
networkConditionThe quality of the network. When the network quality is low and the quality value override feature is enabled, IVM delivers a derivative video of reduced quality instead of the standard one. The value 1 shows content delivered with the reduced quality. The value 0 shows content delivered with the standard quality.type: STRING,
filterable:true,
mandatory:false filterType: TEXT,
authorizable:false
optimizationTypeThe type of an optimization. 001 (Unprocessable) means that the original image was served to the end user because an issue was encountered during processing. 010 (Optimized) means that the original image has undergone a sophisticated offline process that involves conversion and compression into a comprehensive set of outputs that are optimized to support various browser and device combinations. 100 (Optimization in progress) means that the original image is in the process of being optimized.type: STRING,
filterable:true,
mandatory:false filterType: TEXT,
authorizable:false

Generate a report

Use the Generate a report POST operation to execute a report.

Follow the API workflows to:

POST request sample

POST /reporting-api/v2/reports/delivery/ivm/video-policy-stats/data?timeRange=LAST_1_WEEK

Available time ranges

For this report, you can use these predefined ranges in the timeRange query parameter:

  • LAST_1_DAY

  • LAST_1_WEEK

  • LAST_30_DAYS

  • LAST_90_DAYS

Supported filters

This report supports filtering by dimensions and metrics. You can filter by each dimension or metric that is labeled as filterable: true in the report options. See how to use filters.

Request body example

{
   "dimensions": [
       "browserType",
       "contentType",
       "networkCondition",
       "optimizationType"
   ],
   "metrics": [
       "hits",
       "bytes",
       "hits2xx",
       "bytes2xx",
       "pristineBytes"
   ],
   "filters": [
       {
           "dimensionName": "cpcode",
           "operator": "IN_LIST",
           "expressions": [
               "1041081"
           ]
       }
   ],
   "sortBys": [
       {
           "name": "hits2xx",
           "sortOrder": "DESCENDING"
       }
   ],
   "limit": 1000
}

Default values

These default values apply to all requests, meaning they are used unless you specify otherwise.

  • Time range. Short relative range of 7 days:

    • start. Now - 7 days
    • end. Now - 1 day
  • Metrics:

    • hits200
    • bytes200
  • Filters:

    • cpcode. You can use all CP codes to which you are authorized in ​Control Center​. If you don't specify any CP codes in your request, the report shows data for all your available CP codes.
  • SortBys:

    • hits200, DESCENDING

Limits

Each report has some configured limits. If your request has values that exceed the limits, it results in a HTTP 400 Bad Request response. This report has the following limits:

SettingLimit
Maximum number of dimensions4
Maximum time range90 days
Maximum retention of historic data90 days
Maximum number of values for filters using the IN_LIST operator10000
Maximum length of value for TEXT filters100
Maximum number of data points returned50000

Rate limiting

This report uses the hit-based rate limiting. The limit is 200 requests per minute.

In the asynchronous flow, you can have 3 queued POST requests at the same time.

Read more about the rate limiting.

Get report options

To get the report metadata through the API, run the Get report options operation.

GET /reporting-api/v2/reports/delivery/ivm/video-policy-stats

The response shows the list of available metrics and dimensions, the default values, and configured limits.

{
    "name": "IVM video stats report data",
    "status": "PUBLISHED",
    "metrics": [
        {
            "name": "hits",
            "type": "LONG",
            "filterable": true,
            "mandatory": false
        },
        {
            "name": "bytes",
            "type": "LONG",
            "filterable": true,
            "mandatory": false
        },
        {
            "name": "bytes2xx",
            "type": "LONG",
            "filterable": true,
            "mandatory": false
        },
        {
            "name": "hits2xx",
            "type": "LONG",
            "filterable": true,
            "mandatory": false
        },
        {
            "name": "ms2xx",
            "type": "LONG",
            "filterable": true,
            "mandatory": false
        },
        {
            "name": "pristineBytes",
            "type": "LONG",
            "filterable": true,
            "mandatory": false
        }
    ],
    "dimensions": [
        {
            "name": "time1day",
            "type": "LONG",
            "filterable": true,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": false
        },
        {
            "name": "cpcode",
            "type": "LONG",
            "filterable": true,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": true
        },
        {
            "name": "token",
            "type": "STRING",
            "filterable": true,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": false
        },
        {
            "name": "tokenWithVersion",
            "type": "STRING",
            "filterable": true,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": false
        },
        {
            "name": "contentType",
            "type": "STRING",
            "filterable": true,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": false
        },
        {
            "name": "browserType",
            "type": "STRING",
            "filterable": true,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": false
        },
        {
            "name": "imWidth",
            "type": "LONG",
            "filterable": true,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": false
        },
        {
            "name": "osType",
            "type": "STRING",
            "filterable": true,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": false
        },
        {
            "name": "networkCondition",
            "type": "STRING",
            "filterable": true,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": false
        },
        {
            "name": "optimizationType",
            "type": "STRING",
            "filterable": true,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": false
        }
    ],
    "predefinedTimeRanges": [
        "LAST_1_DAY",
        "LAST_1_WEEK",
        "LAST_30_DAYS",
        "LAST_90_DAYS"
    ],
    "defaults": {
        "defaultTimeRange": {
            "start": "now - 7 days",
            "end": "now - 1 day"
        },
        "defaultMetrics": [
            "hits2xx",
            "bytes2xx"
        ],
        "defaultSortBys": [
            {
                "name": "hits2xx",
                "sortOrder": "DESCENDING"
            }
        ]
    },
    "limits": {
        "maxDimensions": 4,
        "maxDateRangeInDays": 90,
        "maxRetentionInDays": 90,
        "inListFilterMaxValues": 10000,
        "textFilterMaxLength": 100,
        "dataPointsLimit": 50000
    },
    "links": [
        {
            "rel": "self",
            "href": "/reporting-api/v2/reports/delivery/ivm/video-policy-stats",
            "describedBy": "/reporting-api/v2/reports/schema",
            "allow": [
                "GET"
            ]
        },
        {
            "rel": "data",
            "href": "/reporting-api/v2/reports/delivery/ivm/video-policy-stats/data",
            "allow": [
                "POST"
            ]
        }
    ]
}