The pv-by-time report is being discontinued
This report is deprecated and will be deactivated on January 16, 2025.
The following shows how to generate the pv-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
Returns page view (text/html file delivery) data over time.
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: 92 days
Available metrics
Metric | Description |
---|---|
Data metrics | |
pageViewsPerSecond | The rate of page file delivery. |
Summary metrics | |
pageViewsPerSecondMax | The highest number of page views. |
pageViewsPerSecondMin | The lowest number of page views. |
pageViewsSlope | Represents the overall change in the number of page views over time, a positive number if increasing or a negative number if decreasing. |
pageViewsTotal | The total number of page views. |
POST request
POST /reporting-api/v1/reports/pv-by-time/versions/1/report-data{?start,end,interval}
Sample: /reporting-api/v1/reports/pv-by-time/versions/1/report-data?start=2020-06-26T13%3A40%3A00Z&end=2020-06-26T14%3A00%3A00Z&interval=FIVE_MINUTES
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. |
Request body:
{
"objectIds": [
"55232",
"23433",
"32433"
],
"metrics": [
"pageViewsPerSecond",
"pageViewsPerSecondMax",
"pageViewsPerSecondMin",
"pageViewsSlope",
"pageViewsTotal"
]
}
GET request
GET /reporting-api/v1/reports/pv-by-time/versions/1/report-data{?start,end,interval,objectIds,allObjectIds,metrics}
Sample: /reporting-api/v1/reports/pv-by-time/versions/1/report-data?start=2020-06-26T13%3A40%3A00Z&end=2020-06-26T14%3A00%3A00Z&interval=FIVE_MINUTES&objectIds=55232,23433,32433&metrics=pageViewsPerSecond%2CpageViewsPerSecondMax
Query parameters
Parameter | Type | Sample | Description |
---|---|---|---|
Required | |||
start | String | 2022-06-23T13:55: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 | 2022-06-23T14:15: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 . |
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 | pageViewsPerSecond,pageViewsPerSecondMax | 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. |
JSON response
Status 200 application/json
Response body:
{
"metadata": {
"name": "pv-by-time",
"version": "1",
"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": [],
"columns": [
{
"name": "groupBy",
"label": "startdatetime"
},
{
"name": "pageViewsPerSecond",
"label": "Page Views/Sec"
}
],
"objectType": "cpcode",
"objectIds": [
"55232",
"23433",
"32433"
]
},
"data": [
{
"startdatetime": "2020-06-26T13:40:00Z",
"pageViewsPerSecond": "907.113227"
},
{
"startdatetime": "2020-06-26T13:45:00Z",
"pageViewsPerSecond": "1655.120068"
},
{
"startdatetime": "2020-06-26T13:50:00Z",
"pageViewsPerSecond": "4422.110764"
},
{
"startdatetime": "2020-06-26T13:55:00Z",
"pageViewsPerSecond": "4932.690005"
}
],
"summaryStatistics": {
"pageViewsPerSecondMax": {
"value": "1483.925459",
"details": {}
},
"pageViewsPerSecondMin": {
"value": "3530.210177",
"details": {}
},
"pageViewsSlope": {
"value": "1746",
"details": {}
},
"pageViewsTotal": {
"value": "3379",
"details": {}
}
}
}
CSV response
Status 200 text/csv
Response Body:
#METADATA_START
name,pv-by-time
version,1
source,pv-by-time/versions/1
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
#METADATA_END
#SUMMARYSTATISTICS_START
pageViewsPerSecondMax,1483.925459
pageViewsPerSecondMin,3530.210177
pageViewsSlope,1746
pageViewsTotal,3379
#SUMMARYSTATISTICS_END
#COLUMNS_START
startdatetime,pageViewsPerSecond
#COLUMNS_END
#DATA_START
2020-06-26T13:40:00Z,907.113227
2020-06-26T13:45:00Z,1655.120068
2020-06-26T13:50:00Z,4422.110764
2020-06-26T13:55:00Z,4932.690005
#DATA_END
Get report details
This sample Get a report type operation gets the same information you need to run the pv-by-time
report as provided in this reference documentation, but available dynamically to your API client application.
GET /reporting-api/v1/reports/pv-by-time/versions/1
Status 200 application/json
Response body:
{
"name": "pv-by-time",
"description": "Returns page view (text/html file delivery) data over time.",
"businessObjectName": "cpcode",
"version": 1,
"status": "DEPRECATED",
"deprecated": true,
"timeBased": true,
"outputType": "FLAT",
"requiredProducts": [
"Basic Traffic Reports"
],
"requiredRoles": [
"Reports - All privileges ",
"Reports - View only"
],
"available": true,
"metrics": [
{
"name": "pageViewsPerSecond",
"description": "The rate of page file delivery.",
"label": "Page Views/Sec",
"unit": "COUNT_PER_SECOND",
"summaryStatistic": false
},
{
"name": "pageViewsPerSecondMax",
"description": "The highest number of page views.",
"label": "Page Views/Sec Maximum",
"unit": "COUNT_PER_SECOND",
"summaryStatistic": true
},
{
"name": "pageViewsPerSecondMin",
"description": "The lowest number of page views.",
"label": "Page Views/Sec Minimum",
"unit": "COUNT_PER_SECOND",
"summaryStatistic": true
},
{
"name": "pageViewsSlope",
"description": "Represents the overall change in the number of page views over time, a positive number if increasing or a negative number if decreasing.",
"label": "Page Views Slope",
"unit": "COUNT",
"summaryStatistic": true
},
{
"name": "pageViewsTotal",
"description": "The total number of page views.",
"label": "Page Views Total",
"unit": "COUNT",
"summaryStatistic": true
}
],
"groupOutlyingValues": {
"enabled": false
},
"groupBy": [
"startdatetime"
],
"intervals": [
"MONTH",
"WEEK",
"DAY",
"HOUR",
"FIVE_MINUTES"
],
"dataRetentionDays": 92,
"links": [
{
"rel": "self",
"href": "/reporting-api/v1/reports/pv-by-time/versions/1"
},
{
"rel": "versions",
"href": "/reporting-api/v1/reports/pv-by-time/versions"
},
{
"rel": "all-reports",
"href": "/reporting-api/v1/reports"
},
{
"rel": "execute-report",
"href": "/reporting-api/v1/reports/pv-by-time/versions/1/report-data"
}
]
}