aic-by-time report

The following shows how to generate the aic-by-time report using either the Reporting API’s Generate a report POST operation or the Get a cacheable report GET operation. Details about each report’s supported products, metrics, filters, and available data intervals are also available dynamically by running the API’s Get a report type operation, also shown below. See also other available reports.

Report definition

Provides the number of images compressed per second to improve performance, based on network conditions.

This report allows you to configure the aggregation interval for each data record. Available interval values are: MONTH, WEEK, DAY, HOUR, FIVE_MINUTES.

Business object: cpcode

Data available for: 90 days

Required products: Adaptive Image Compression

Available metrics

Metric Description
Data metrics
excellentHitsPerSecond The rate of compressed images served per second to improve performance, based on excellent network conditions.
goodHitsPerSecond The rate of compressed images served per second to improve performance, based on good network conditions.
poorHitsPerSecond The rate of compressed images served per second to improve performance, based on poor network conditions.
Summary metrics
adaptedHitsSlope Total adapted (or compressed) hits slope.
adaptedHitsTotal The number of compressed images served per second to improve performance, based on network conditions.

Available filters

Filter Type Description
Optional filters
network Enumeration Type of network, either mobile or non-mobile. AIC images are compressed for performance based on network conditions.
non_mobile: Non-mobile network. AIC images are compressed for performance based on network conditions.
mobile: Non-mobile network. AIC images are compressed for performance based on network conditions.

Sample report

POST /reporting-api/v1/reports/aic-by-time/versions/2/report-data{?start,end,interval}

Sample: /reporting-api/v1/reports/aic-by-time/versions/2/report-data?start=2020-06-26T13%3A40%3A00Z&end=2020-06-26T14%3A00%3A00Z&interval=FIVE_MINUTES

Object type: Query

Download schema: report-request-schema.json

Query parameters

Parameter Type Sample Description
Required
start String 2020-06-26T13:40:00Z Specifies the start of the reported period as an ISO–8601 timestamp with optional time zone. The report includes data that matches the start value’s timestamp.
end String 2020-06-26T14:00:00Z Specifies the end of the reported period as an ISO–8601 timestamp with optional time zone. The report excludes any data that matches the end value’s timestamp.
interval Enumeration FIVE_MINUTES The duration of each data record. Available values: MONTH, WEEK, DAY, HOUR, FIVE_MINUTES.

JSON request members

Member Type Description
objectIds Array Specifies the set of cpcode values you want to report on.
objectIds Enumeration As an alternative to an array of ID values, specify all as a string for unfiltered data. Either way, objectIds is required.
metrics Array The set of desired metrics. If omitted, the report includes all available metrics.
filters Map of Arrays Specifies a set of custom filters, with each filter’s name keying an array with each filter’s set of values.

Request body:

{
    "objectIds": [
        "55232",
        "23433",
        "32433"
    ],
    "metrics": [
        "adaptedHitsSlope",
        "adaptedHitsTotal",
        "excellentHitsPerSecond",
        "goodHitsPerSecond",
        "poorHitsPerSecond"
    ],
    "filters": {
        "network": [
            "mobile",
            "non-mobile"
        ]
    }
}

GET /reporting-api/v1/reports/aic-by-time/versions/2/report-data{?start,end,interval,objectIds,allObjectIds,metrics,filters}

Sample: /reporting-api/v1/reports/aic-by-time/versions/2/report-data?start=2020-06-26T13%3A40%3A00Z&end=2020-06-26T14%3A00%3A00Z&interval=FIVE_MINUTES&objectIds=55232,23433,32433&metrics=adaptedHitsSlope%2CadaptedHitsTotal&filters=network%3Dmobile%2Cnetwork%3Dnon-mobile

Query parameters

