analytics_dashboard_run
Run every tile of a saved dashboard of the current product and return one entry per tile, in board order: the tile itself, and what it produced.
Run every tile of a saved dashboard of the current product and return one entry per tile, in board order: the tile itself, and what it produced. An insight tile carries exactly what analytics_insight_run answers for that insight; a text tile carries a null result, because its content is the tile. `from` and `to` override the window of every insight tile for this call only, changing nothing stored. `filters` gives values to the board's filters by key ({"country": {"op": "eq", "value": "DE"}}); a series the filter cannot reach runs unfiltered and is listed in its tile's `filters_skipped`. A funnel series takes a filter on its first step only, so it is filtered exactly when that step's entity has the dimension; otherwise it is listed with every step (on a pivot, every <key>.<step> column) as not filtered. `compare` also reads a second range, returned per tile as `compare` (totals, and points laid over the current buckets; a funnel compares its last step; a pivot compares its totals only), whose `compare.window` is always the exact range read: "previous_period" is the window right before with as many days as have elapsed of this one (a window running past today counts through today); "previous_week" is the same days one week earlier; {from, to} is any range of up to 366 whole UTC days (YYYY-MM-DD, inclusive, to not before from), clipped to today, starting no later than today, and it may overlap the window (each is read on its own, so shared days count in both). Points pair by position, day 1 with day 1: a compared range of another length leaves the current buckets past its end with value and prev_bucket null, and a longer one's tail is cut from the points (its total still covers the whole range). A range with no data is totals 0 (null for an average or ratio) and points 0, not a missing compare. To compare yesterday with today: from and to today with compare {from: yesterday, to: yesterday}, or from yesterday to today with "previous_period" (yesterday and today against the two days before). A tile that fails carries an error with an HTTP status and does not stop the rest of the board, so check each tile's result before reading numbers. The call answers only when every tile is done; a heavy board (many tiles, many series) is better loaded tile by tile with analytics_dashboard_tile-run, after analytics_dashboard_get for the layout.
Behavior
- HTTP
POST /analytics/dashboards/: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 |
compare | string | — | Also read a second range; each insight tile then carries `compare`, whose `window` is the exact range read. "previous_period": as many days as have elapsed of this window, ending the day before it starts. "previous_week": the same days one week earlier. {from, to}: any range of up to 366 whole UTC days (YYYY-MM-DD, inclusive), clipped to today; it may overlap this window |
filters | object | — | Values for the dashboard's filters, by filter key: a filter without its dimension, e.g. {"country": {"op": "eq", "value": "DE"}}. A key the dashboard does not declare is a 400 |
idOrSlug | string | • | The dashboard's slug, or its uuid |
Response
Field | Type | Always | Description |
|---|---|---|---|
tiles | array | • | |
dashboard | object | • |
Try it
Run every tile of a saved dashboard of the current product and return one entry per tile, in board order: the tile itself, and what it produced.