The following shows how to generate the delivery/ivm/image-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 data for images 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 image hits received over the ​Akamai​ network.type: LONG,
filterable:true,
mandatory:false
bytesThe number of bytes of image 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
pristineBytesThe volume of traffic from the origin.type: LONG,
filterable:true,
mandatory:false
mobileHitsThe number of image hits received on mobile networks.type: LONG,
filterable:true,
mandatory:false
mobileBytesThe number of bytes of image content delivered on mobile networks.type: LONG,
filterable:true,
mandatory:false
mobilePristineBytesThe volume for traffic from the origin delivered on mobile networks.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
imageTypeThe type of an image.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
imageWidthThe width of an image, in pixels.type: LONG,
filterable:true,
mandatory:false filterType: TEXT,
authorizable:false
imDeviceWidthThe width of a device, in pixels.type: LONG,
filterable:true,
mandatory:false filterType: TEXT,
authorizable:false
deviceOsThe type of a device’s 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 image 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
imQualityGroupThe group of an image quality, a value between 0 (greater levels of compression resulting in a lower numerical quality score) and 100 (best visual quality).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/image-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 filters. 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": [
       "imageType",
       "token",
       "deviceOs",
       "imQualityGroup"
   ],
   "metrics": [
       "hits",
       "bytes",
       "hits200",
       "bytes200",
       "pristineBytes",
       "mobileHits",
       "mobileBytes",
       "mobilePristineBytes"
   ],
   "filters": [
       {
           "dimensionName": "cpcode",
           "operator": "IN_LIST",
           "expressions": [
               "909500"
           ]
       }
   ],
   "sortBys": [
       {
           "name": "hits200",
           "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/image-policy-stats

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

{
    "name": "IVM image stats report data",
    "status": "PUBLISHED",
    "metrics": [
        {
            "name": "hits",
            "type": "LONG",
            "filterable": true,
            "mandatory": false
        },
        {
            "name": "bytes",
            "type": "LONG",
            "filterable": true,
            "mandatory": false
        },
        {
            "name": "hits200",
            "type": "LONG",
            "filterable": true,
            "mandatory": false
        },
        {
            "name": "bytes200",
            "type": "LONG",
            "filterable": true,
            "mandatory": false
        },
        {
            "name": "pristineBytes",
            "type": "LONG",
            "filterable": true,
            "mandatory": false
        },
        {
            "name": "mobileHits",
            "type": "LONG",
            "filterable": true,
            "mandatory": false
        },
        {
            "name": "mobileBytes",
            "type": "LONG",
            "filterable": true,
            "mandatory": false
        },
        {
            "name": "mobilePristineBytes",
            "type": "LONG",
            "filterable": true,
            "mandatory": false
        }
    ],
    "dimensions": [
        {
            "name": "cpcode",
            "type": "LONG",
            "filterable": true,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": true
        },
        {
            "name": "time1day",
            "type": "LONG",
            "filterable": true,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": false
        },
        {
            "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": "imageType",
            "type": "STRING",
            "filterable": true,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": false
        },
        {
            "name": "browserType",
            "type": "STRING",
            "filterable": true,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": false
        },
        {
            "name": "imageWidth",
            "type": "LONG",
            "filterable": true,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": false
        },
        {
            "name": "imDeviceWidth",
            "type": "LONG",
            "filterable": true,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": false
        },
        {
            "name": "deviceOs",
            "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
        },
        {
            "name": "imQualityGroup",
            "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": [
            "hits200",
            "bytes200"
        ],
        "defaultSortBys": [
            {
                "name": "hits200",
                "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/image-policy-stats",
            "describedBy": "/reporting-api/v2/reports/schema",
            "allow": [
                "GET"
            ]
        },
        {
            "rel": "data",
            "href": "/reporting-api/v2/reports/delivery/ivm/image-policy-stats/data",
            "allow": [
                "POST"
            ]
        }
    ]
}