analytics_insight_run
Run a saved insight of the current product and return its numbers: every series executed over the resolved window and aligned onto the same buckets, the formula evaluated bucket by bucket, a total per series, and whether the target was met.
Run a saved insight of the current product and return its numbers: every series executed over the resolved window and aligned onto the same buckets, the formula evaluated bucket by bucket, a total per series, and whether the target was met. The window comes from the stored definition — relative windows and the current cycle are resolved at call time — and `from` and `to` override it for this call only, changing nothing stored. Use this rather than rebuilding the insight out of analytics_metric_query calls: the alignment and the formula are what make the numbers comparable.
Behavior
- HTTP
POST /analytics/insights/:idOrSlug/run
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| to | string | — | Inclusive window end; overrides the stored window |
| from | string | — | Inclusive window start; overrides the stored window |
| idOrSlug | string | • | The insight's slug, or its uuid |
Response
| Field | Type | Always | Description |
|---|---|---|---|
| extra | object | — | |
| total | object | • | |
| series | object | • | |
| window | object | • | |
| formula | array | • | |
| insight | object | • | |
| target_status | string | • |
Try it
Run a saved insight of the current product and return its numbers: every series executed over the resolved window and aligned onto the same buckets, the formula evaluated bucket by bucket, a total per series, and whether the target was met.