v1

latestOpenAPI 3.0.02026-07-142351,1971.3 MB
Metrics

Query timeseries points

Query timeseries points.

get/api/v1/query

Query parameters

frominteger required

Start of the queried time period, seconds since the Unix epoch.

tointeger required

End of the queried time period, seconds since the Unix epoch.

querystring required

Query string.

Response

OK

errorstring

Message indicating the errors if status is not ok.

from_dateinteger

Start of requested time window, milliseconds since Unix epoch.

group_bystring[]

List of tag keys on which to group.

messagestring

Message indicating success if status is ok.

querystring

Query string

res_typestring

Type of response.

statusstring

Status of the query.

to_dateinteger

End of requested time window, milliseconds since Unix epoch.

Example response

{
  "res_type": "time_series",
  "series": [
    {
      "aggr": "avg",
      "display_name": "system.cpu.idle",
      "expression": "system.cpu.idle{host:foo,env:test}",
      "metric": "system.cpu.idle",
      "pointlist": [
        [
          1681683300000,
          77.62145685254418
        ]
      ],
      "scope": "host:foo,env:test",
      "unit": [
        {
          "family": "time",
          "name": "minute",
          "plural": "minutes",
          "scale_factor": 60,
          "short_name": "min"
        }
      ]
    }
  ],
  "status": "ok"
}