analytics_insight_update
Change fields of a saved insight of the current product.
Change fields of a saved insight of the current product. Only the fields supplied are changed; the rest keep their stored values. The slug cannot be changed — create a new insight instead. Returns the stored insight plus warnings[] for the row as it now stands. An update is refused only for what it changes: missing labels when it replaces series, pivot without group_by when it changes display or series, a chart display that cannot be drawn when it changes kind, display, series, stacked, combo or a formula; the same findings on an older insight come back as warnings. Switching display drops a stored stacked or combo the new display does not use (the response shows them gone). A series replaced here carries its own hidden_steps (display-only; omit it to show every step).
Behavior
- HTTP
PATCH /analytics/insights/:id
Arguments
Name | Type | Required | Description |
|---|---|---|---|
id | string | • | The insight's uuid; slugs are not accepted here |
kind | string | — | No description in the catalog. |
name | string | — | No description in the catalog. |
sort | object | — | No description in the catalog. |
tags | array | — | No description in the catalog. |
combo | object | — | No description in the catalog. |
grain | string | — | No description in the catalog. |
top_n | integer | — | No description in the catalog. |
series | array | — | No description in the catalog. |
target | object | — | No description in the catalog. |
window | object | — | No description in the catalog. |
display | string | — | No description in the catalog. |
formula | string | — | No description in the catalog. |
stacked | boolean | — | Display area or bar only: stack the series (or the groups of one grouped series); all in one unit. Defaults to false |
formulas | array | — | Up to four named formulas over the series keys, each its own column or line; use instead of formula |
rows_label | string | — | No description in the catalog. |
description | string | — | No description in the catalog. |
formula_label | string | — | No description in the catalog. |
formula_format | object | — | Display format for a raw value. kind percent means a fraction: 0.128 displays as 12.8%. Money stays raw at the declared scale; readers convert it for display with this format. |
Response
Field | Type | Always | Description |
|---|---|---|---|
id | string | • | |
kind | string | • | |
name | string | • | |
slug | string | • | |
sort | object | — | Pivot only: which column orders the rows, and the direction |
tags | array | — | |
combo | object | — | Display combo only: which series draw as the line |
grain | string | — | |
top_n | integer | — | Pivot only: rows kept, 1 to 50 (default 20); the rest are folded into other |
series | array | • | |
target | object | — | |
window | object | • | |
display | string | — | |
formula | string | — | |
stacked | boolean | — | Display area or bar only: stack the series (or the groups of one grouped series); all in one unit. Defaults to false |
formulas | array | — | Up to four named formulas over the series keys, each its own column or line; use instead of formula |
warnings | array | • | |
created_at | string | • | |
created_by | string | • | |
product_id | string | • | |
rows_label | string | — | Pivot only: the title of the row-header column, 1 to 40 characters (e.g. Кампания) |
updated_at | string | • | |
description | string | — | |
formula_label | string | — | |
formula_format | object | — | Display format for a raw value. kind percent means a fraction: 0.128 displays as 12.8%. Money stays raw at the declared scale; readers convert it for display with this format. |
Try it
Change fields of a saved insight of the current product.