Skip to main content
POST
Run an analytics query

Authorizations

Authorization
string
header
required

Organization API key with the analytics:read scope.

Headers

x-request-id
string

Optional caller-supplied request ID. Values must contain 1–64 ASCII letters, digits, or ._:/=-; invalid values are replaced with a generated UUID.

Required string length: 1 - 64
Pattern: ^[A-Za-z0-9._:/=-]+$

Body

application/json
model
enum<string>
required

Catalog model name. The current catalog supports agent_runs and agent_user_activity.

Available options:
agent_runs,
agent_user_activity
Required string length: 1 - 64
metrics
string[]
required

Unique catalog metric names to select.

Required array length: 1 - 16 elements
Required string length: 1 - 64
range
object
required
dimensions
string[]

Unique catalog dimensions to group by.

Maximum array length: 8
Required string length: 1 - 64
filters
object[]

Dimension filters: eq with one value, or in with 1–50 values.

Maximum array length: 8
order
object[]

Up to eight unique order terms. Members must be selected metrics or dimensions. Totals queries cannot specify order terms.

Maximum array length: 8
limit
integer
default:100

Maximum rows returned per page.

Required range: 1 <= x <= 500
cursor
string

Opaque continuation cursor from a previous grouped response. Not accepted on totals or metric-ordered queries.

Required string length: 1 - 2048

Response

Columnar query results.

queryId
string<uuid>
required

Unique identifier for this execution.

catalogVersion
string
required

Catalog version used to produce this response.

asOf
string<date-time>
required

Inclusion boundary used for this response and any cursor continuation.

range
object
required
columns
object[]
required

Ordered column descriptors; a selected dimension is followed by its companions, then metrics.

rows
((string | number | enum<string> | null)[])[]
required

Values in the same order as columns.

cursor
string | null
required

Continuation cursor for the next page, or null when there is no next page.

warnings
object[]
required

Non-fatal semantic notices.