Parameter Type Sample Description
Required
start String 2020-06-26T13:40:00Z Specifies the end of the reported period as an ISO–8601 timestamp with optional time zone. The report excludes any data that matches the end value’s timestamp.
end String 2020-06-26T14:00:00Z Specifies if unavailable reports should be shown.
interval Enumeration FIVE_MINUTES The duration of each data record. Available values: MONTH, WEEK, DAY, HOUR, FIVE_MINUTES.
Optional
allObjectIds Boolean true As an alternative to objectIds, enabling this generates a report that includes all IDs available for the cpcode objectType. This parameter is ignored if the request also specifies a set of objectIds.
objectIds String 55232,23433,32433 As an alternative to allObjectIds, specifies the set of unique IDs for the cpcode objectType you want to report on, formatted as a comma-delimited list.
metrics String adaptedHitsSlope,adaptedHitsTotal Specifies a comma-separated list of metrics to include in the report, otherwise all metrics if omitted. The set of available metrics depends on the type of report. URL-encode the entire value in the GET request.
filters String network=mobile,network=non-mobile Specifies criteria to filter the report’s data. The set of available filters depends on the type of report. Separate each filter name and value with an equals (=) character, and separate various name/value pairs with commas (,). To specify more than one filter value, repeat the filter name. See the accompanying example for guidance. URL-encode the entire value in the GET request.

Status 200 application/json

Object type: Report

Download schema: report-response-schema.json

Response body:

{
    "metadata": {
        "name": "aic-by-time",
        "version": "2",
        "outputType": "FLAT",
        "groupBy": [
            "startdatetime"
        ],
        "interval": "FIVE_MINUTES",
        "start": "2020-06-26T13:40:00Z",
        "end": "2020-06-26T14:00:00Z",
        "availableDataEnds": null,
        "suggestedRetryTime": null,
        "rowCount": 4,
        "filters": [
            {
                "name": "network",
                "values": [
                    "mobile",
                    "non-mobile"
                ]
            }
        ],
        "columns": [
            {
                "name": "groupBy",
                "label": "startdatetime"
            },
            {
                "name": "excellentHitsPerSecond",
                "label": "Network Conditions (Excellent) Hits/Sec"
            },
            {
                "name": "goodHitsPerSecond",
                "label": "Network Conditions (Good) Hits/Sec"
            },
            {
                "name": "poorHitsPerSecond",
                "label": "Network Conditions (Poor) Hits/Sec"
            }
        ],
        "objectType": "cpcode",
        "objectIds": [
            "55232",
            "23433",
            "32433"
        ]
    },
    "data": [
        {
            "startdatetime": "2020-06-26T13:40:00Z",
            "excellentHitsPerSecond": "2056.374953",
            "goodHitsPerSecond": "4228.238748",
            "poorHitsPerSecond": "622.790063"
        },
        {
            "startdatetime": "2020-06-26T13:45:00Z",
            "excellentHitsPerSecond": "1789.492066",
            "goodHitsPerSecond": "767.334208",
            "poorHitsPerSecond": "4302.190955"
        },
        {
            "startdatetime": "2020-06-26T13:50:00Z",
            "excellentHitsPerSecond": "1664.250118",
            "goodHitsPerSecond": "4796.671828",
            "poorHitsPerSecond": "3797.269454"
        },
        {
            "startdatetime": "2020-06-26T13:55:00Z",
            "excellentHitsPerSecond": "3576.372709",
            "goodHitsPerSecond": "2831.494365",
            "poorHitsPerSecond": "2248.598014"
        }
    ],
    "summaryStatistics": {
        "adaptedHitsSlope": {
            "value": "809",
            "details": {}
        },
        "adaptedHitsTotal": {
            "value": "2364",
            "details": {}
        }
    }
}

Status 200 text/csv

Response Body:

#METADATA_START
name,aic-by-time
version,2
source,aic-by-time/versions/2
groupBy,startdatetime
start,2020-06-26T13:40:00Z
end,2020-06-26T14:00:00Z
interval,`FIVE_MINUTES`
availableDataEnds,
suggestedRetryTime,
rowCount,4
objectType,cpcode
objectIds,55232,23433,32433
network,mobile,non-mobile
#METADATA_END

#SUMMARYSTATISTICS_START
adaptedHitsSlope,809
adaptedHitsTotal,2364
#SUMMARYSTATISTICS_END

