From 70e6e8c0d5de28c55e51a6e33e997a618c8ed028 Mon Sep 17 00:00:00 2001 From: flashduty-bot Date: Fri, 9 Oct 2026 08:08:57 +0000 Subject: [PATCH 1/2] =?UTF-8?q?docs(api):=20daily=20audit=202026-10-09=20?= =?UTF-8?q?=E2=80=94=20drop=20the=20reverted=20incident=5Flist=20panel=20k?= =?UTF-8?q?ind,=20add=20the=20resolve=20and=20feed=20assignee=20fields?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api-reference/monitors.openapi.en.json | 60 +++++++----------- api-reference/monitors.openapi.zh.json | 60 +++++++----------- api-reference/on-call.openapi.en.json | 28 ++++++++ api-reference/on-call.openapi.zh.json | 28 ++++++++ api-reference/openapi.en.json | 88 +++++++++++++++----------- api-reference/openapi.zh.json | 88 +++++++++++++++----------- 6 files changed, 204 insertions(+), 148 deletions(-) diff --git a/api-reference/monitors.openapi.en.json b/api-reference/monitors.openapi.en.json index 0dfd3e37f..453375f62 100644 --- a/api-reference/monitors.openapi.en.json +++ b/api-reference/monitors.openapi.en.json @@ -9351,7 +9351,7 @@ "$ref": "#/components/schemas/DashboardPanelQuery" }, "maxItems": 26, - "description": "Queries in the panel. `time_series` accepts 1–26, `text` and `incident_list` accept none, every other kind accepts exactly one." + "description": "Queries in the panel. `time_series` accepts 1–26, `text` accepts none, every other kind accepts exactly one." }, "viz_config": { "$ref": "#/components/schemas/DashboardVizConfig" @@ -9493,7 +9493,7 @@ "name": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$", - "description": "Variable name used in `{{ }}` templates, at most 64 characters." + "description": "Variable name used in `{{ }}` templates, at most 64 characters. Names starting with `__` are reserved for built-in time variables." }, "label": { "type": "string", @@ -9541,7 +9541,7 @@ "name": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$", - "description": "Variable name used in `{{ }}` templates, at most 64 characters." + "description": "Variable name used in `{{ }}` templates, at most 64 characters. Names starting with `__` are reserved for built-in time variables." }, "label": { "type": "string", @@ -9585,7 +9585,7 @@ "name": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$", - "description": "Variable name used in `{{ }}` templates, at most 64 characters." + "description": "Variable name used in `{{ }}` templates, at most 64 characters. Names starting with `__` are reserved for built-in time variables." }, "label": { "type": "string", @@ -9831,19 +9831,19 @@ }, "expr": { "type": "string", - "description": "Logs query expression; may reference other variables through `{{ }}`." + "description": "Logs query expression; may reference other variables through `{{ }}`. May be empty for a Loki datasource, which then lists the field's values across all streams." }, "args": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "Named query arguments; defaults to an empty object." + "description": "Named query arguments; defaults to an empty object. Must be empty for a Loki datasource." }, "field": { "type": "string", "minLength": 1, - "description": "Log field whose values become candidates." + "description": "Log field whose values become candidates. For a Loki datasource it must be a bare stream label name (letters, digits and underscores)." } }, "required": [ @@ -9876,9 +9876,6 @@ }, { "$ref": "#/components/schemas/DashboardTextViz" - }, - { - "$ref": "#/components/schemas/DashboardIncidentListViz" } ], "discriminator": { @@ -9890,8 +9887,7 @@ "bar": "#/components/schemas/DashboardBarViz", "gauge": "#/components/schemas/DashboardGaugeViz", "logs": "#/components/schemas/DashboardLogsViz", - "text": "#/components/schemas/DashboardTextViz", - "incident_list": "#/components/schemas/DashboardIncidentListViz" + "text": "#/components/schemas/DashboardTextViz" } } }, @@ -10263,28 +10259,6 @@ "markdown" ] }, - "DashboardIncidentListViz": { - "type": "object", - "description": "Incident-list panel. The rows are filled by the client from the Flashduty incident API, so the panel runs no queries and needs no datasource.", - "properties": { - "kind": { - "type": "string", - "enum": [ - "incident_list" - ], - "description": "Visualization kind discriminator; always `incident_list`." - }, - "options": { - "type": "object", - "additionalProperties": true, - "description": "Open options object for the chosen visualization kind; the only part of the definition that round-trips losslessly. Missing or null normalizes to `{}`." - } - }, - "required": [ - "kind", - "options" - ] - }, "DashboardThreshold": { "type": "object", "description": "Colour threshold for a numeric value. At least one of `warning`/`critical` is required, and with both set the pair must be ordered according to `mode`.", @@ -11108,10 +11082,9 @@ "bar", "gauge", "logs", - "text", - "incident_list" + "text" ], - "description": "Visualization kind: `time_series` = time series; `table` = table; `stat` = single value; `bar` = bar chart; `gauge` = gauge; `logs` = log stream; `text` = Markdown text; `incident_list` = incident list." + "description": "Visualization kind: `time_series` = time series; `table` = table; `stat` = single value; `bar` = bar chart; `gauge` = gauge; `logs` = log stream; `text` = Markdown text." } }, "required": [ @@ -11730,6 +11703,19 @@ "$ref": "#/components/schemas/DashboardSelection" }, "description": "Selections keyed by variable name, at most 20 entries." + }, + "max_data_points": { + "type": [ + "integer", + "null" + ], + "minimum": 2, + "maximum": 5000, + "description": "Downsampling target used to compute the step and render the built-in time variables, 2–5000 points; omit or send null for the server default of 100." + }, + "preserve_builtin_variables": { + "type": "boolean", + "description": "Keep built-in time variables verbatim in the resolved expressions so a caller with its own execution window can render them; user variables are still resolved." } }, "required": [ diff --git a/api-reference/monitors.openapi.zh.json b/api-reference/monitors.openapi.zh.json index e0b20df81..029f14026 100644 --- a/api-reference/monitors.openapi.zh.json +++ b/api-reference/monitors.openapi.zh.json @@ -9351,7 +9351,7 @@ "$ref": "#/components/schemas/DashboardPanelQuery" }, "maxItems": 26, - "description": "面板内的查询。`time_series` 允许 1~26 条,`text`、`incident_list` 不允许查询,其余类型必须恰好 1 条。" + "description": "面板内的查询。`time_series` 允许 1~26 条,`text` 不允许查询,其余类型必须恰好 1 条。" }, "viz_config": { "$ref": "#/components/schemas/DashboardVizConfig" @@ -9493,7 +9493,7 @@ "name": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$", - "description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。" + "description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。以 `__` 开头的名称保留给内置时间变量。" }, "label": { "type": "string", @@ -9541,7 +9541,7 @@ "name": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$", - "description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。" + "description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。以 `__` 开头的名称保留给内置时间变量。" }, "label": { "type": "string", @@ -9585,7 +9585,7 @@ "name": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$", - "description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。" + "description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。以 `__` 开头的名称保留给内置时间变量。" }, "label": { "type": "string", @@ -9831,19 +9831,19 @@ }, "expr": { "type": "string", - "description": "日志查询表达式;可通过 `{{ }}` 引用其他变量。" + "description": "日志查询表达式;可通过 `{{ }}` 引用其他变量。数据源为 Loki 时可为空,此时会列出该字段在所有流中的取值。" }, "args": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "具名查询参数;默认为空对象。" + "description": "具名查询参数;默认为空对象。数据源为 Loki 时必须为空。" }, "field": { "type": "string", "minLength": 1, - "description": "取值作为候选项的日志字段。" + "description": "取值作为候选项的日志字段。数据源为 Loki 时必须是不带修饰的流标签名(字母、数字和下划线)。" } }, "required": [ @@ -9876,9 +9876,6 @@ }, { "$ref": "#/components/schemas/DashboardTextViz" - }, - { - "$ref": "#/components/schemas/DashboardIncidentListViz" } ], "discriminator": { @@ -9890,8 +9887,7 @@ "bar": "#/components/schemas/DashboardBarViz", "gauge": "#/components/schemas/DashboardGaugeViz", "logs": "#/components/schemas/DashboardLogsViz", - "text": "#/components/schemas/DashboardTextViz", - "incident_list": "#/components/schemas/DashboardIncidentListViz" + "text": "#/components/schemas/DashboardTextViz" } } }, @@ -10263,28 +10259,6 @@ "markdown" ] }, - "DashboardIncidentListViz": { - "type": "object", - "description": "故障列表面板。数据由前端从 Flashduty 故障接口获取,因此面板不运行查询、也不需要数据源。", - "properties": { - "kind": { - "type": "string", - "enum": [ - "incident_list" - ], - "description": "可视化类型判别字段,固定为 `incident_list`。" - }, - "options": { - "type": "object", - "additionalProperties": true, - "description": "所选可视化类型的开放配置对象;也是定义中唯一无损 round-trip 的部分。缺失或 null 时规范化为 `{}`。" - } - }, - "required": [ - "kind", - "options" - ] - }, "DashboardThreshold": { "type": "object", "description": "数值的颜色阈值。`warning`/`critical` 至少设置一个;两者都设置时需按 `mode` 满足大小关系。", @@ -11108,10 +11082,9 @@ "bar", "gauge", "logs", - "text", - "incident_list" + "text" ], - "description": "可视化类型:`time_series` = 时序图;`table` = 表格;`stat` = 单值;`bar` = 柱状图;`gauge` = 仪表盘;`logs` = 日志流;`text` = Markdown 文本;`incident_list` = 故障列表。" + "description": "可视化类型:`time_series` = 时序图;`table` = 表格;`stat` = 单值;`bar` = 柱状图;`gauge` = 仪表盘;`logs` = 日志流;`text` = Markdown 文本。" } }, "required": [ @@ -11730,6 +11703,19 @@ "$ref": "#/components/schemas/DashboardSelection" }, "description": "按变量名索引的选择,最多 20 项。" + }, + "max_data_points": { + "type": [ + "integer", + "null" + ], + "minimum": 2, + "maximum": 5000, + "description": "用于计算 step 并渲染内置时间变量的降采样目标,2~5000 个点;省略或传 null 时服务端默认 100。" + }, + "preserve_builtin_variables": { + "type": "boolean", + "description": "在解析结果中逐字保留内置时间变量,供调用方按自己的执行窗口渲染;用户变量照常解析。" } }, "required": [ diff --git a/api-reference/on-call.openapi.en.json b/api-reference/on-call.openapi.en.json index 312b543ec..d283c8101 100644 --- a/api-reference/on-call.openapi.en.json +++ b/api-reference/on-call.openapi.en.json @@ -33885,6 +33885,13 @@ }, "description": "Assignee member IDs." }, + "assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "description": "Assignees of the work item. Each entry is `{type, id?}`; an `ai_sre` entry omits `id`. Omitted when there is no assignee." + }, "post_mortem_id": { "type": "string", "description": "ID of the post-mortem the work item is bound to." @@ -33986,6 +33993,27 @@ "format": "int64" }, "description": "Member IDs removed from assignees." + }, + "assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "description": "Assignees of the work item. Each entry is `{type, id?}`; an `ai_sre` entry omits `id`. Omitted when there is no assignee." + }, + "added_assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "description": "Assignees added by this change, in submitted order. `added_assignee_ids` is the person-only subset. Omitted when nothing was added." + }, + "removed_assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "description": "Assignees removed by this change. `removed_assignee_ids` is the person-only subset. Omitted when nothing was removed." } }, "title": "i_wi_assignees" diff --git a/api-reference/on-call.openapi.zh.json b/api-reference/on-call.openapi.zh.json index c2f86406d..440fffb54 100644 --- a/api-reference/on-call.openapi.zh.json +++ b/api-reference/on-call.openapi.zh.json @@ -33885,6 +33885,13 @@ }, "description": "负责人成员 ID 列表。" }, + "assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "description": "跟进事项的负责人。每项为 `{type, id?}`;`ai_sre` 不带 `id`。无负责人时省略。" + }, "post_mortem_id": { "type": "string", "description": "跟进事项绑定的故障复盘 ID。" @@ -33986,6 +33993,27 @@ "format": "int64" }, "description": "从负责人中移除的成员 ID。" + }, + "assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "description": "跟进事项的负责人。每项为 `{type, id?}`;`ai_sre` 不带 `id`。无负责人时省略。" + }, + "added_assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "description": "本次新增的负责人,按提交顺序。`added_assignee_ids` 是其中仅含 `person` 的子集。无新增时省略。" + }, + "removed_assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "description": "本次移除的负责人。`removed_assignee_ids` 是其中仅含 `person` 的子集。无移除时省略。" } }, "title": "i_wi_assignees" diff --git a/api-reference/openapi.en.json b/api-reference/openapi.en.json index d4c919c38..176a13a60 100644 --- a/api-reference/openapi.en.json +++ b/api-reference/openapi.en.json @@ -10231,6 +10231,13 @@ }, "type": "array" }, + "added_assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "description": "Assignees added by this change, in submitted order. `added_assignee_ids` is the person-only subset. Omitted when nothing was added." + }, "assignee_ids": { "description": "Assignee member IDs after the change.", "items": { @@ -10239,6 +10246,13 @@ }, "type": "array" }, + "assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "description": "Assignees of the work item. Each entry is `{type, id?}`; an `ai_sre` entry omits `id`. Omitted when there is no assignee." + }, "item_type": { "description": "Work item type. `action`: an action item anchored to the incident itself; `follow_up`: an improvement item anchored to a post-mortem.", "enum": [ @@ -10255,6 +10269,13 @@ }, "type": "array" }, + "removed_assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "description": "Assignees removed by this change. `removed_assignee_ids` is the person-only subset. Omitted when nothing was removed." + }, "title": { "description": "Work item title.", "type": "string" @@ -10379,6 +10400,13 @@ }, "type": "array" }, + "assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "description": "Assignees of the work item. Each entry is `{type, id?}`; an `ai_sre` entry omits `id`. Omitted when there is no assignee." + }, "item_type": { "description": "Work item type. `action`: an action item anchored to the incident itself, convertible to `follow_up` later; `follow_up`: an improvement item anchored to a post-mortem, requiring the incident to be linked to that post-mortem at creation.", "enum": [ @@ -29665,7 +29693,7 @@ "$ref": "#/components/schemas/DashboardPanelQuery" }, "maxItems": 26, - "description": "Queries in the panel. `time_series` accepts 1–26, `text` and `incident_list` accept none, every other kind accepts exactly one." + "description": "Queries in the panel. `time_series` accepts 1–26, `text` accepts none, every other kind accepts exactly one." }, "viz_config": { "$ref": "#/components/schemas/DashboardVizConfig" @@ -29807,7 +29835,7 @@ "name": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$", - "description": "Variable name used in `{{ }}` templates, at most 64 characters." + "description": "Variable name used in `{{ }}` templates, at most 64 characters. Names starting with `__` are reserved for built-in time variables." }, "label": { "type": "string", @@ -29855,7 +29883,7 @@ "name": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$", - "description": "Variable name used in `{{ }}` templates, at most 64 characters." + "description": "Variable name used in `{{ }}` templates, at most 64 characters. Names starting with `__` are reserved for built-in time variables." }, "label": { "type": "string", @@ -29899,7 +29927,7 @@ "name": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$", - "description": "Variable name used in `{{ }}` templates, at most 64 characters." + "description": "Variable name used in `{{ }}` templates, at most 64 characters. Names starting with `__` are reserved for built-in time variables." }, "label": { "type": "string", @@ -30145,19 +30173,19 @@ }, "expr": { "type": "string", - "description": "Logs query expression; may reference other variables through `{{ }}`." + "description": "Logs query expression; may reference other variables through `{{ }}`. May be empty for a Loki datasource, which then lists the field's values across all streams." }, "args": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "Named query arguments; defaults to an empty object." + "description": "Named query arguments; defaults to an empty object. Must be empty for a Loki datasource." }, "field": { "type": "string", "minLength": 1, - "description": "Log field whose values become candidates." + "description": "Log field whose values become candidates. For a Loki datasource it must be a bare stream label name (letters, digits and underscores)." } }, "required": [ @@ -30190,9 +30218,6 @@ }, { "$ref": "#/components/schemas/DashboardTextViz" - }, - { - "$ref": "#/components/schemas/DashboardIncidentListViz" } ], "discriminator": { @@ -30204,8 +30229,7 @@ "bar": "#/components/schemas/DashboardBarViz", "gauge": "#/components/schemas/DashboardGaugeViz", "logs": "#/components/schemas/DashboardLogsViz", - "text": "#/components/schemas/DashboardTextViz", - "incident_list": "#/components/schemas/DashboardIncidentListViz" + "text": "#/components/schemas/DashboardTextViz" } } }, @@ -30577,28 +30601,6 @@ "markdown" ] }, - "DashboardIncidentListViz": { - "type": "object", - "description": "Incident-list panel. The rows are filled by the client from the Flashduty incident API, so the panel runs no queries and needs no datasource.", - "properties": { - "kind": { - "type": "string", - "enum": [ - "incident_list" - ], - "description": "Visualization kind discriminator; always `incident_list`." - }, - "options": { - "type": "object", - "additionalProperties": true, - "description": "Open options object for the chosen visualization kind; the only part of the definition that round-trips losslessly. Missing or null normalizes to `{}`." - } - }, - "required": [ - "kind", - "options" - ] - }, "DashboardThreshold": { "type": "object", "description": "Colour threshold for a numeric value. At least one of `warning`/`critical` is required, and with both set the pair must be ordered according to `mode`.", @@ -31422,10 +31424,9 @@ "bar", "gauge", "logs", - "text", - "incident_list" + "text" ], - "description": "Visualization kind: `time_series` = time series; `table` = table; `stat` = single value; `bar` = bar chart; `gauge` = gauge; `logs` = log stream; `text` = Markdown text; `incident_list` = incident list." + "description": "Visualization kind: `time_series` = time series; `table` = table; `stat` = single value; `bar` = bar chart; `gauge` = gauge; `logs` = log stream; `text` = Markdown text." } }, "required": [ @@ -32044,6 +32045,19 @@ "$ref": "#/components/schemas/DashboardSelection" }, "description": "Selections keyed by variable name, at most 20 entries." + }, + "max_data_points": { + "type": [ + "integer", + "null" + ], + "minimum": 2, + "maximum": 5000, + "description": "Downsampling target used to compute the step and render the built-in time variables, 2–5000 points; omit or send null for the server default of 100." + }, + "preserve_builtin_variables": { + "type": "boolean", + "description": "Keep built-in time variables verbatim in the resolved expressions so a caller with its own execution window can render them; user variables are still resolved." } }, "required": [ diff --git a/api-reference/openapi.zh.json b/api-reference/openapi.zh.json index 75f58d1e8..62bbc45d7 100644 --- a/api-reference/openapi.zh.json +++ b/api-reference/openapi.zh.json @@ -10231,6 +10231,13 @@ }, "type": "array" }, + "added_assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "description": "本次新增的负责人,按提交顺序。`added_assignee_ids` 是其中仅含 `person` 的子集。无新增时省略。" + }, "assignee_ids": { "description": "变更后的负责人成员 ID 列表。", "items": { @@ -10239,6 +10246,13 @@ }, "type": "array" }, + "assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "description": "跟进事项的负责人。每项为 `{type, id?}`;`ai_sre` 不带 `id`。无负责人时省略。" + }, "item_type": { "description": "跟进事项类型。`action`:挂在故障上的处置行动事项;`follow_up`:挂在故障复盘(Post-mortem)上的改进事项。", "enum": [ @@ -10255,6 +10269,13 @@ }, "type": "array" }, + "removed_assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "description": "本次移除的负责人。`removed_assignee_ids` 是其中仅含 `person` 的子集。无移除时省略。" + }, "title": { "description": "跟进事项标题。", "type": "string" @@ -10379,6 +10400,13 @@ }, "type": "array" }, + "assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "description": "跟进事项的负责人。每项为 `{type, id?}`;`ai_sre` 不带 `id`。无负责人时省略。" + }, "item_type": { "description": "跟进事项类型。`action`:挂在故障上的处置行动事项,可直接转换为 `follow_up`;`follow_up`:挂在故障复盘(Post-mortem)上的改进事项,创建时要求故障已关联到该复盘。", "enum": [ @@ -29665,7 +29693,7 @@ "$ref": "#/components/schemas/DashboardPanelQuery" }, "maxItems": 26, - "description": "面板内的查询。`time_series` 允许 1~26 条,`text`、`incident_list` 不允许查询,其余类型必须恰好 1 条。" + "description": "面板内的查询。`time_series` 允许 1~26 条,`text` 不允许查询,其余类型必须恰好 1 条。" }, "viz_config": { "$ref": "#/components/schemas/DashboardVizConfig" @@ -29807,7 +29835,7 @@ "name": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$", - "description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。" + "description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。以 `__` 开头的名称保留给内置时间变量。" }, "label": { "type": "string", @@ -29855,7 +29883,7 @@ "name": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$", - "description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。" + "description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。以 `__` 开头的名称保留给内置时间变量。" }, "label": { "type": "string", @@ -29899,7 +29927,7 @@ "name": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$", - "description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。" + "description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。以 `__` 开头的名称保留给内置时间变量。" }, "label": { "type": "string", @@ -30145,19 +30173,19 @@ }, "expr": { "type": "string", - "description": "日志查询表达式;可通过 `{{ }}` 引用其他变量。" + "description": "日志查询表达式;可通过 `{{ }}` 引用其他变量。数据源为 Loki 时可为空,此时会列出该字段在所有流中的取值。" }, "args": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "具名查询参数;默认为空对象。" + "description": "具名查询参数;默认为空对象。数据源为 Loki 时必须为空。" }, "field": { "type": "string", "minLength": 1, - "description": "取值作为候选项的日志字段。" + "description": "取值作为候选项的日志字段。数据源为 Loki 时必须是不带修饰的流标签名(字母、数字和下划线)。" } }, "required": [ @@ -30190,9 +30218,6 @@ }, { "$ref": "#/components/schemas/DashboardTextViz" - }, - { - "$ref": "#/components/schemas/DashboardIncidentListViz" } ], "discriminator": { @@ -30204,8 +30229,7 @@ "bar": "#/components/schemas/DashboardBarViz", "gauge": "#/components/schemas/DashboardGaugeViz", "logs": "#/components/schemas/DashboardLogsViz", - "text": "#/components/schemas/DashboardTextViz", - "incident_list": "#/components/schemas/DashboardIncidentListViz" + "text": "#/components/schemas/DashboardTextViz" } } }, @@ -30577,28 +30601,6 @@ "markdown" ] }, - "DashboardIncidentListViz": { - "type": "object", - "description": "故障列表面板。数据由前端从 Flashduty 故障接口获取,因此面板不运行查询、也不需要数据源。", - "properties": { - "kind": { - "type": "string", - "enum": [ - "incident_list" - ], - "description": "可视化类型判别字段,固定为 `incident_list`。" - }, - "options": { - "type": "object", - "additionalProperties": true, - "description": "所选可视化类型的开放配置对象;也是定义中唯一无损 round-trip 的部分。缺失或 null 时规范化为 `{}`。" - } - }, - "required": [ - "kind", - "options" - ] - }, "DashboardThreshold": { "type": "object", "description": "数值的颜色阈值。`warning`/`critical` 至少设置一个;两者都设置时需按 `mode` 满足大小关系。", @@ -31422,10 +31424,9 @@ "bar", "gauge", "logs", - "text", - "incident_list" + "text" ], - "description": "可视化类型:`time_series` = 时序图;`table` = 表格;`stat` = 单值;`bar` = 柱状图;`gauge` = 仪表盘;`logs` = 日志流;`text` = Markdown 文本;`incident_list` = 故障列表。" + "description": "可视化类型:`time_series` = 时序图;`table` = 表格;`stat` = 单值;`bar` = 柱状图;`gauge` = 仪表盘;`logs` = 日志流;`text` = Markdown 文本。" } }, "required": [ @@ -32044,6 +32045,19 @@ "$ref": "#/components/schemas/DashboardSelection" }, "description": "按变量名索引的选择,最多 20 项。" + }, + "max_data_points": { + "type": [ + "integer", + "null" + ], + "minimum": 2, + "maximum": 5000, + "description": "用于计算 step 并渲染内置时间变量的降采样目标,2~5000 个点;省略或传 null 时服务端默认 100。" + }, + "preserve_builtin_variables": { + "type": "boolean", + "description": "在解析结果中逐字保留内置时间变量,供调用方按自己的执行窗口渲染;用户变量照常解析。" } }, "required": [ From 53de6a45face9821436fa97eab891f822c37c7e0 Mon Sep 17 00:00:00 2001 From: flashduty-bot Date: Fri, 9 Oct 2026 08:11:02 +0000 Subject: [PATCH 2/2] docs(api): align the on-call split specs with the consolidated copy (work-item assignees required, list anchor) --- api-reference/on-call.openapi.en.json | 3 ++- api-reference/on-call.openapi.zh.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api-reference/on-call.openapi.en.json b/api-reference/on-call.openapi.en.json index d283c8101..117f41da9 100644 --- a/api-reference/on-call.openapi.en.json +++ b/api-reference/on-call.openapi.en.json @@ -33300,6 +33300,7 @@ "source_kind", "version", "assignee_ids", + "assignees", "created_by", "updated_by", "created_at_seconds", @@ -33508,7 +33509,7 @@ }, "ListWorkItemRequest": { "type": "object", - "description": "Filters for listing work items. At least one of `incident_id`, `post_mortem_id`, or `assignee_id` is required.", + "description": "Filters for listing work items. At least one of `incident_id`, `post_mortem_id`, `assignee_id`, or `assignee_type` = `ai_sre` is required.", "properties": { "incident_id": { "type": "string", diff --git a/api-reference/on-call.openapi.zh.json b/api-reference/on-call.openapi.zh.json index 440fffb54..0dd9d8575 100644 --- a/api-reference/on-call.openapi.zh.json +++ b/api-reference/on-call.openapi.zh.json @@ -33300,6 +33300,7 @@ "source_kind", "version", "assignee_ids", + "assignees", "created_by", "updated_by", "created_at_seconds", @@ -33508,7 +33509,7 @@ }, "ListWorkItemRequest": { "type": "object", - "description": "查询跟进事项的过滤条件。`incident_id`、`post_mortem_id`、`assignee_id` 至少提供一个。", + "description": "查询跟进事项的过滤条件。`incident_id`、`post_mortem_id`、`assignee_id`,或 `assignee_type` 为 `ai_sre`,至少满足一个。", "properties": { "incident_id": { "type": "string",