Skip to content

Submit measurement query

POST
/measurements
curl --request POST \
--url https://example.com/api/v1.25f/measurements \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "type": "timeseries", "device_ids": [ 210404 ], "metric_ids": [ 4007 ], "time_from": "2026-01-15T10:00:00Z", "time_to": "2026-01-15T10:15:00Z" }'

Submit a timeseries measurement query for async execution. Returns immediately with query_id. When quality_filter is omitted, the API defaults to ok. Short windows such as 5, 15, or 30 minutes are supported.

Media typeapplication/json
object
type
required

Query type discriminator

string
Allowed values: timeseries
device_ids
required

Device IDs to query

Array<integer>
>= 1 items
metric_ids
required

Metric IDs to query

Array<integer>
>= 1 items
time_from
required

Start of time range (inclusive), RFC3339 Zulu. Short windows such as 5, 15, or 30 minutes are allowed.

string format: date-time
time_to
required

End of time range (inclusive), RFC3339 Zulu. Short windows such as 5, 15, or 30 minutes are allowed.

string format: date-time
phase_filter

Filter to a specific phase.

  • 1, 2, 3: normal customer-facing electrical phases
  • 4: legacy redundant raw-data channel for some Gridlink and Gridmate metrics
  • omitted: returns phases 1, 2, and 3, plus non-phased rows with empty phase values
integer format: int32
nullable
channel_filter

Filter to a specific channel.

  • "": empty-channel metrics
  • omitted or null: returns all channels as separate rows
  • provided values are matched with direct equality
string
nullable
quality_filter

Filter by quality status.

  • ok is the default and is recommended for business calculations
  • not-ok is useful for debugging or data-quality investigations
  • all returns both good and bad rows
string
default: ok
Allowed values: ok not-ok all

Examples

Query a short counter window with default quality handling

{
"type": "timeseries",
"device_ids": [
210404
],
"metric_ids": [
4007
],
"time_from": "2026-01-15T10:00:00Z",
"time_to": "2026-01-15T10:15:00Z"
}

Query submitted successfully

Media typeapplication/json
object
query_id
required

Unique query identifier for status checking and result retrieval

string

Examples

Examplequery_submission

Example submission response

{
"query_id": "0196291a-0931-7d5d-8b7d-4f0d6c0f1a2b"
}

Error response with details

Media typeapplication/json
object
error
required

Description of the error

string
parent

Parent error if this is a nested error

string

Examples

Invalid time range error

{
"error": "time_to must be after time_from"
}