Skip to main content
POST
Run analytics query

Authorizations

Authorization
string
header
required

Use a valid Bearer token to authenticate.

Body

application/json

Batch of up to 12 queries

queries
object[]
required
Required array length: 1 - 12 elements
timeRange
object

Either preset, or both from and to as calendar dates YYYY-MM-DD (anything else, including 2026-02-30, relative words and datetimes, is 422 time_range_invalid), widened to whole days on the batch utcOffset. Maximum 31 days, inclusive.

hubIds
string[]

Narrow to these hubs: a list of 24-character hex hub ids (anything else is 422 hub_ids_invalid), each one of the caller's hubs (otherwise 403 hub_not_allowed). Omitted or [] = every hub the caller belongs to; a caller with no hub sees no rows.

utcOffset
string

Optional. The UTC offset (±HH:MM) day boundaries and dateHistogram buckets are cut on. Absent = the organization calendar (Asia/Jakarta, +07:00). Anything else is 422 utc_offset_invalid.

Pattern: ^[+-]\d{2}:\d{2}$
Example:

"+07:00"

mode
enum<string>

Request the compiled engine query (internal accounts only; ignored otherwise)

Available options:
debug
specVersion
integer

Accepted at batch level; the spec-level value is the one validated

Response

Success - one result per item, in request order. Individual items can still be error, timeout, no_data or no_permission.

status
boolean
Example:

true

specVersion
integer
Example:

1

resolvedTimeRange
object
results
object[]