metrics

POST /v1/metrics/{metricId}/query

Query data for a metric, optionally for a specific slice. Returns metric values for the requested date range. Omit timeGrain for a single aggregate over the period; set it for time-series data. Supports breakdown dimensions and filters.

Request

  • Base URL
    https://help.steep.app (the document declares no server; this is the origin it was published from)
  • Auth
    none declared

Path parameters

metricIdstring required

metric.id — Unique resource ID (opaque).

Request body

timeGrain'daily' | 'weekly' | 'monthly' | 'quarterly' | 'yearly'

Time grain for aggregation. Omit for a single aggregate over the whole period. Most metrics accept any range, but for a metric with restricted grains (check its allowed time grains) both ends must align to whole-period boundaries of an allowed grain — and without an explicit timeGrain the range may have to be a single whole period, so to span several periods set timeGrain to an allowed grain and align to its boundaries. E.g. a monthly-only metric: one whole calendar month 2026-05-01 to 2026-05-31, or timeGrain=monthly over month-aligned dates to span months; never use today's date as a boundary (2026-06-01 to 2026-06-24 is rejected).

fromDatestring required

Start of the query period (ISO 8601). Inclusive — it is part of the range, so a colloquial period spans exactly its calendar days. With a timeGrain, align to the first day of a period (e.g. monthly: 2026-05-01).

toDatestring required

End of the query period (ISO 8601). Inclusive — the last day counts, so one month is 2026-05-01 to 2026-05-31, not 2026-06-01. With a timeGrain, align to the last day of a period (e.g. monthly: 2026-05-31).

breakdownDimensionIdsstring[]

Dimension ids to break down by.

sliceIdstring

Slice id to fetch query data for.

limitinteger

Maximum number of rows to return. When the row limit is reached, response hasMore is true. For a more complete result, increase limit or reduce the result set (eg. shorter time period, coarser timeGrain, stricter filters).

Response

Response for status 200

cacheTtlInSecondsnumber required
refreshedAtstring date-time required
sqlstring required
limitnumber required

The effective row limit applied to this query.

hasMoreboolean required

Indicates there is more data beyond the row limit.

Changes

No recorded changes to this operation across all 1 revision of this API.