Skip to content

Commit 4da828e

Browse files
authored
Merge pull request #1032 from flashcatcloud/api-review/20261009T080857Z
docs(api): daily audit 2026-10-09 — drop the reverted incident_list panel kind, add the resolve and feed assignee fields
2 parents 35773eb + 53de6a4 commit 4da828e

6 files changed

Lines changed: 208 additions & 150 deletions

File tree

‎api-reference/monitors.openapi.en.json‎

Lines changed: 23 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -9351,7 +9351,7 @@
93519351
"$ref": "#/components/schemas/DashboardPanelQuery"
93529352
},
93539353
"maxItems": 26,
9354-
"description": "Queries in the panel. `time_series` accepts 1–26, `text` and `incident_list` accept none, every other kind accepts exactly one."
9354+
"description": "Queries in the panel. `time_series` accepts 1–26, `text` accepts none, every other kind accepts exactly one."
93559355
},
93569356
"viz_config": {
93579357
"$ref": "#/components/schemas/DashboardVizConfig"
@@ -9493,7 +9493,7 @@
94939493
"name": {
94949494
"type": "string",
94959495
"pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
9496-
"description": "Variable name used in `{{ }}` templates, at most 64 characters."
9496+
"description": "Variable name used in `{{ }}` templates, at most 64 characters. Names starting with `__` are reserved for built-in time variables."
94979497
},
94989498
"label": {
94999499
"type": "string",
@@ -9541,7 +9541,7 @@
95419541
"name": {
95429542
"type": "string",
95439543
"pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
9544-
"description": "Variable name used in `{{ }}` templates, at most 64 characters."
9544+
"description": "Variable name used in `{{ }}` templates, at most 64 characters. Names starting with `__` are reserved for built-in time variables."
95459545
},
95469546
"label": {
95479547
"type": "string",
@@ -9585,7 +9585,7 @@
95859585
"name": {
95869586
"type": "string",
95879587
"pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
9588-
"description": "Variable name used in `{{ }}` templates, at most 64 characters."
9588+
"description": "Variable name used in `{{ }}` templates, at most 64 characters. Names starting with `__` are reserved for built-in time variables."
95899589
},
95909590
"label": {
95919591
"type": "string",
@@ -9831,19 +9831,19 @@
98319831
},
98329832
"expr": {
98339833
"type": "string",
9834-
"description": "Logs query expression; may reference other variables through `{{ }}`."
9834+
"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."
98359835
},
98369836
"args": {
98379837
"type": "object",
98389838
"additionalProperties": {
98399839
"type": "string"
98409840
},
9841-
"description": "Named query arguments; defaults to an empty object."
9841+
"description": "Named query arguments; defaults to an empty object. Must be empty for a Loki datasource."
98429842
},
98439843
"field": {
98449844
"type": "string",
98459845
"minLength": 1,
9846-
"description": "Log field whose values become candidates."
9846+
"description": "Log field whose values become candidates. For a Loki datasource it must be a bare stream label name (letters, digits and underscores)."
98479847
}
98489848
},
98499849
"required": [
@@ -9876,9 +9876,6 @@
98769876
},
98779877
{
98789878
"$ref": "#/components/schemas/DashboardTextViz"
9879-
},
9880-
{
9881-
"$ref": "#/components/schemas/DashboardIncidentListViz"
98829879
}
98839880
],
98849881
"discriminator": {
@@ -9890,8 +9887,7 @@
98909887
"bar": "#/components/schemas/DashboardBarViz",
98919888
"gauge": "#/components/schemas/DashboardGaugeViz",
98929889
"logs": "#/components/schemas/DashboardLogsViz",
9893-
"text": "#/components/schemas/DashboardTextViz",
9894-
"incident_list": "#/components/schemas/DashboardIncidentListViz"
9890+
"text": "#/components/schemas/DashboardTextViz"
98959891
}
98969892
}
98979893
},
@@ -10263,28 +10259,6 @@
1026310259
"markdown"
1026410260
]
1026510261
},
10266-
"DashboardIncidentListViz": {
10267-
"type": "object",
10268-
"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.",
10269-
"properties": {
10270-
"kind": {
10271-
"type": "string",
10272-
"enum": [
10273-
"incident_list"
10274-
],
10275-
"description": "Visualization kind discriminator; always `incident_list`."
10276-
},
10277-
"options": {
10278-
"type": "object",
10279-
"additionalProperties": true,
10280-
"description": "Open options object for the chosen visualization kind; the only part of the definition that round-trips losslessly. Missing or null normalizes to `{}`."
10281-
}
10282-
},
10283-
"required": [
10284-
"kind",
10285-
"options"
10286-
]
10287-
},
1028810262
"DashboardThreshold": {
1028910263
"type": "object",
1029010264
"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 @@
1110811082
"bar",
1110911083
"gauge",
1111011084
"logs",
11111-
"text",
11112-
"incident_list"
11085+
"text"
1111311086
],
11114-
"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."
11087+
"description": "Visualization kind: `time_series` = time series; `table` = table; `stat` = single value; `bar` = bar chart; `gauge` = gauge; `logs` = log stream; `text` = Markdown text."
1111511088
}
1111611089
},
1111711090
"required": [
@@ -11730,6 +11703,19 @@
1173011703
"$ref": "#/components/schemas/DashboardSelection"
1173111704
},
1173211705
"description": "Selections keyed by variable name, at most 20 entries."
11706+
},
11707+
"max_data_points": {
11708+
"type": [
11709+
"integer",
11710+
"null"
11711+
],
11712+
"minimum": 2,
11713+
"maximum": 5000,
11714+
"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."
11715+
},
11716+
"preserve_builtin_variables": {
11717+
"type": "boolean",
11718+
"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."
1173311719
}
1173411720
},
1173511721
"required": [

‎api-reference/monitors.openapi.zh.json‎

Lines changed: 23 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -9351,7 +9351,7 @@
93519351
"$ref": "#/components/schemas/DashboardPanelQuery"
93529352
},
93539353
"maxItems": 26,
9354-
"description": "面板内的查询。`time_series` 允许 1~26 条,`text`、`incident_list` 不允许查询,其余类型必须恰好 1 条。"
9354+
"description": "面板内的查询。`time_series` 允许 1~26 条,`text` 不允许查询,其余类型必须恰好 1 条。"
93559355
},
93569356
"viz_config": {
93579357
"$ref": "#/components/schemas/DashboardVizConfig"
@@ -9493,7 +9493,7 @@
94939493
"name": {
94949494
"type": "string",
94959495
"pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
9496-
"description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。"
9496+
"description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。以 `__` 开头的名称保留给内置时间变量。"
94979497
},
94989498
"label": {
94999499
"type": "string",
@@ -9541,7 +9541,7 @@
95419541
"name": {
95429542
"type": "string",
95439543
"pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
9544-
"description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。"
9544+
"description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。以 `__` 开头的名称保留给内置时间变量。"
95459545
},
95469546
"label": {
95479547
"type": "string",
@@ -9585,7 +9585,7 @@
95859585
"name": {
95869586
"type": "string",
95879587
"pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
9588-
"description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。"
9588+
"description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。以 `__` 开头的名称保留给内置时间变量。"
95899589
},
95909590
"label": {
95919591
"type": "string",
@@ -9831,19 +9831,19 @@
98319831
},
98329832
"expr": {
98339833
"type": "string",
9834-
"description": "日志查询表达式;可通过 `{{ }}` 引用其他变量。"
9834+
"description": "日志查询表达式;可通过 `{{ }}` 引用其他变量。数据源为 Loki 时可为空,此时会列出该字段在所有流中的取值。"
98359835
},
98369836
"args": {
98379837
"type": "object",
98389838
"additionalProperties": {
98399839
"type": "string"
98409840
},
9841-
"description": "具名查询参数;默认为空对象。"
9841+
"description": "具名查询参数;默认为空对象。数据源为 Loki 时必须为空。"
98429842
},
98439843
"field": {
98449844
"type": "string",
98459845
"minLength": 1,
9846-
"description": "取值作为候选项的日志字段。"
9846+
"description": "取值作为候选项的日志字段。数据源为 Loki 时必须是不带修饰的流标签名(字母、数字和下划线)。"
98479847
}
98489848
},
98499849
"required": [
@@ -9876,9 +9876,6 @@
98769876
},
98779877
{
98789878
"$ref": "#/components/schemas/DashboardTextViz"
9879-
},
9880-
{
9881-
"$ref": "#/components/schemas/DashboardIncidentListViz"
98829879
}
98839880
],
98849881
"discriminator": {
@@ -9890,8 +9887,7 @@
98909887
"bar": "#/components/schemas/DashboardBarViz",
98919888
"gauge": "#/components/schemas/DashboardGaugeViz",
98929889
"logs": "#/components/schemas/DashboardLogsViz",
9893-
"text": "#/components/schemas/DashboardTextViz",
9894-
"incident_list": "#/components/schemas/DashboardIncidentListViz"
9890+
"text": "#/components/schemas/DashboardTextViz"
98959891
}
98969892
}
98979893
},
@@ -10263,28 +10259,6 @@
1026310259
"markdown"
1026410260
]
1026510261
},
10266-
"DashboardIncidentListViz": {
10267-
"type": "object",
10268-
"description": "故障列表面板。数据由前端从 Flashduty 故障接口获取,因此面板不运行查询、也不需要数据源。",
10269-
"properties": {
10270-
"kind": {
10271-
"type": "string",
10272-
"enum": [
10273-
"incident_list"
10274-
],
10275-
"description": "可视化类型判别字段,固定为 `incident_list`。"
10276-
},
10277-
"options": {
10278-
"type": "object",
10279-
"additionalProperties": true,
10280-
"description": "所选可视化类型的开放配置对象;也是定义中唯一无损 round-trip 的部分。缺失或 null 时规范化为 `{}`。"
10281-
}
10282-
},
10283-
"required": [
10284-
"kind",
10285-
"options"
10286-
]
10287-
},
1028810262
"DashboardThreshold": {
1028910263
"type": "object",
1029010264
"description": "数值的颜色阈值。`warning`/`critical` 至少设置一个;两者都设置时需按 `mode` 满足大小关系。",
@@ -11108,10 +11082,9 @@
1110811082
"bar",
1110911083
"gauge",
1111011084
"logs",
11111-
"text",
11112-
"incident_list"
11085+
"text"
1111311086
],
11114-
"description": "可视化类型:`time_series` = 时序图;`table` = 表格;`stat` = 单值;`bar` = 柱状图;`gauge` = 仪表盘;`logs` = 日志流;`text` = Markdown 文本;`incident_list` = 故障列表。"
11087+
"description": "可视化类型:`time_series` = 时序图;`table` = 表格;`stat` = 单值;`bar` = 柱状图;`gauge` = 仪表盘;`logs` = 日志流;`text` = Markdown 文本。"
1111511088
}
1111611089
},
1111711090
"required": [
@@ -11730,6 +11703,19 @@
1173011703
"$ref": "#/components/schemas/DashboardSelection"
1173111704
},
1173211705
"description": "按变量名索引的选择,最多 20 项。"
11706+
},
11707+
"max_data_points": {
11708+
"type": [
11709+
"integer",
11710+
"null"
11711+
],
11712+
"minimum": 2,
11713+
"maximum": 5000,
11714+
"description": "用于计算 step 并渲染内置时间变量的降采样目标,2~5000 个点;省略或传 null 时服务端默认 100。"
11715+
},
11716+
"preserve_builtin_variables": {
11717+
"type": "boolean",
11718+
"description": "在解析结果中逐字保留内置时间变量,供调用方按自己的执行窗口渲染;用户变量照常解析。"
1173311719
}
1173411720
},
1173511721
"required": [

‎api-reference/on-call.openapi.en.json‎

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33300,6 +33300,7 @@
3330033300
"source_kind",
3330133301
"version",
3330233302
"assignee_ids",
33303+
"assignees",
3330333304
"created_by",
3330433305
"updated_by",
3330533306
"created_at_seconds",
@@ -33508,7 +33509,7 @@
3350833509
},
3350933510
"ListWorkItemRequest": {
3351033511
"type": "object",
33511-
"description": "Filters for listing work items. At least one of `incident_id`, `post_mortem_id`, or `assignee_id` is required.",
33512+
"description": "Filters for listing work items. At least one of `incident_id`, `post_mortem_id`, `assignee_id`, or `assignee_type` = `ai_sre` is required.",
3351233513
"properties": {
3351333514
"incident_id": {
3351433515
"type": "string",
@@ -33885,6 +33886,13 @@
3388533886
},
3388633887
"description": "Assignee member IDs."
3388733888
},
33889+
"assignees": {
33890+
"type": "array",
33891+
"items": {
33892+
"$ref": "#/components/schemas/WorkItemAssignee"
33893+
},
33894+
"description": "Assignees of the work item. Each entry is `{type, id?}`; an `ai_sre` entry omits `id`. Omitted when there is no assignee."
33895+
},
3388833896
"post_mortem_id": {
3388933897
"type": "string",
3389033898
"description": "ID of the post-mortem the work item is bound to."
@@ -33986,6 +33994,27 @@
3398633994
"format": "int64"
3398733995
},
3398833996
"description": "Member IDs removed from assignees."
33997+
},
33998+
"assignees": {
33999+
"type": "array",
34000+
"items": {
34001+
"$ref": "#/components/schemas/WorkItemAssignee"
34002+
},
34003+
"description": "Assignees of the work item. Each entry is `{type, id?}`; an `ai_sre` entry omits `id`. Omitted when there is no assignee."
34004+
},
34005+
"added_assignees": {
34006+
"type": "array",
34007+
"items": {
34008+
"$ref": "#/components/schemas/WorkItemAssignee"
34009+
},
34010+
"description": "Assignees added by this change, in submitted order. `added_assignee_ids` is the person-only subset. Omitted when nothing was added."
34011+
},
34012+
"removed_assignees": {
34013+
"type": "array",
34014+
"items": {
34015+
"$ref": "#/components/schemas/WorkItemAssignee"
34016+
},
34017+
"description": "Assignees removed by this change. `removed_assignee_ids` is the person-only subset. Omitted when nothing was removed."
3398934018
}
3399034019
},
3399134020
"title": "i_wi_assignees"

