Аналитика · Изменение
Аналитика · Панели · Изменение
analytics_dashboards_update
Попробуйте три запроса
Подготовить
- Вы указываетеId записи
- ПомощникПодготовка
- Вы получаетеПредпросмотр
Запрос в чат
Подготовь «Аналитика / Панели / Изменение». Для изменения нужны ID записи, dashboard. Покажи объект и ожидаемый эффект до выполнения.
- id
- Id записи
- dashboard
- Параметр
Применить
- Вы указываетеСогласованные значения
- ПомощникОдин вызов
- Вы получаетеОтвет операции
Запрос в чат
На учебной записи подготовь «Аналитика / Панели / Изменение» с параметром id = DEMO-101. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
- id
- DEMO-101
- expectedRevision
- 4
Проверить итог
- Вы указываетеИсходный ответ
- ПомощникСверка результата
- Вы получаетеПодтверждение
Запрос в чат
Проверь результат «Аналитика / Панели / Изменение» по исходному ответу. Покажи результат. Объясни, чем подтвердить эффект для выбранного объекта.
- До измененияПрочитать версию
- При записиПередать выбранную версию
- После ответаПеречитать объект
Как работает действие
Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения. Прочитайте актуальную версию записи перед подготовкой запроса.
Описание разработчика
Update your saved Analytics dashboard atomically using its exact revision. Does not overwrite concurrent edits.
Параметры запроса
- id
- Идентификатор выбранной записи. обязательно по схеме · string
- expectedRevision
- Версия, прочитанная перед изменением. обязательно по схеме · integer · минимум 1 · максимум 9007199254740991
- dashboard
- Complete replacement dashboard definition; preserve wanted widgets and goals. обязательно по схеме · object
- requestId
- Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string
Что вернёт команда
- result
- Authorized Analytics result. Unknown source data is explicit and never replaced with zero. обязательно по схеме
Поля и технические схемы

