---
title: "List measurements for a batch of metrics"
method: POST
path: "/v1/metrics/measurements"
tags: ["metrics"]
---

# List measurements for a batch of metrics

`POST /v1/metrics/measurements`

List metric measurements, potentially filtered and aggregated. This operation mimics the
  capabilities found in GET `/v1/metrics/{name}/measurements`, extending it for an entire batch of
  metrics that can be requested at once, over the same time interval.

  It is legal to request the same metric multiple times, using different aggregations. For
  example, both the total for the interval (scalar) and a time series can be read simultaneously,
  using two different entries in the request payload. Entries in the response can be matched with
  the respective requests by metric name. When more than one exist for the same name, an `id`
  can be provided to disambiguate. This property will be echoed back unchanged and can be used
  for some or all entries, regardless of whether metrics repeat.

  By default, this endpoint will omit response entries that include no measurements. This is done
  only when the request contains enough information for the client to successfully match all
  responses back to their respective requests—i.e., when there is at most one entry for each
  combination of metric name and `id`. This provides a cleaner response, especially in case where
  multiple pages need to be traversed and data for most metric entries is exhausted early.
  Otherwise, empty entries will be included as well and the output will be fully positional. This
  positional mode can be forced with `forcePositional`.

  Pages can be navigated by following the links returned in `pageInfo`. Those requests must also
  be POST and must include the same payload that was initially sent. Behavior is undefined
  otherwise.

## Query parameters

- `forcePositional` boolean
- `pageSize` integer
- `skipToken` string

## Request body

- object
  - `metrics` MetricsMeasurementsRequest[], required — List of metric measurement requests.
    - `id` string — Optional identifier that will be echoed back for matching.
    - `name` string, required — Metric name.
    - `filter` string — Query to filter the measurement values.
    - `groupBy` string[] — List of attribute names to group measurements by.
    - `aggregateBy` 'AVG' | 'COUNT' | 'MIN' | 'MAX' | 'SUM' | 'LAST'
    - `preGroupBy` string[] — Secondary grouping, allowing aggregation inside individual buckets. Has to be set together with `preGroupByMethod`.
    - `preGroupByMethod` 'AVG' | 'COUNT' | 'MIN' | 'MAX' | 'SUM' | 'LAST'
    - `seriesType` 'TIMESERIES' | 'SCALAR'
    - `fillMethod` 'NONE' | 'ZERO_FILL' | 'NULL_FILL' | 'LAST_VALUE_FILL'
    - `fillIfEmpty` boolean — Asks for filling even if no data points were found in the range.
  - `startTime` string, date-time — Timestamp in ISO 8601 format in UTC timezone: yyyy-MM-ddTHH:mm:ssZ
  - `endTime` string, date-time — Timestamp in ISO 8601 format in UTC timezone: yyyy-MM-ddTHH:mm:ssZ

## Response `200`

The request has succeeded.

- object
  - `metrics` object[], required — Metric measurement results.
    - `id` string — Entry identification, as (if) provided in the corresponding request entry.
    - `name` string, required — Metric name.
    - `groupings` MetricsGrouping[], required — Collection of attributes and measurements.
      - `attributes` CommonKeyValuePair[], required — Attribute key-value pairs identifying this grouping.
        - `key` string, required — Key.
        - `value` string, required — Value.
      - `measurements` MetricsMeasurement[], required — An empty list indicates no data points are available.
        - `time` string, date-time, required — Time of the measurement.
        - `value` number, double, nullable, required — Value of the measurement.
    - `bucketSizeInSeconds` integer, required — Bucket size used for computing points in this entry.
  - `pageInfo` CommonPageInfo, required
    - `prevPage` string, required — Token for the previous page, or empty string if on the first page.
    - `nextPage` string, required — Token for the next page, or empty string if on the last page.

## Other responses

- `400` — The server could not understand the request due to invalid syntax.
- `401` — Access is unauthorized.
- `500` — Server error

---

[API](https://skmtc.net/solarwinds/apis/solarwinds-observability.md) · [All operations](https://skmtc.net/solarwinds/apis/solarwinds-observability/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/solarwinds/solarwinds-observability/revisions/994e5ca64961/schema)
