Aggregations

Get summarised metrics for a content item.

Changed on

Returns a summary of a metric based on data collected over a time period.

get/metrics/{base_path}

Request

  • Base URL
    https://content-data-api.publishing.service.gov.uk/api/v1
  • URL
    https://content-data-api.publishing.service.gov.uk/api/v1/metrics/{base_path}
  • Auth
    HTTP 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

SummaryResponse required

Summary information keyed by metric ID.

Changes