#COLUMNS_START
startdatetime,excellentHitsPerSecond,goodHitsPerSecond,poorHitsPerSecond
#COLUMNS_END

#DATA_START
2020-06-26T13:40:00Z,2056.374953,4228.238748,622.790063
2020-06-26T13:45:00Z,1789.492066,767.334208,4302.190955
2020-06-26T13:50:00Z,1664.250118,4796.671828,3797.269454
2020-06-26T13:55:00Z,3576.372709,2831.494365,2248.598014
#DATA_END

Get report details

This sample Get a report type operation gets the same information you need to run the aic-by-time report as provided in this reference documentation, but available dynamically to your API client application.

GET /reporting-api/v1/reports/aic-by-time/versions/2

Status 200 application/json

Object type: ReportType

Download schema: data-row-schema.json

Response body:

{
    "name": "aic-by-time",
    "description": "Provides the number of images compressed per second to improve performance, based on network conditions.",
    "businessObjectName": "cpcode",
    "version": 2,
    "status": "PUBLISHED",
    "deprecated": false,
    "timeBased": true,
    "outputType": "FLAT",
    "requiredProducts": [
        "Adaptive Image Compression"
    ],
    "requiredRoles": [
        "Widget Reports - View Only"
    ],
    "available": true,
    "metrics": [
        {
            "name": "poorHitsPerSecond",
            "description": "The rate of compressed images served per second to improve performance, based on poor network conditions.",
            "label": "Network Conditions (Poor) Hits/Sec",
            "unit": "COUNT_PER_SECOND",
            "summaryStatistic": false
        },
        {
            "name": "goodHitsPerSecond",
            "description": "The rate of compressed images served per second to improve performance, based on good network conditions.",
            "label": "Network Conditions (Good) Hits/Sec",
            "unit": "COUNT_PER_SECOND",
            "summaryStatistic": false
        },
        {
            "name": "excellentHitsPerSecond",
            "description": "The rate of compressed images served per second to improve performance, based on excellent network conditions.",
            "label": "Network Conditions (Excellent) Hits/Sec",
            "unit": "COUNT_PER_SECOND",
            "summaryStatistic": false
        },
        {
            "name": "adaptedHitsTotal",
            "description": "The number of compressed images served per second to improve performance, based on network conditions.",
            "label": "Total Adapted (or Compressed) Hits",
            "unit": "COUNT",
            "summaryStatistic": true
        },
        {
            "name": "adaptedHitsSlope",
            "description": "Total adapted (or compressed) hits slope.",
            "label": "Total Adapted (or Compressed) Hits Slope",
            "unit": "COUNT",
            "summaryStatistic": true
        }
    ],
    "groupOutlyingValues": {
        "enabled": false
    },
    "groupBy": [
        "startdatetime"
    ],
    "filters": [
        {
            "name": "network",
            "type": "enum",
            "description": "Type of network, either mobile or non-mobile. AIC images are compressed for performance based on network conditions.",
            "values": [
                {
                    "value": "non_mobile",
                    "description": "Non-mobile network. AIC images are compressed for performance based on network conditions."
                },
                {
                    "value": "mobile",
                    "description": "Non-mobile network. AIC images are compressed for performance based on network conditions."
                }
            ],
            "required": false
        }
    ],
    "intervals": [
        "MONTH",
        "WEEK",
        "DAY",
        "HOUR",
        "FIVE_MINUTES"
    ],
    "dataRetentionDays": 90,
    "links": [
        {
            "rel": "self",
            "href": "/reporting-reports-executor-api/v1/reports/aic-by-time/versions/2"
        },
        {
            "rel": "versions",
            "href": "/reporting-reports-executor-api/v1/reports/aic-by-time/versions"
        },
        {
            "rel": "all-reports",
            "href": "/reporting-reports-executor-api/v1/reports"
        },
        {
            "rel": "execute-report",
            "href": "/reporting-reports-executor-api/v1/reports/aic-by-time/versions/2/report-data"
        }
    ]
}