How the results are structured:

As you will see below, the results are shown in the same organized structure as the columns in the Intelligence User Interface. The first part of the response contains the data retrieved with the call, in a section called "rows". These results have a total row count, followed by the requested metrics. The columns names in the section called "headers" are ordered as they would be in Intelligence.  

Some more things to note:

  • Not every output will be relevant for your analysis. For example, arrangeType and alias are used for our internal processing, and will be delivered with the result only for the time being.
  • For the time being results will always show Raw Data but in the future it could be sample data. This is why you see "calculationDataType": "RAW_DATA" at the beginning of your results.
  • when you see 0000000000, this is the same as seeing the Total row heading in the Intelligence interface.


When using a time range, please make sure you include all the time you wish to see results for. Time value 1 is greater than or equal to the given time, time value 2 is less than. If you want to see all data for November 8th, the values should be set like so:

"value1": "2020-11-08 00:00:00",

"value2": "2020-11-09 00:00:00"


KPI

KPI Call

{
    "resultType": "DATA_ONLY",
    "queryObject": {
        "type": "KPI",
        "metricName": "pages_pageImpressions",
        "dimensionName": "time_days",
        "predefinedContainer": {
            "filters": [
                {
                    "name": "time_range",
                    "connector": "AND",
                    "filterPredicate": "BETWEEN",
                    "value1": "2020-10-14 00:00:00",
                    "value2": "2020-11-11 00:00:00",
                    "context": "NONE",
                    "caseSensitive": false
                }
            ],
            "containers": []
        }
    }
}
CODE



Sample KPI response

{
    "calculationDataType": "RAW_DATA", 
    "rows": [
        [
            "0000000000", // 
            1306 // -> page Impressions
        ]
    ],
    "rowCount": 1,
    "rowCountTotal": 1,
    "headers": [
        {
            "alias": "time_id_categories_t_year_month_day|0",
            "arrangeType": "time_id_categories_t_year_month_day",
            "sumPositions": [
                0
            ],
            "name": "time_days",
            "metric": false,
            "dimension": true
        },
        {
            "alias": "page_impressions|0",
            "arrangeType": "page_impressions",
            "name": "pages_pageImpressions",
            "metric": true,
            "dimension": false,
            "sortIndex": 1, 
            "sortDirection": "DESCENDING"
        }
    ],
    "columnCount": 2,
    "warnings": [],
    "information": [],
    "timerange": [
        "2020-10-14 00:00:00",
        "2020-11-11 00:00:00"
    ],
    "timestamp": "2022-10-18T15:35:45.404+0200"
}
CODE


KPI Comparison


KPI Comparison Call

{
    "resultType": "DATA_ONLY",
    "queryObject": {
        "type": "KPI",
        "metricName": "pages_pageImpressions",
        "dimensionName": "time_days",
        "predefinedContainer": {
            "filters": [
                {
                    "name": "time_range",
                    "connector": "AND",
                    "filterPredicate": "BETWEEN",
                    "value1": "2020-10-14 00:00:00",
                    "value2": "2020-11-11 00:00:00",
                    "context": "NONE",
                    "caseSensitive": false
                }
            ],
            "containers": []
        },
        "comparison": {
            "type": "PERIOD",
            "filter": {
                "name": "time_range",
                "value1": "2022-03-02 00:00:00",
                "value2": "2022-03-06 00:00:00",
                "filterPredicate": "BETWEEN",
                "connector": "AND",
                "context": "NONE",
                "caseSensitive": false
            }
    }
}
}
CODE

Sample KPI Comparison Response