‎api-reference/on-call.openapi.zh.json‎

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33300,6 +33300,7 @@
3330033300
"source_kind",
3330133301
"version",
3330233302
"assignee_ids",
33303+
"assignees",
3330333304
"created_by",
3330433305
"updated_by",
3330533306
"created_at_seconds",
@@ -33508,7 +33509,7 @@
3350833509
},
3350933510
"ListWorkItemRequest": {
3351033511
"type": "object",
33511-
"description": "查询跟进事项的过滤条件。`incident_id`、`post_mortem_id`、`assignee_id` 至少提供一个。",
33512+
"description": "查询跟进事项的过滤条件。`incident_id`、`post_mortem_id`、`assignee_id`,或 `assignee_type` 为 `ai_sre`,至少满足一个。",
3351233513
"properties": {
3351333514
"incident_id": {
3351433515
"type": "string",
@@ -33885,6 +33886,13 @@
3388533886
},
3388633887
"description": "负责人成员 ID 列表。"
3388733888
},
33889+
"assignees": {
33890+
"type": "array",
33891+
"items": {
33892+
"$ref": "#/components/schemas/WorkItemAssignee"
33893+
},
33894+
"description": "跟进事项的负责人。每项为 `{type, id?}`;`ai_sre` 不带 `id`。无负责人时省略。"
33895+
},
3388833896
"post_mortem_id": {
3388933897
"type": "string",
3389033898
"description": "跟进事项绑定的故障复盘 ID。"
@@ -33986,6 +33994,27 @@
3398633994
"format": "int64"
3398733995
},
3398833996
"description": "从负责人中移除的成员 ID。"
33997+
},
33998+
"assignees": {
33999+
"type": "array",
34000+
"items": {
34001+
"$ref": "#/components/schemas/WorkItemAssignee"
34002+
},
34003+
"description": "跟进事项的负责人。每项为 `{type, id?}`;`ai_sre` 不带 `id`。无负责人时省略。"
34004+
},
34005+
"added_assignees": {
34006+
"type": "array",
34007+
"items": {
34008+
"$ref": "#/components/schemas/WorkItemAssignee"
34009+
},
34010+
"description": "本次新增的负责人,按提交顺序。`added_assignee_ids` 是其中仅含 `person` 的子集。无新增时省略。"
34011+
},
34012+
"removed_assignees": {
34013+
"type": "array",
34014+
"items": {
34015+
"$ref": "#/components/schemas/WorkItemAssignee"
34016+
},
34017+
"description": "本次移除的负责人。`removed_assignee_ids` 是其中仅含 `person` 的子集。无移除时省略。"
3398934018
}
3399034019
},
3399134020
"title": "i_wi_assignees"

0 commit comments

Comments
 (0)