Get query result
const url = 'https://example.com/api/v1.25f/queries/0196291a-0931-7d5d-8b7d-4f0d6c0f1a2b/result';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1.25f/queries/0196291a-0931-7d5d-8b7d-4f0d6c0f1a2b/result \ --header 'Authorization: <Authorization>'Retrieve the result of a completed query. Results expire after TTL.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query ID returned from measurement query submission
Example
0196291a-0931-7d5d-8b7d-4f0d6c0f1a2bResponses
Section titled “Responses”Query result retrieved
object
Query identifier
Result state:
- preparing: Normalization jobs running
- running: SQL query executing
- done: Query completed successfully
- error: Query failed with error
- none: Initial state, no data
Result type discriminator
Array of measurements (only present when state=done)
object
Device ID
Metric ID
Phase identifier.
"": non-phased metric row"1","2","3": normal customer-facing electrical phases"4": legacy redundant raw-data channel that should usually be ignored
Physical or logical stream discriminator for same-device same-metric rows. Empty string means the metric has no separate channel.
Measurement timestamp (RFC3339 Zulu)
Rate value (GAUGE rates, COUNTER deltas per second)
Raw counter value (for COUNTER metrics)
How many seconds this value is valid for
Fuse or breaker states, ordered by fuse position. 1 means closed/on and 0 means open/off.
object
Lowest bucket boundary included in the histogram
Highest bucket boundary included in the histogram
Total number of samples represented by the histogram
Histogram buckets in ascending order
object
Human-readable bucket label
Inclusive bucket lower boundary
Exclusive bucket upper boundary
Number of samples in the bucket
Quality status
Quality issue flags
object
Query execution time in seconds
Whether result was cached
object
Error code for programmatic handling
Human-readable error message
Suggested actions (for future guidance framework)
Allowed values for failed validation (for future guidance framework)
object
Examples
Counter and gauge rows
{ "query_id": "0196291a-0931-7d5d-8b7d-4f0d6c0f1a2b", "state": "done", "type": "measurement_timeseries", "metadata": { "execution_time": 0.18, "cache_status": "miss" }, "measurements": [ { "device_id": 210404, "metric_id": 4007, "channel": "", "phase": "1", "measurement_time": "2026-01-15T10:15:00Z", "val_rate": 0.0002777778, "val_counter": 15234.5, "validity_sec": 900, "val_complex": null, "quality_status": "ok", "quality_flags": [] }, { "device_id": 210404, "metric_id": 4001, "channel": "", "phase": "1", "measurement_time": "2026-01-15T10:15:00Z", "val_rate": 229.8, "val_counter": null, "validity_sec": 900, "val_complex": null, "quality_status": "ok", "quality_flags": [] } ]}Supported `val_complex` payload shapes
{ "query_id": "0196291a-0931-7d5d-8b7d-4f0d6c0f1a2b", "state": "done", "type": "measurement_timeseries", "metadata": { "execution_time": 0.22, "cache_status": "miss" }, "measurements": [ { "device_id": 210404, "metric_id": 6001, "channel": "", "phase": "", "measurement_time": "2026-01-15T10:15:00Z", "val_rate": null, "val_counter": null, "validity_sec": 900, "val_complex": [ 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1 ], "quality_status": "ok", "quality_flags": [] }, { "device_id": 210404, "metric_id": 7001, "channel": "", "phase": "2", "measurement_time": "2026-01-15T10:15:00Z", "val_rate": null, "val_counter": null, "validity_sec": 900, "val_complex": { "min": 220, "max": 224, "total_count": 50, "buckets": [ { "label": "220-221", "min": 220, "max": 221, "count": 10 }, { "label": "221-222", "min": 221, "max": 222, "count": 20 }, { "label": "222-223", "min": 222, "max": 223, "count": 15 }, { "label": "223-224", "min": 223, "max": 224, "count": 5 } ] }, "quality_status": "ok", "quality_flags": [] } ]}default
Section titled “default”Error response with details
object
Description of the error
Parent error if this is a nested error
Examples
Invalid time range error
{ "error": "time_to must be after time_from"}Unauthorized access error
{ "error": "invalid token"}