Skip to main content
POST
Get sample rows

Authorizations

Authorization
string
header
required

Use a valid Bearer token to authenticate.

Body

application/json
spec
object
required

One query spec, exactly as an item spec of Run analytics query. Only the keys specVersion, timeRange, hubIds, utcOffset and spec are allowed at the top level (422 unknown_key); a missing or non-object spec is 422 query_spec_missing.

specVersion
integer

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

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, dateHistogram buckets and the hourOfDay/dayOfWeek 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"

Response

Success - columns in previewColumns order, rows as positional arrays (at most 20). A missing value is null; several values are joined with ", "; a geolocation column is the raw text "lat, lng" (for example "-6.2, 106.817"); dates are epoch milliseconds; numbers are decimals (travelDuration in minutes, unit: duration).

status
boolean
Example:

true

specVersion
integer
Example:

1

resolvedTimeRange
object
columns
object[]
rows
object[][]

At most 20 rows. A row never carries a storage path; the task id (_id), refId and email columns (e.g. assignee, createdBy) are shown.

meta
object