Aggregations
Get summarised metrics for a content item.
Changed onReturns a summary of a metric based on data collected over a time period.
get/metrics/{base_path}
Request
- Base URLhttps://content-data-api.publishing.service.gov.uk/api/v1
- URLhttps://content-data-api.publishing.service.gov.uk/api/v1/metrics/{base_path}
- AuthHTTP bearer
Path parameters
base_pathstring required
Example:/vat-rates
A GOV.UK base path. A reserved URL on www.gov.uk that is associated with a content item.
metricsstring required
Example:pviews
The names of metrics.
Query parameters
fromstring required
Example:2018-01-01
From date in the format 'YYYY-MM-DD'. Only data collected on or after this date will be included.
tostring required
Example:2018-01-01
To date in the format 'YYYY-MM-DD'. Only data collected on or before this date will be included.
Response
Success response
Summary Response required
Summary information keyed by metric ID.
Changes
- info
for the
queryrequest parameterfrom, the type was generalized fromdatetostring - info
for the
queryrequest parameterto, the type was generalized fromdatetostring
- info
- info
endpoint added
- info