Skip to main content
POST
Run Explore query

Restrictions

Usage

  • Use this endpoint when you need the data source’s native result shape; /monit/query/data returns the stable query_result.v1 contract instead. Dispatch on data.result.kind (frames, samples, or logs) here.
  • execution.kind decides which companion fields are accepted: instant needs only to_ms, range requires from_ms, to_ms, and max_data_points, and window takes from_ms and to_ms. step_seconds is not accepted; the step is derived from max_data_points and min_step_seconds.
  • args carries macro substitutions such as Grafana-style variables; every value is a string.
  • A logs result is capped at 1,000 entries and reports applied_limit plus has_more. Time-series and sample results are capped at 1,000 items each and the whole success response at 8 MiB.
  • Query execution may take up to 35 seconds across WebAPI forwarding and Edge execution. Configure client timeouts to at least 40 seconds.

Authorizations

app_key
string
query
required

App key issued from the Flashduty console under Account → APP Keys. Required on every public API call. Keep it secret — it grants the same access as the owning account.

Body

application/json

Explore query request. All four top-level fields are required and unknown fields are rejected.

datasource_id
integer<int64>
required

Data source ID from /monit/datasource/list. Must be a positive JavaScript-safe integer and belong to the authenticated account.

Required range: 1 <= x <= 9007199254740991
expr
string
required

Query expression in the data source's native language (PromQL, LogsQL, SQL, and so on). Non-empty UTF-8 of at most 64 KiB; some data source types enforce a lower limit.

Minimum string length: 1
args
object
required

Macro substitutions keyed by variable name, used for Grafana-style variables. Keys are at most 256 bytes, values at most 64 KiB, with a 128 KiB total budget.

execution
object
required

Time semantics of the query. The accepted companion fields depend on kind: instant takes only to_ms (plus optional from_ms), range requires from_ms, to_ms, and max_data_points, and window takes only from_ms and to_ms. step_seconds is never accepted over HTTP.

Response

Success

Success response envelope. On every 2xx response, request_id identifies the call (also mirrored in the Flashcat-Request-Id header) and data holds the endpoint-specific payload. Failure responses use a different shape — see ErrorResponse.

request_id
string
required

Unique ID for this request. Mirrored in the Flashcat-Request-Id response header. Include it when reporting issues.

Example:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"

data
object
required

Explore query result payload.