---
title: "GET /api/v1/metrics/checks/query/"
method: GET
path: "/api/v1/metrics/checks/query/"
tags: ["metrics"]
---

# GET /api/v1/metrics/checks/query/

`GET /api/v1/metrics/checks/query/`

## Request

- Base URL: `https://uptime.com` (the document declares no server; this is the origin it was published from)
- URL: `https://uptime.com/api/v1/metrics/checks/query/`
- Auth: none declared
- TypeScript: <https://skmtc.dev/uptime/apis/uptime-com-openapi-schema/docs/api/v1/metrics/checks/query/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns time-series datapoints with time bucketing and aggregation for one check.

``data_type`` and ``metrics`` are optional — same defaults as the raw endpoint.
``granularity`` defaults to ``auto``; ``aggregation`` defaults to ``avg``.

Accepts both ``GET`` and ``POST`` with identical semantics.

## Query parameters

- `check_id` integer, required
- `data_type` string
- `metrics` unknown[]
  - unknown
- `start_date` string
- `end_date` string
- `granularity` 'auto' | '1min' | '15min' | '1hour' | '1day' | '1week' | '1month'
- `aggregation` 'avg' | 'min' | 'max' | 'sum' | 'count' | 'median' | 'p75' | 'p90' | 'p95' | 'p99'
- `filters` object
- `group_by` unknown[]
  - unknown
- `limit` integer

## Response `200`

- MetricsQuery
  - `check_id` integer, required: The check to query.
  - `data_type` string: MDB data type (e.g. ``http``, ``pagespeed``, ``float``). When omitted, resolved from the check's check type.
  - `metrics` string[]: Metric names to return. Pass as repeated query params in GET (``metrics=a&metrics=b``) or as a JSON array in POST. **When omitted, only the first metric defined for the data type is returned.** Always specify the metrics you actually need. The default selection is not part of the API contract and may change.
  - `start_date` string, date-time: Range start (ISO 8601, UTC). Defaults to 24 hours ago.
  - `end_date` string, date-time: Range end (ISO 8601, UTC). Defaults to now.
  - `granularity` 'auto' | '1min' | '15min' | '1hour' | '1day' | '1week' | '1month': Time bucketing (default: ``auto``).
  - `aggregation` 'avg' | 'min' | 'max' | 'sum' | 'count' | 'median' | 'p75' | 'p90' | 'p95' | 'p99': Aggregation function (default: ``avg``).
  - `filters` object: Dimension filters (POST only). Object with dimension names as keys and arrays of values: ``{"location": ["us-east-1"]}``. In GET, pass dimensions as direct query params instead (``location=us-east-1&location=eu-west-1``).
  - `group_by` string[]: Dimensions to group by. Pass as repeated query params in GET (``group_by=location&group_by=step_number``) or as a JSON array in POST.
  - `limit` integer, nullable: Max total datapoints across all series (default: 5000, max: 50000).

---

[API](https://skmtc.dev/uptime/apis/uptime-com-openapi-schema.md) - [All operations](https://skmtc.dev/uptime/apis/uptime-com-openapi-schema/llms.txt) - [OpenAPI document](https://skmtc.dev/uptime/apis/uptime-com-openapi-schema/revisions/e1e4a57a60d8?raw)