Вход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,128}$",
"description": "Existing owned dashboard."
},
"expectedRevision": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991,
"description": "Exact current revision from analytics_dashboards_get."
},
"dashboard": {
"type": "object",
"properties": {
"title": {
"type": "string",
"minLength": 1,
"maxLength": 120,
"description": "Dashboard name."
},
"description": {
"default": "",
"description": "Purpose of this dashboard.",
"type": "string",
"maxLength": 1000
},
"visibility": {
"default": "private",
"description": "Private to its owner or visible to analytics users in this company; source permissions still apply.",
"type": "string",
"enum": [
"private",
"company"
]
},
"widgets": {
"maxItems": 30,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,128}$",
"description": "Stable widget identifier within the dashboard."
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 120,
"description": "Visible widget title."
},
"type": {
"type": "string",
"enum": [
"kpi",
"line",
"bars",
"donut",
"table"
],
"description": "Chart or table presentation."
},
"metric": {
"description": "Canonical business metric; supply exactly one of metric, recordReport or formula.",
"anyOf": [
{
"type": "string",
"maxLength": 100,
"pattern": "^[a-z][a-z0-9_]*\\.[a-z][a-z0-9_]*$"
},
{
"$ref": "#/$defs/_mcp11"
}
]
},
"recordReport": {
"description": "Report over an authorized native collection.",
"type": "object",
"properties": {
"sourceId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,128}$",
"description": "Source ID returned by analytics_sources_list."
},
"action": {
"type": "string",
"maxLength": 64,
"description": "Exact permitted read action mapped to this collection."
},
"snapshot": {
"default": false,
"description": "Explicit current-state report: ignores dashboard dates and comparisons and is labelled as a snapshot.",
"type": "boolean"
},
"input": {
"default": {},
"description": "Native action arguments from analytics_source_describe. No SQL or raw database queries.",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/$defs/__schema0"
}
},
"rowsPath": {
"default": "",
"description": "Optional exact nested native line-item array path. Original record fields remain under parent; expanded rows retain native units and currencies.",
"type": "string",
"maxLength": 160
},
"measure": {
"default": "count",
"description": "Exact numeric output field path, or count.",
"type": "string",
"maxLength": 160
},
"aggregation": {
"default": "count",
"description": "Server aggregation over the scanned records.",
"type": "string",
"enum": [
"count",
"sum",
"avg",
"min",
"max",
"distinct"
]
},
"dimension": {
"default": "",
"description": "Exact output field path for grouping; empty for one total.",
"type": "string",
"maxLength": 160
},
"dateField": {
"default": "",
"description": "Exact output date field, required to filter an event report by dates.",
"type": "string",
"maxLength": 160
},
"currencyField": {
"default": "",
"description": "Exact currency field for a money measure; currencies remain separate.",
"type": "string",
"maxLength": 160
},
"unitField": {
"default": "",
"description": "Native unit field; different units remain separate.",
"type": "string",
"maxLength": 160
},
"filters": {
"default": [],
"description": "Filters applied after the native authorized read.",
"maxItems": 12,
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"maxLength": 160,
"description": "Output field path."
},
"operator": {
"type": "string",
"enum": [
"eq",
"ne",
"contains"
],
"description": "Comparison operator."
},
"value": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "number"
},
{
"type": "boolean"
}
],
"description": "Typed comparison value."
}
},
"required": [
"field",
"operator",
"value"
],
"additionalProperties": false
}
},
"maxPages": {
"default": 5,
"description": "Bounded native pages to scan, with explicit partial coverage.",
"type": "integer",
"minimum": 1,
"maximum": 20
}
},
"required": [
"sourceId",
"action",
"snapshot",
"input",
"rowsPath",
"measure",
"aggregation",
"dimension",
"dateField",
"currencyField",
"unitField",
"filters",
"maxPages"
],
"additionalProperties": false
},
"formula": {
"description": "Arithmetic over canonical metrics.",
"type": "object",
"properties": {
"expression": {
"type": "string",
"minLength": 1,
"maxLength": 300,
"description": "Arithmetic using operand names, numbers, parentheses and + - * /. No code."
},
"operands": {
"minItems": 1,
"maxItems": 8,
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,19}$",
"description": "Variable used in expression."
},
"metric": {
"anyOf": [
{
"type": "string",
"maxLength": 100,
"pattern": "^[a-z][a-z0-9_]*\\.[a-z][a-z0-9_]*$"
},
{
"$ref": "#/$defs/_mcp11"
}
],
"description": "Canonical authorized business metric."
}
},
"required": [
"key",
"metric"
],
"additionalProperties": false
},
"description": "Metric operands; each preserves currency and native dimensions."
}
},
"required": [
"expression",
"operands"
],
"additionalProperties": false
},
"style": {
"default": {
"color": "#276be6",
"visible": true,
"legend": true,
"height": 280,
"width": "half"
},
"description": "Persisted chart appearance.",
"type": "object",
"properties": {
"color": {
"default": "#276be6",
"description": "Chart color.",
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$"
},
"visible": {
"default": true,
"description": "Show this widget.",
"type": "boolean"
},
"legend": {
"default": true,
"description": "Show the legend.",
"type": "boolean"
},
"height": {
"default": 280,
"description": "Chart height in pixels.",
"type": "integer",
"minimum": 180,
"maximum": 600
},
"width": {
"default": "half",
"description": "Desktop widget width.",
"type": "string",
"enum": [
"half",
"full"
]
}
},
"required": [
"color",
"visible",
"legend",
"height",
"width"
],
"additionalProperties": false
}
},
"required": [
"id",
"title",
"type",
"style"
],
"additionalProperties": false
},
"description": "Ordered saved charts and metrics."
},
"goals": {
"default": [],
"description": "Saved financial and employee KPI goals.",
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,128}$",
"description": "Goal identifier."
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 120,
"description": "Goal name."
},
"widgetId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,128}$",
"description": "Widget whose actual value tracks this target."
},
"target": {
"type": "number",
"description": "Target value."
},
"startValue": {
"default": 0,
"description": "Starting value.",
"type": "number"
},
"direction": {
"default": "increase",
"description": "Desired direction.",
"type": "string",
"enum": [
"increase",
"decrease"
]
},
"currency": {
"description": "Exact currency dimension for a money goal.",
"type": "string",
"maxLength": 16
},
"employeeId": {
"description": "Employee KPI label; widget metric must independently filter this employee.",
"type": "string",
"maxLength": 128
}
},
"required": [
"id",
"title",
"widgetId",
"target",
"startValue",
"direction"
],
"additionalProperties": false
}
},
"query": {
"default": {
"comparison": "none"
},
"description": "Shared period, filters, comparison and reporting establishment.",
"type": "object",
"properties": {
"filters": {
"description": "Default filters for each selection without its own filters. Every supplied filter must be supported by that metric.",
"type": "object",
"properties": {
"productIds": {
"$ref": "#/$defs/_mcp1"
},
"locationId": {
"$ref": "#/$defs/_mcp2"
},
"accountIds": {
"$ref": "#/$defs/_mcp3"
},
"campaignId": {
"$ref": "#/$defs/_mcp4"
},
"employeeId": {
"$ref": "#/$defs/_mcp5"
},
"pointOfSaleId": {
"description": "Exact native establishment filter.",
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$"
},
"clientId": {
"description": "Exact native customer filter.",
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$"
},
"pipelineId": {
"description": "Exact native lead pipeline filter.",
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$"
},
"stageId": {
"description": "Exact native lead stage filter.",
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$"
},
"status": {
"$ref": "#/$defs/_mcp6"
},
"channel": {
"$ref": "#/$defs/_mcp7"
},
"source": {
"description": "Exact native lead source filter.",
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$"
},
"resourceId": {
"$ref": "#/$defs/_mcp8"
},
"productId": {
"description": "Exact native product ID filter.",
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$"
},
"categoryId": {
"description": "Exact native category ID filter.",
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$"
}
},
"additionalProperties": false
},
"period": {
"description": "Explicit reporting period; short calendar presets are supported. Custom from is inclusive and to exclusive.",
"anyOf": [
{
"type": "object",
"properties": {
"preset": {
"type": "string",
"enum": [
"today",
"yesterday",
"this_week",
"last_week",
"last_7_days",
"last_30_days",
"this_month",
"last_month",
"this_quarter",
"last_quarter",
"this_year",
"last_year",
"custom",
"all_time"
],
"description": "Explicit calendar period. Weeks start Monday; last_7_days/last_30_days include today. Current periods include the complete current calendar unit. all_time is never implicit and is available only for metrics that support it."
},
"from": {
"description": "For custom only: inclusive local calendar date YYYY-MM-DD in the server-resolved reporting timezone.",
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"to": {
"description": "For custom only: exclusive local calendar date YYYY-MM-DD in the server-resolved reporting timezone.",
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"start": {
"description": "Custom inclusive start date; alias of from. Supply start/end together, without from/to.",
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"end": {
"description": "Custom exclusive end date; alias of to. Supply start/end together, without from/to.",
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
}
},
"required": [
"preset"
],
"additionalProperties": false
},
{
"type": "string",
"enum": [
"today",
"yesterday",
"week",
"month",
"quarter",
"year",
"all_time"
]
}
]
},
"compare": {
"description": "Shortcut for previous_period comparison; cannot contradict comparison.",
"type": "boolean"
},
"comparison": {
"default": "none",
"description": "Server-resolved comparison for period metrics only. Snapshot values in a mixed query have no comparison.",
"type": "string",
"enum": [
"none",
"previous_period",
"previous_year"
]
},
"calendarLocationId": {
"description": "Optional authorized establishment whose configured timezone sets operational and attendance calendar boundaries. This selects the reporting clock, not a data filter. When omitted, company establishments must have one consistent valid timezone. Advertising retains its native UTC provider-day calendar.",
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$"
},
"reportingTimezone": {
"description": "Explicit IANA calendar for operational and attendance period reporting. Changes the reporting clock, never company or location authorization. Omit to use the configured establishment calendar. Cannot be combined with calendarLocationId. Advertising retains its UTC provider-day calendar.",
"type": "string",
"maxLength": 100
}
},
"required": [
"comparison"
],
"additionalProperties": false
},
"granularity": {
"default": "week",
"description": "Time series bucket size.",
"type": "string",
"enum": [
"none",
"day",
"week",
"month"
]
}
},
"required": [
"title",
"description",
"visibility",
"widgets",
"goals",
"query",
"granularity"
],
"additionalProperties": false,
"description": "Complete replacement dashboard definition; preserve wanted widgets and goals."
},
"requestId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{8,128}$",
"description": "Stable ID for this exact mutation; reuse unchanged for retries."
}
},
"required": [
"id",
"expectedRevision",
"dashboard",
"requestId"
],
"additionalProperties": false,
"$defs": {
"__schema0": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/__schema0"
}
},
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/$defs/__schema0"
}
}
]
},
"_mcp11": {
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/_mcp0"
},
"filters": {
"$ref": "#/$defs/_mcp9"
},
"groupBy": {
"$ref": "#/$defs/_mcp10"
}
},
"required": [
"id"
],
"additionalProperties": false
},
"_mcp1": {
"description": "Existing product IDs for inventory quantities, in their native units.",
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$"
}
},
"_mcp2": {
"description": "Inventory establishment ID. This actually filters stock; it is not a timezone selector.",
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$"
},
"_mcp3": {
"description": "Existing financial account IDs. Balances remain separate for every account and currency.",
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$"
}
},
"_mcp4": {
"description": "Existing advertising campaign ID, or omit for the native company advertising summary.",
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$"
},
"_mcp5": {
"description": "Existing employee ID for attendance metrics.",
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$"
},
"_mcp6": {
"description": "Exact current normalized native status filter.",
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$"
},
"_mcp7": {
"description": "Exact source channel or integration ID.",
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$"
},
"_mcp8": {
"description": "Existing table/resource identifier where supported.",
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$"
},
"_mcp0": {
"type": "string",
"maxLength": 100,
"pattern": "^[a-z][a-z0-9_]*\\.[a-z][a-z0-9_]*$",
"description": "Canonical metric ID from the typed server registry."
},
"_mcp9": {
"description": "Per-metric typed filters. Overrides the request-level filters for this selection.",
"type": "object",
"properties": {
"productIds": {
"$ref": "#/$defs/_mcp1"
},
"locationId": {
"$ref": "#/$defs/_mcp2"
},
"accountIds": {
"$ref": "#/$defs/_mcp3"
},
"campaignId": {
"$ref": "#/$defs/_mcp4"
},
"employeeId": {
"$ref": "#/$defs/_mcp5"
},
"pointOfSaleId": {
"description": "Exact native establishment filter.",
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$"
},
"clientId": {
"description": "Exact native customer filter.",
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$"
},
"pipelineId": {
"description": "Exact native lead pipeline filter.",
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$"
},
"stageId": {
"description": "Exact native lead stage filter.",
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$"
},
"status": {
"$ref": "#/$defs/_mcp6"
},
"channel": {
"$ref": "#/$defs/_mcp7"
},
"source": {
"description": "Exact native lead source filter.",
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$"
},
"resourceId": {
"$ref": "#/$defs/_mcp8"
},
"productId": {
"description": "Exact native product ID filter.",
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$"
},
"categoryId": {
"description": "Exact native category ID filter.",
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$"
}
},
"additionalProperties": false
},
"_mcp10": {
"description": "Supported native dimension. No arbitrary field names or client-side aggregation.",
"type": "string",
"enum": [
"account",
"currency",
"product",
"employee",
"pointOfSale",
"status",
"channel",
"source",
"pipeline",
"stage",
"resource"
]
}
}
}Выход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"result": {
"description": "Authorized Analytics result. Unknown source data is explicit and never replaced with zero."
}
},
"required": [
"result"
],
"additionalProperties": false
}