SensApp

Simple PromQL query endpoint.

Changed on

Parses a PromQL expression and returns matching time series data. Only simple selectors (VectorSelector and MatrixSelector) are supported.

Examples

  • Simple metric: GET /api/v1/query?query=my_metric
  • With labels: GET /api/v1/query?query=my_metric{env="prod"}
  • Range query: GET /api/v1/query?query=my_metric[5m]
  • With format: GET /api/v1/query?query=my_metric&format=csv
get/api/v1/query

Request

  • The document declares no server URL.
  • Auth: HTTP bearer

Query parameters

querystring required

PromQL query string (e.g., 'my_metric{label="value"}' or 'my_metric[5m]')

formatstring

Output format: senml (default), csv, jsonl, or arrow

stepstring

Bucket width for aggregation queries, using Prometheus duration syntax (e.g., '5m'). Without it, the whole window is one bucket

Response

Query results in requested format

unknown required

Changes

    • info

      the endpoint scheme security bearer was added to the API

    • info

      added the new optional query request parameter step

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status