Test a draft SQL metric query
Run a draft SQL Float metric query against a fixed sample SimulationDataFrames
artifact and return the value it would produce. This is org-agnostic pure compute —
it never touches your organization’s data — so it needs no metric to exist yet and
makes no changes.
Use GET /v1/metrics/sql-schema to discover the tables, columns, and sample rows
your query runs against. The query must return the columns start_offset_milliseconds
and value.
Routine authoring failures (invalid SQL, no matching rows) return 200 with a
populated error field rather than an HTTP error; only a malformed request body is a
400.
Authorizations
API key for authentication
Body
Response
Query evaluated (check error for authoring failures)
The aggregated metric value, or null when the query produced no value.
Number of rows the query returned against the sample data.
Set when the query could not be evaluated (invalid SQL, missing columns, or no matching rows). Present on a 200 response — routine authoring failures are not HTTP errors.