---
title: "Performs a time series query"
method: GET
path: "/series/query"
tags: ["SCALABLE TIME SERIES"]
---

# Performs a time series query

`GET /series/query`

The query is in the format described in [pmseries](https://man7.org/linux/man-pages/man1/pmseries.1.html)(1) and is passed to the server via either the *expr* parameter (HTTP GET) or via the message body (HTTP POST).

When querying for time series matches only, no time window options are specified and matching series identifiers are returned in a JSON array.
```bash
$ curl -s 'http://localhost:44322/series/query?expr=disk.dev.read*' | pmjson
```
When querying for time series values as well, a time window must be specified as part of the query string. The simplest form is to just request the most recent sample.
```bash
$ curl -s 'http://localhost:44322/series/query?expr=disk.dev.read*[samples:1]' | pmjson
```
**References:** [pmSeriesQuery](https://man7.org/linux/man-pages/man3/pmSeriesQuery.3.html)(3)

## Query parameters

- `expr` string
- `client` string

## Response `200`

OK

## Changes

- **2020-10-20** `22da063d564f` — 2 info
  - added `#/components/schemas/seriesIDs, #/components/schemas/seriesValues` to the response body `anyOf` list for the response status `200`
  - removed `#/components/schemas/response1, #/components/schemas/response2` from the response body `anyOf` list for the response status `200`
- **2020-10-20** `7da0633fad91` — 2 info
  - added `#/components/schemas/response1, #/components/schemas/response2` to the response body `anyOf` list for the response status `200`
  - removed `#/components/schemas/seriesIDs, #/components/schemas/seriesValues` from the response body `anyOf` list for the response status `200`

[Change history](https://skmtc.dev/performancecopilot/apis/pmwebapi/changes/series/query/get.md)

---

[API](https://skmtc.dev/performancecopilot/apis/pmwebapi.md) · [All operations](https://skmtc.dev/performancecopilot/apis/pmwebapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/performancecopilot/pmwebapi/revisions/666212c8ed6b/schema)