{
    "calculationDataType": "RAW_DATA",
    "rows": [
        [
            "000000000"  // -> Total row indication
			1306,  	// -> Page Impressions KPI time range
            1502 	// -> Page Impressions comparison time range
        ]
    ],
    "rowCount": 1,
    "rowCountTotal": 1,
    "headers": [
        {
            "alias": "time_id_categories_t_year_month_day|0",  // -> Dimension Column for position of TOTAL (footer)
            "arrangeType": "time_id_categories_t_year_month_day",
            "sumPositions": [
                0
            ],
            "name": "time_days",
            "metric": false,
            "dimension": true
        },
        {
            "alias": "page_impressions|0",		// -> Page Impressions KPI time range
            "arrangeType": "page_impressions", 
            "name": "pages_pageImpressions",
            "metric": true,
            "dimension": false,
            "sortIndex": 1,
            "sortDirection": "DESCENDING"
        },
        {
            "alias": "page_impressions|1",		// -> Page Impressions comparison time range
            "arrangeType": "page_impressions",
			"name": "pages_pageImpressions",
            "metric": true,
            "dimension": false
        }
    ],
    "columnCount": 3,
    "warnings": [],
    "information": [],
    "timerange": [
        "2020-10-14T00:00:00.000+0200",
        "2020-11-11T00:00:00.000+0100"
    ],
    "timestamp": "2022-10-19T10:03:21.351+0200"
}
CODE


Sparkline


Sparkline Call

{
    "resultType": "DATA_ONLY",
    "queryObject": {
        "type": "SPARKLINE",
        "metricName": "pages_pageImpressions",
        "dimensionName": "time_days",
        "predefinedContainer": {
            "filters": [
                {
                    "name": "time_range",
                    "connector": "AND",
                    "filterPredicate": "BETWEEN",
                    "value1": "2020-10-14 00:00:00",
                    "value2": "2020-11-11 00:00:00",
                    "context": "NONE",
                    "caseSensitive": false
                }
            ],
            "containers": []
        }
    }
}
CODE

Sample Sparkline Response

{
    "calculationDataType": "RAW_DATA",
    "rows": [ // -> Sparkline Data Points
        [
            "20201014",
            408
        ],
        [
            "20201015",
            148
        ],
        ...
        [
            "0000000000",
            1306
        ]
    ],
    "rowCount": 29,
    "rowCountTotal": 28,
    "headers": [
        {
            "alias": "time_id_categories_t_year_month_day|0",   
            "arrangeType": "time_id_categories_t_year_month_day",
            "sumPositions": [
                28
            ],
            "name": "time_days", 
            "metric": false,
            "dimension": true,
            "sortIndex": 1,
            "sortDirection": "ASCENDING"
        },
        {
            "alias": "page_impressions|0",
            "arrangeType": "page_impressions",
            "name": "pages_pageImpressions",
            "metric": true,
            "dimension": false
        }
    ],
    "columnCount": 2,
    "information": [],
    "warnings": [],
    "timerange": [
        "2020-10-14 00:00:00",
        "2020-11-11 00:00:00"
    ],
    "timestamp": "2022-10-18T15:31:31.871+0200"
}
CODE


Comparison


Comparison call

{
    "resultType": "DATA_ONLY",
    "queryObject": {
        "columns": [
            {
                "name": "pages",
                "scope": "OBJECT",
                "context": "PAGE",
                "variant": "NORMAL",
                "lowerLimit": 1,
                "upperLimit": 20
            },
            {
                "name": "pages_pageImpressions",
                "columnPeriod": "ANALYSIS",
                "sortDirection": "DESCENDING",
                "sortIndex": 1, // mainly relevant in list view mode, in comparison view mode it is irrelevant given that there is a sorting section below. 
                "scope": "OBJECT",
                "context": "PAGE",
                "variant": "NORMAL"
            }
        ],
        "viewMode": {
            "active": "comparison",
            "comparison": {
                "type": "time",
                "values": {
                    "time": [
                        {
                            "name": "time_range",
                            "filterPredicate": "BETWEEN",
                            "connector": "AND",
                            "caseSensitive": false,
                            "context": "NONE",
                            "value1": "2022-09-19 00:00:00",
                            "value2": "2022-10-17 00:00:00"
                        },
                        {
                            "name": "time_range",
                            "filterPredicate": "BETWEEN",
                            "connector": "AND",
                            "caseSensitive": false,
                            "context": "NONE",
                            "value1": "2022-08-22 00:00:00",
                            "value2": "2022-09-19 00:00:00"
                        },
                        {
                            "name": "time_range",
                            "value1": "2022-07-01 00:00:00",
                            "value2": "2022-07-05 00:00:00",
                            "filterPredicate": "BETWEEN",
                            "connector": "AND",
                            "context": "NONE",
                            "caseSensitive": false
                        }
                    ],
                    "segment": []
                },
                "sorting": { // if you switched to list view mode, this section would be omitted.
                    "time": [
                        {
                            "alias": "page_impressions|0",
                            "direction": "DESCENDING"
                        }
                    ],
                    "segment": []
                }
            }
        },
        "variant": "LIST",
        "predefinedContainer": {
            "filters": [
                {
                    "name": "time_range",
                    "filterPredicate": "BETWEEN",
                    "connector": "AND",
                    "caseSensitive": false,
                    "context": "NONE",
                    "value1": "2022-09-19 00:00:00",
                    "value2": "2022-10-17 00:00:00"
                }
            ],
            "containers": []
        }
    }
}
CODE

