Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 23 additions & 37 deletions api-reference/monitors.openapi.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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": [
Expand Down Expand Up @@ -9876,9 +9876,6 @@
},
{
"$ref": "#/components/schemas/DashboardTextViz"
},
{
"$ref": "#/components/schemas/DashboardIncidentListViz"
}
],
"discriminator": {
Expand All @@ -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"
}
}
},
Expand Down Expand Up @@ -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`.",
Expand Down Expand Up @@ -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": [
Expand Down Expand Up @@ -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": [
Expand Down
60 changes: 23 additions & 37 deletions api-reference/monitors.openapi.zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -9493,7 +9493,7 @@
"name": {
"type": "string",
"pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
"description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。"
"description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。以 `__` 开头的名称保留给内置时间变量。"
},
"label": {
"type": "string",
Expand Down Expand Up @@ -9541,7 +9541,7 @@
"name": {
"type": "string",
"pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
"description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。"
"description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。以 `__` 开头的名称保留给内置时间变量。"
},
"label": {
"type": "string",
Expand Down Expand Up @@ -9585,7 +9585,7 @@
"name": {
"type": "string",
"pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
"description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。"
"description": "在 `{{ }}` 模板中引用的变量名,最多 64 个字符。以 `__` 开头的名称保留给内置时间变量。"
},
"label": {
"type": "string",
Expand Down Expand Up @@ -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": [
Expand Down Expand Up @@ -9876,9 +9876,6 @@
},
{
"$ref": "#/components/schemas/DashboardTextViz"
},
{
"$ref": "#/components/schemas/DashboardIncidentListViz"
}
],
"discriminator": {
Expand All @@ -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"
}
}
},
Expand Down Expand Up @@ -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` 满足大小关系。",
Expand Down Expand Up @@ -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": [
Expand Down Expand Up @@ -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": [
Expand Down
31 changes: 30 additions & 1 deletion api-reference/on-call.openapi.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -33300,6 +33300,7 @@
"source_kind",
"version",
"assignee_ids",
"assignees",
"created_by",
"updated_by",
"created_at_seconds",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -33885,6 +33886,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."
Expand Down Expand Up @@ -33986,6 +33994,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"
Expand Down
31 changes: 30 additions & 1 deletion api-reference/on-call.openapi.zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -33300,6 +33300,7 @@
"source_kind",
"version",
"assignee_ids",
"assignees",
"created_by",
"updated_by",
"created_at_seconds",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -33885,6 +33886,13 @@
},
"description": "负责人成员 ID 列表。"
},
"assignees": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WorkItemAssignee"
},
"description": "跟进事项的负责人。每项为 `{type, id?}`;`ai_sre` 不带 `id`。无负责人时省略。"
},
"post_mortem_id": {
"type": "string",
"description": "跟进事项绑定的故障复盘 ID。"
Expand Down Expand Up @@ -33986,6 +33994,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"
Expand Down
Loading
Loading