Skip to content

Metric.query

POST /{namespace}/metrics/query

Query reads Metrics or Events as a trend, funnel, retention curve, path or lifecycle, broken down by any property.

Noun
Metric
Mode
do
Event
Metric.queried

Inputs

InputTypeRequiredDescription
metricMetricThe Metric to read; omitted, the query names Events directly.
shapestringrequiredThe analysis to run.
breakdownstringThe property to split by, such as an Organization or a Motion.
windowstringThe time range, such as 30d.

Outputs

OutputTypeRequiredDescription
rowsjsonrequiredThe result rows, each number with its readability.
metricMetricrequiredThe Metric read.

Effects

  • Emits Metric.queried.
  • Performed by the Analyst.
  • Two-way: it runs at once, in the try, send and do modes.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.Metric.query

When it waits

GateDefault
Decision classLow: two-way, nothing at stake
Delay windowNone: it runs once review passes.
LimitThe call Limit of the Permission it runs under.
Over the LimitIt waits pending for an Approval from the Founder. Approved, it runs; refused, it ends refused with limit-exceeded; unanswered by its deadline, it ends canceled.