Sample Comparison Response

{
    "calculationDataType": "RAW_DATA",
    "rows": [
        [
            "en.catalogsearch.result",
            1211386,         	//-> Page Impressions time range 1 (2022-09-19 - 2022-10-17)
            1167441,			//-> Page Impressions time range 2 (2022-08-22 - 2022-09-19)
            164006,				//-> Page Impressions time range 3 (2022-07-01 - 2022-07-0)
            3.764215921832445,	//-> Page Impressions delta %  (time range 1 and  2)
            43945,				//-> Page Impressions delta absolut  (time range 1 and 2)
            638.6229772081509,	//-> Page Impressions delta %  (time range 1 and 3)
            1047380				//-> Page Impressions delta %  (time range 1 and 3)
        ],
        [
            "en.home",
            652346,
            625016,
            87226,
            4.372688059185691,
            27330,
            647.8802192006971,
            565120
        ],
         ...
        [
            "0000000000",
            8889290,
            8555025,
            1199137,
            3.9072358058567858,
            334265,
            641.3072901595064,
            7690153
        ]
    ],
    "rowCount": 21,
    "rowCountTotal": 101,
    "headers": [
        {
			"alias": "content|0",
            "arrangeType": "content",
            "sumPositions": [
                20
            ],
            "name": "pages",
            "metric": false,
            "dimension": true
        },
        {
            "alias": "page_impressions|0",  //-> Page Impressions time range 1 (2022-09-19 - 2022-10-17)
            "arrangeType": "page_impressions",
            "name": "pages_pageImpressions",
            "metric": true,
            "dimension": false,
            "sortIndex": 1,
            "sortDirection": "DESCENDING"
        },
        {
            "alias": "page_impressions|1", //-> Page Impressions time range 2 (2022-08-22 - 2022-09-19)
            "arrangeType": "page_impressions",
            "name": "pages_pageImpressions",
            "metric": true,
            "dimension": false
        },
        {
            "alias": "page_impressions|2", //-> Page Impressions time range 3 (2022-07-01 - 2022-07-0)
            "arrangeType": "page_impressions",
            "name": "pages_pageImpressions",
            "metric": true,
            "dimension": false
        },
        {
            "alias": "page_impressions|3", //-> Page Impressions delta %  (time range 1 and  2)
            "arrangeType": "page_impressions",
            "name": "pages_pageImpressions",
            "metric": true,
            "dimension": false
        },
        {
            "alias": "page_impressions|4", //-> Page Impressions delta absolut  (time range 1 and 2)
            "arrangeType": "page_impressions",
            "name": "pages_pageImpressions",
            "metric": true,
            "dimension": false
        },
        {
            "alias": "page_impressions|5", //-> Page Impressions delta %  (time range 1 and 3)
            "arrangeType": "page_impressions",
            "name": "pages_pageImpressions",
            "metric": true,
            "dimension": false
        },
        {
            "alias": "page_impressions|6", //-> Page Impressions delta %  (time range 1 and 3)
            "arrangeType": "page_impressions",
            "name": "pages_pageImpressions",
            "metric": true,
            "dimension": false
        }
    ],
    "columnCount": 8,
    "information": [],
    "warnings": [],
    "timerange": [
        "2022-07-01T00:00:00.000+0200",
        "2022-10-17T00:00:00.000+0200"
    ],
    "timestamp": "2022-10-17T11:08:47.369+0200"
}
CODE