aic-by-time

🚧

Adaptive Image Compression is being discontinued

Starting from May 31, 2024, Adaptive Image Compression is no longer supported. As an alternative, we offer Image & Video Manager. It intelligently and automatically optimizes images and videos on the fly for every user. It's easy to deploy and requires no changes to your original code, files, servers, or processes.

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

MetricDescription
Data metrics
excellentHitsPerSecondThe rate of compressed images served per second to improve performance, based on excellent network conditions.
goodHitsPerSecondThe rate of compressed images served per second to improve performance, based on good network conditions.
poorHitsPerSecondThe rate of compressed images served per second to improve performance, based on poor network conditions.
Summary metrics
adaptedHitsSlopeTotal adapted (or compressed) hits slope.
adaptedHitsTotalThe number of compressed images served per second to improve performance, based on network conditions.

Available filters

FilterTypeDescription
Optional filters
networkEnumerationType 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.

POST request

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

Query parameters

ParameterTypeSampleDescription
Required
startString2020-06-26T13:40:00ZSpecifies 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.
endString2020-06-26T14:00:00ZSpecifies 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.
intervalEnumerationFIVE_MINUTESThe duration of each data record. Available values: MONTH, WEEK, DAY, HOUR, FIVE_MINUTES.

JSON request members

MemberTypeDescription
objectIdsArraySpecifies the set of cpcode values you want to report on.
objectIdsEnumerationAs an alternative to an array of ID values, specify all as a string for unfiltered data. Either way, objectIds is required.
metricsArrayThe set of desired metrics. If omitted, the report includes all available metrics.
filtersMap of arraysSpecifies 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 request

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

ParameterTypeSampleDescription
Required
startString2022-06-23T13:55:00ZSpecifies 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.
endString2022-06-23T14:15:00ZSpecifies 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.
intervalEnumerationFIVE_MINUTESThe duration of each data record. Available values: MONTH, WEEK, DAY, HOUR, FIVE_MINUTES.
Optional
allObjectIdsBooleantrueAs 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.
objectIdsString55232,​23433,​32433As 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.
metricsStringadaptedHitsSlope,​adaptedHitsTotalSpecifies 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.
filtersStringnetwork=​mobile,​network=​non-mobileSpecifies 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.

JSON response

Status 200 application/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": {}
        }
    }
}

CSV response

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

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": "DEPRECATED",
    "deprecated": true,
    "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-api/v1/reports/aic-by-time/versions/2"
        },
        {
            "rel": "versions",
            "href": "/reporting-api/v1/reports/aic-by-time/versions"
        },
        {
            "rel": "all-reports",
            "href": "/reporting-api/v1/reports"
        },
        {
            "rel": "execute-report",
            "href": "/reporting-api/v1/reports/aic-by-time/versions/2/report-data"
        }
    ]
}