From 6f470a695020bbefe54a58a7866f10cabfeb0791 Mon Sep 17 00:00:00 2001 From: Flashduty AI-SRE Date: Mon, 14 Sep 2026 08:08:23 +0000 Subject: [PATCH] =?UTF-8?q?docs(api):=20daily=20audit=202026-09-14=20?= =?UTF-8?q?=E2=80=94=20retire=20monit=20rule=20import/export,=20add=20temp?= =?UTF-8?q?late=20notification=20fields?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Monitors - remove POST /monit/rule/export and POST /monit/rule/import. fc-pgy 9771d51a (2026-09-11) dropped both registry ledger rows (both auth=all); monit-webapi deleted the routes (/monit/rule/import in c7437b5, /monit/rule/export in 011d956) and the bundle import/export APIs replaced them. On-call (Templates) - TemplateCreateRequest / TemplateUpdateRequest / TemplateItem gain wecom_markdown_v2_enabled, feishu_app_card_v2_preserve_blank_lines and feishu_app_war_room_enabled. - PreviewTemplateRequest gains feishu_app_card_v2_enabled and feishu_app_card_v2_preserve_blank_lines. Platform (Audit) - AuditLog.credential_type description now documents ephemeral_app_key. docs.json: drop the two retired monitor operations from both language groups. --- api-reference/monitors.openapi.en.json | 174 ------------------- api-reference/monitors.openapi.zh.json | 174 ------------------- api-reference/on-call.openapi.en.json | 56 ++++++ api-reference/on-call.openapi.zh.json | 56 ++++++ api-reference/openapi.en.json | 232 ++++++------------------- api-reference/openapi.zh.json | 232 ++++++------------------- api-reference/platform.openapi.en.json | 2 +- api-reference/platform.openapi.zh.json | 2 +- docs.json | 4 - 9 files changed, 228 insertions(+), 704 deletions(-) diff --git a/api-reference/monitors.openapi.en.json b/api-reference/monitors.openapi.en.json index f1dbe064..145d7dab 100644 --- a/api-reference/monitors.openapi.en.json +++ b/api-reference/monitors.openapi.en.json @@ -682,88 +682,6 @@ } } }, - "/monit/rule/export": { - "post": { - "operationId": "monit-rule-read-export", - "summary": "Export alert rules", - "description": "Export the configuration of selected alert rules as a portable JSON array, compatible with `POST /monit/rule/import`.", - "tags": [ - "Monitors/Alert rules" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/day**; **200 requests/minute**; **20 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |", - "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-export", - "metadata": { - "sidebarTitle": "Export alert rules" - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/AlertRuleExportListResponse" - } - } - } - ] - }, - "example": { - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": [ - { - "name": "CPU High", - "ds_type": "prometheus", - "ds_list": [ - "prometheus*" - ], - "enabled": true, - "cron_pattern": "0 * * * * *" - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleIDsRequest" - }, - "example": { - "ids": [ - 50001 - ] - } - } - } - } - } - }, "/monit/datasource/sls/logstores": { "post": { "operationId": "monit-datasource-read-sls-logstores", @@ -1079,98 +997,6 @@ } } }, - "/monit/rule/import": { - "post": { - "operationId": "monit-rule-write-import", - "summary": "Import alert rules", - "description": "Import one or more alert rules from a JSON array. Returns the result for each rule, indicating success or failure.", - "tags": [ - "Monitors/Alert rules" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **20 requests/minute**; **2 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- The request body is a JSON array of rule export objects (compatible with the output of `POST /monit/rule/export`).\n- Each object must include `folder_id`, `ds_type`, and either `ds_list` or `ds_ids`.\n- Some rules may fail (e.g. duplicate name). Check each result for individual status.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-import", - "metadata": { - "sidebarTitle": "Import alert rules" - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/RuleImportResponse" - } - } - } - ] - }, - "example": { - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": [ - { - "name": "CPU High", - "message": "" - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleImportRequest" - }, - "example": [ - { - "folder_id": 100, - "name": "CPU High", - "ds_type": "prometheus", - "ds_list": [ - "prometheus*" - ], - "enabled": true, - "cron_pattern": "0 * * * * *", - "rule_configs": { - "queries": [ - { - "name": "A", - "expr": "avg(cpu_usage_idle) < 10" - } - ] - } - } - ] - } - } - } - } - }, "/monit/rule/list/basic": { "post": { "operationId": "monit-rule-read-list", diff --git a/api-reference/monitors.openapi.zh.json b/api-reference/monitors.openapi.zh.json index 709864a0..4cea844d 100644 --- a/api-reference/monitors.openapi.zh.json +++ b/api-reference/monitors.openapi.zh.json @@ -682,88 +682,6 @@ } } }, - "/monit/rule/export": { - "post": { - "operationId": "monit-rule-read-export", - "summary": "导出告警规则", - "description": "将选定告警规则的配置导出为可移植的 JSON 数组,与 `POST /monit/rule/import` 兼容。", - "tags": [ - "Monitors/告警规则" - ], - "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/天**;**200 次/分钟**;**20 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |", - "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-export", - "metadata": { - "sidebarTitle": "导出告警规则" - } - }, - "responses": { - "200": { - "description": "成功", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/AlertRuleExportListResponse" - } - } - } - ] - }, - "example": { - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": [ - { - "name": "CPU High", - "ds_type": "prometheus", - "ds_list": [ - "prometheus*" - ], - "enabled": true, - "cron_pattern": "0 * * * * *" - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleIDsRequest" - }, - "example": { - "ids": [ - 50001 - ] - } - } - } - } - } - }, "/monit/datasource/sls/logstores": { "post": { "operationId": "monit-datasource-read-sls-logstores", @@ -1079,98 +997,6 @@ } } }, - "/monit/rule/import": { - "post": { - "operationId": "monit-rule-write-import", - "summary": "导入告警规则", - "description": "从 JSON 数组导入一条或多条告警规则,返回每条规则的导入结果(成功或失败)。", - "tags": [ - "Monitors/告警规则" - ], - "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **20 次/分钟**;**2 次/秒** |\n| 权限要求 | **告警规则管理**(`monit`) |\n\n## 使用说明\n\n- 请求体为规则导出对象的 JSON 数组(与 `POST /monit/rule/export` 输出兼容)。\n- 每个对象必须包含 `folder_id`、`ds_type` 以及 `ds_list` 或 `ds_ids` 之一。\n- 部分规则可能失败(如名称重复),请检查每条结果的状态。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", - "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-import", - "metadata": { - "sidebarTitle": "导入告警规则" - } - }, - "responses": { - "200": { - "description": "成功", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/RuleImportResponse" - } - } - } - ] - }, - "example": { - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4", - "data": [ - { - "name": "CPU High", - "message": "" - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleImportRequest" - }, - "example": [ - { - "folder_id": 100, - "name": "CPU High", - "ds_type": "prometheus", - "ds_list": [ - "prometheus*" - ], - "enabled": true, - "cron_pattern": "0 * * * * *", - "rule_configs": { - "queries": [ - { - "name": "A", - "expr": "avg(cpu_usage_idle) < 10" - } - ] - } - } - ] - } - } - } - } - }, "/monit/rule/list/basic": { "post": { "operationId": "monit-rule-read-list", diff --git a/api-reference/on-call.openapi.en.json b/api-reference/on-call.openapi.en.json index 55d97f5d..252afe6a 100644 --- a/api-reference/on-call.openapi.en.json +++ b/api-reference/on-call.openapi.en.json @@ -28499,6 +28499,10 @@ "type": "string", "description": "WeCom robot message template source." }, + "wecom_markdown_v2_enabled": { + "type": "boolean", + "description": "Send WeCom robot notifications as `markdown_v2` messages instead of plain markdown." + }, "feishu": { "type": "string", "description": "Feishu robot message template source." @@ -28512,6 +28516,14 @@ "default": false, "description": "Render alert labels as a table in Feishu app cards." }, + "feishu_app_card_v2_preserve_blank_lines": { + "type": "boolean", + "description": "Keep blank lines in the body of Feishu app card v2 messages." + }, + "feishu_app_war_room_enabled": { + "type": "boolean", + "description": "Show the Create War Room button on Feishu app cards." + }, "dingtalk_app": { "type": "string", "description": "DingTalk app message template source." @@ -28599,6 +28611,9 @@ "feishu", "feishu_app", "feishu_app_card_v2_table_enabled", + "wecom_markdown_v2_enabled", + "feishu_app_card_v2_preserve_blank_lines", + "feishu_app_war_room_enabled", "dingtalk_app", "wecom_app", "slack_app", @@ -28658,6 +28673,10 @@ "type": "string", "description": "WeCom robot message template source." }, + "wecom_markdown_v2_enabled": { + "type": "boolean", + "description": "Whether WeCom robot notifications use the `markdown_v2` message format." + }, "feishu": { "type": "string", "description": "Feishu robot message template source." @@ -28670,6 +28689,14 @@ "type": "boolean", "description": "Whether alert labels use table rendering in Feishu app cards." }, + "feishu_app_card_v2_preserve_blank_lines": { + "type": "boolean", + "description": "Whether Feishu app card v2 messages keep blank lines in the body." + }, + "feishu_app_war_room_enabled": { + "type": "boolean", + "description": "Whether Feishu app cards show the Create War Room button. Hidden when the incident has no responders." + }, "dingtalk_app": { "type": "string", "description": "DingTalk app message template source." @@ -28897,6 +28924,13 @@ ], "description": "WeCom robot message template source. Omit to keep the current content; send an empty string to clear it." }, + "wecom_markdown_v2_enabled": { + "type": [ + "boolean", + "null" + ], + "description": "When set, switch WeCom robot notifications between `markdown_v2` and plain markdown. Omit to keep the existing setting." + }, "feishu": { "type": [ "string", @@ -28918,6 +28952,20 @@ ], "description": "When set, enable or disable table rendering for alert labels in Feishu app cards. Omit to keep the existing setting." }, + "feishu_app_card_v2_preserve_blank_lines": { + "type": [ + "boolean", + "null" + ], + "description": "When set, keep or drop blank lines in the body of Feishu app card v2 messages. Omit to keep the existing setting." + }, + "feishu_app_war_room_enabled": { + "type": [ + "boolean", + "null" + ], + "description": "When set, show or hide the Create War Room button on Feishu app cards. Omit to keep the existing setting." + }, "dingtalk_app": { "type": [ "string", @@ -30648,6 +30696,14 @@ "incident_card_hidden_fields": { "$ref": "#/components/schemas/IncidentCardHiddenFields", "description": "Incident card fields to hide per IM app when previewing." + }, + "feishu_app_card_v2_enabled": { + "type": "boolean", + "description": "Render the preview as a Feishu app card v2 message." + }, + "feishu_app_card_v2_preserve_blank_lines": { + "type": "boolean", + "description": "Keep blank lines in the body of the Feishu app card v2 preview." } }, "required": [ diff --git a/api-reference/on-call.openapi.zh.json b/api-reference/on-call.openapi.zh.json index 9f8ed76e..c203decf 100644 --- a/api-reference/on-call.openapi.zh.json +++ b/api-reference/on-call.openapi.zh.json @@ -28499,6 +28499,10 @@ "type": "string", "description": "企业微信群机器人消息模板源。" }, + "wecom_markdown_v2_enabled": { + "type": "boolean", + "description": "企业微信群机器人通知使用 `markdown_v2` 消息格式,而非普通 markdown。" + }, "feishu": { "type": "string", "description": "飞书群机器人消息模板源。" @@ -28512,6 +28516,14 @@ "default": false, "description": "是否在飞书应用卡片中以表格渲染告警标签,默认关闭。" }, + "feishu_app_card_v2_preserve_blank_lines": { + "type": "boolean", + "description": "飞书应用卡片 v2 消息保留正文中的空行。" + }, + "feishu_app_war_room_enabled": { + "type": "boolean", + "description": "飞书应用卡片展示「创建作战室」按钮。" + }, "dingtalk_app": { "type": "string", "description": "钉钉应用消息模板源。" @@ -28599,6 +28611,9 @@ "feishu", "feishu_app", "feishu_app_card_v2_table_enabled", + "wecom_markdown_v2_enabled", + "feishu_app_card_v2_preserve_blank_lines", + "feishu_app_war_room_enabled", "dingtalk_app", "wecom_app", "slack_app", @@ -28658,6 +28673,10 @@ "type": "string", "description": "企业微信群机器人消息模板源。" }, + "wecom_markdown_v2_enabled": { + "type": "boolean", + "description": "企业微信群机器人通知是否使用 `markdown_v2` 消息格式。" + }, "feishu": { "type": "string", "description": "飞书群机器人消息模板源。" @@ -28670,6 +28689,14 @@ "type": "boolean", "description": "是否在飞书应用卡片中以表格渲染告警标签。" }, + "feishu_app_card_v2_preserve_blank_lines": { + "type": "boolean", + "description": "飞书应用卡片 v2 消息是否保留正文中的空行。" + }, + "feishu_app_war_room_enabled": { + "type": "boolean", + "description": "飞书应用卡片是否展示「创建作战室」按钮;故障无响应人时不展示。" + }, "dingtalk_app": { "type": "string", "description": "钉钉应用消息模板源。" @@ -28897,6 +28924,13 @@ ], "description": "企业微信群机器人消息模板源。省略时保持当前内容;传空字符串表示清空。" }, + "wecom_markdown_v2_enabled": { + "type": [ + "boolean", + "null" + ], + "description": "设置后切换企业微信群机器人通知的 `markdown_v2` / 普通 markdown 格式;省略时保持当前设置。" + }, "feishu": { "type": [ "string", @@ -28918,6 +28952,20 @@ ], "description": "设置后开启或关闭飞书应用卡片中的告警标签表格渲染;省略时保持当前设置。" }, + "feishu_app_card_v2_preserve_blank_lines": { + "type": [ + "boolean", + "null" + ], + "description": "设置后决定飞书应用卡片 v2 消息是否保留正文空行;省略时保持当前设置。" + }, + "feishu_app_war_room_enabled": { + "type": [ + "boolean", + "null" + ], + "description": "设置后决定飞书应用卡片是否展示「创建作战室」按钮;省略时保持当前设置。" + }, "dingtalk_app": { "type": [ "string", @@ -30648,6 +30696,14 @@ "incident_card_hidden_fields": { "$ref": "#/components/schemas/IncidentCardHiddenFields", "description": "预览时按 IM 应用隐藏的故障卡片字段。" + }, + "feishu_app_card_v2_enabled": { + "type": "boolean", + "description": "按飞书应用卡片 v2 消息渲染预览。" + }, + "feishu_app_card_v2_preserve_blank_lines": { + "type": "boolean", + "description": "飞书应用卡片 v2 预览保留正文中的空行。" } }, "required": [ diff --git a/api-reference/openapi.en.json b/api-reference/openapi.en.json index 98a543de..2eb2bd71 100644 --- a/api-reference/openapi.en.json +++ b/api-reference/openapi.en.json @@ -2982,7 +2982,7 @@ "type": "integer" }, "credential_type": { - "description": "Credential type used for the call. `app_key` when authenticated with an app key; empty string for member sessions.", + "description": "Credential type used for the call. `app_key` for a long-lived console app key, `ephemeral_app_key` for a short-lived key issued to AI SRE, and an empty string for member sessions.", "type": "string" }, "ip": { @@ -17263,6 +17263,14 @@ "description": "Template content to render.", "type": "string" }, + "feishu_app_card_v2_enabled": { + "type": "boolean", + "description": "Render the preview as a Feishu app card v2 message." + }, + "feishu_app_card_v2_preserve_blank_lines": { + "type": "boolean", + "description": "Keep blank lines in the body of the Feishu app card v2 preview." + }, "incident_card_hidden_fields": { "$ref": "#/components/schemas/IncidentCardHiddenFields", "description": "Incident card fields to hide per IM app when previewing." @@ -26086,11 +26094,19 @@ "description": "Feishu app message template source.", "type": "string" }, + "feishu_app_card_v2_preserve_blank_lines": { + "type": "boolean", + "description": "Keep blank lines in the body of Feishu app card v2 messages." + }, "feishu_app_card_v2_table_enabled": { "default": false, "description": "Render alert labels as a table in Feishu app cards.", "type": "boolean" }, + "feishu_app_war_room_enabled": { + "type": "boolean", + "description": "Show the Create War Room button on Feishu app cards." + }, "incident_card_hidden_fields": { "$ref": "#/components/schemas/IncidentCardHiddenFields", "description": "Incident card fields hidden per IM app type." @@ -26140,6 +26156,10 @@ "description": "WeCom app message template source.", "type": "string" }, + "wecom_markdown_v2_enabled": { + "type": "boolean", + "description": "Send WeCom robot notifications as `markdown_v2` messages instead of plain markdown." + }, "zoom": { "description": "Zoom bot message template source.", "type": "string" @@ -26233,10 +26253,18 @@ "description": "Feishu app message template source.", "type": "string" }, + "feishu_app_card_v2_preserve_blank_lines": { + "type": "boolean", + "description": "Whether Feishu app card v2 messages keep blank lines in the body." + }, "feishu_app_card_v2_table_enabled": { "description": "Whether alert labels use table rendering in Feishu app cards.", "type": "boolean" }, + "feishu_app_war_room_enabled": { + "type": "boolean", + "description": "Whether Feishu app cards show the Create War Room button. Hidden when the incident has no responders." + }, "incident_card_hidden_fields": { "$ref": "#/components/schemas/IncidentCardHiddenFields", "description": "Incident card fields hidden per IM app type; an empty object when none are configured." @@ -26307,6 +26335,10 @@ "description": "WeCom app message template source.", "type": "string" }, + "wecom_markdown_v2_enabled": { + "type": "boolean", + "description": "Whether WeCom robot notifications use the `markdown_v2` message format." + }, "zoom": { "description": "Zoom bot message template source.", "type": "string" @@ -26326,6 +26358,9 @@ "feishu", "feishu_app", "feishu_app_card_v2_table_enabled", + "wecom_markdown_v2_enabled", + "feishu_app_card_v2_preserve_blank_lines", + "feishu_app_war_room_enabled", "dingtalk_app", "wecom_app", "slack_app", @@ -26476,6 +26511,13 @@ "null" ] }, + "feishu_app_card_v2_preserve_blank_lines": { + "type": [ + "boolean", + "null" + ], + "description": "When set, keep or drop blank lines in the body of Feishu app card v2 messages. Omit to keep the existing setting." + }, "feishu_app_card_v2_table_enabled": { "description": "When set, enable or disable table rendering for alert labels in Feishu app cards. Omit to keep the existing setting.", "type": [ @@ -26483,6 +26525,13 @@ "null" ] }, + "feishu_app_war_room_enabled": { + "type": [ + "boolean", + "null" + ], + "description": "When set, show or hide the Create War Room button on Feishu app cards. Omit to keep the existing setting." + }, "incident_card_hidden_fields": { "$ref": "#/components/schemas/IncidentCardHiddenFields", "description": "Incident card fields hidden per IM app type." @@ -26563,6 +26612,13 @@ "null" ] }, + "wecom_markdown_v2_enabled": { + "type": [ + "boolean", + "null" + ], + "description": "When set, switch WeCom robot notifications between `markdown_v2` and plain markdown. Omit to keep the existing setting." + }, "zoom": { "description": "Zoom bot message template source. Omit to keep the current content; send an empty string to clear it.", "type": [ @@ -43844,180 +43900,6 @@ } } }, - "/monit/rule/export": { - "post": { - "description": "Export the configuration of selected alert rules as a portable JSON array, compatible with `POST /monit/rule/import`.", - "operationId": "monit-rule-read-export", - "requestBody": { - "content": { - "application/json": { - "example": { - "ids": [ - 50001 - ] - }, - "schema": { - "$ref": "#/components/schemas/RuleIDsRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "data": [ - { - "cron_pattern": "0 * * * * *", - "ds_list": [ - "prometheus*" - ], - "ds_type": "prometheus", - "enabled": true, - "name": "CPU High" - } - ], - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/AlertRuleExportListResponse" - } - }, - "type": "object" - } - ] - } - } - }, - "description": "Success" - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "summary": "Export alert rules", - "tags": [ - "Monitors/Alert rules" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/day**; **200 requests/minute**; **20 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |", - "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-export", - "metadata": { - "sidebarTitle": "Export alert rules" - } - } - } - }, - "/monit/rule/import": { - "post": { - "description": "Import one or more alert rules from a JSON array. Returns the result for each rule, indicating success or failure.", - "operationId": "monit-rule-write-import", - "requestBody": { - "content": { - "application/json": { - "example": [ - { - "cron_pattern": "0 * * * * *", - "ds_list": [ - "prometheus*" - ], - "ds_type": "prometheus", - "enabled": true, - "folder_id": 100, - "name": "CPU High", - "rule_configs": { - "queries": [ - { - "expr": "avg(cpu_usage_idle) < 10", - "name": "A" - } - ] - } - } - ], - "schema": { - "$ref": "#/components/schemas/RuleImportRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "data": [ - { - "message": "", - "name": "CPU High" - } - ], - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/RuleImportResponse" - } - }, - "type": "object" - } - ] - } - } - }, - "description": "Success" - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "summary": "Import alert rules", - "tags": [ - "Monitors/Alert rules" - ], - "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **20 requests/minute**; **2 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- The request body is a JSON array of rule export objects (compatible with the output of `POST /monit/rule/export`).\n- Each object must include `folder_id`, `ds_type`, and either `ds_list` or `ds_ids`.\n- Some rules may fail (e.g. duplicate name). Check each result for individual status.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.", - "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-import", - "metadata": { - "sidebarTitle": "Import alert rules" - } - } - } - }, "/monit/rule/list/basic": { "post": { "description": "Return the basic information of all alert rules in a folder. For full rule details, call `POST /monit/rule/v2/info`.", diff --git a/api-reference/openapi.zh.json b/api-reference/openapi.zh.json index 7fd2fe09..5f22c9de 100644 --- a/api-reference/openapi.zh.json +++ b/api-reference/openapi.zh.json @@ -2982,7 +2982,7 @@ "type": "integer" }, "credential_type": { - "description": "调用使用的凭据类型。使用 App Key 调用时为 `app_key`;成员会话为空字符串。", + "description": "调用使用的凭据类型。控制台长期有效的 App Key 为 `app_key`,AI SRE 签发的短期 Key 为 `ephemeral_app_key`,成员会话为空字符串。", "type": "string" }, "ip": { @@ -17263,6 +17263,14 @@ "description": "要渲染的模板内容。", "type": "string" }, + "feishu_app_card_v2_enabled": { + "type": "boolean", + "description": "按飞书应用卡片 v2 消息渲染预览。" + }, + "feishu_app_card_v2_preserve_blank_lines": { + "type": "boolean", + "description": "飞书应用卡片 v2 预览保留正文中的空行。" + }, "incident_card_hidden_fields": { "$ref": "#/components/schemas/IncidentCardHiddenFields", "description": "预览时按 IM 应用隐藏的故障卡片字段。" @@ -26086,11 +26094,19 @@ "description": "飞书应用消息模板源。", "type": "string" }, + "feishu_app_card_v2_preserve_blank_lines": { + "type": "boolean", + "description": "飞书应用卡片 v2 消息保留正文中的空行。" + }, "feishu_app_card_v2_table_enabled": { "default": false, "description": "是否在飞书应用卡片中以表格渲染告警标签,默认关闭。", "type": "boolean" }, + "feishu_app_war_room_enabled": { + "type": "boolean", + "description": "飞书应用卡片展示「创建作战室」按钮。" + }, "incident_card_hidden_fields": { "$ref": "#/components/schemas/IncidentCardHiddenFields", "description": "按 IM 应用类型隐藏的故障卡片字段。" @@ -26140,6 +26156,10 @@ "description": "企业微信应用消息模板源。", "type": "string" }, + "wecom_markdown_v2_enabled": { + "type": "boolean", + "description": "企业微信群机器人通知使用 `markdown_v2` 消息格式,而非普通 markdown。" + }, "zoom": { "description": "Zoom 机器人消息模板源。", "type": "string" @@ -26233,10 +26253,18 @@ "description": "飞书应用消息模板源。", "type": "string" }, + "feishu_app_card_v2_preserve_blank_lines": { + "type": "boolean", + "description": "飞书应用卡片 v2 消息是否保留正文中的空行。" + }, "feishu_app_card_v2_table_enabled": { "description": "是否在飞书应用卡片中以表格渲染告警标签。", "type": "boolean" }, + "feishu_app_war_room_enabled": { + "type": "boolean", + "description": "飞书应用卡片是否展示「创建作战室」按钮;故障无响应人时不展示。" + }, "incident_card_hidden_fields": { "$ref": "#/components/schemas/IncidentCardHiddenFields", "description": "按 IM 应用类型配置的故障卡片隐藏字段,未配置时为空对象。" @@ -26307,6 +26335,10 @@ "description": "企业微信应用消息模板源。", "type": "string" }, + "wecom_markdown_v2_enabled": { + "type": "boolean", + "description": "企业微信群机器人通知是否使用 `markdown_v2` 消息格式。" + }, "zoom": { "description": "Zoom 机器人消息模板源。", "type": "string" @@ -26326,6 +26358,9 @@ "feishu", "feishu_app", "feishu_app_card_v2_table_enabled", + "wecom_markdown_v2_enabled", + "feishu_app_card_v2_preserve_blank_lines", + "feishu_app_war_room_enabled", "dingtalk_app", "wecom_app", "slack_app", @@ -26476,6 +26511,13 @@ "null" ] }, + "feishu_app_card_v2_preserve_blank_lines": { + "type": [ + "boolean", + "null" + ], + "description": "设置后决定飞书应用卡片 v2 消息是否保留正文空行;省略时保持当前设置。" + }, "feishu_app_card_v2_table_enabled": { "description": "设置后开启或关闭飞书应用卡片中的告警标签表格渲染;省略时保持当前设置。", "type": [ @@ -26483,6 +26525,13 @@ "null" ] }, + "feishu_app_war_room_enabled": { + "type": [ + "boolean", + "null" + ], + "description": "设置后决定飞书应用卡片是否展示「创建作战室」按钮;省略时保持当前设置。" + }, "incident_card_hidden_fields": { "$ref": "#/components/schemas/IncidentCardHiddenFields", "description": "按 IM 应用类型隐藏的故障卡片字段。" @@ -26563,6 +26612,13 @@ "null" ] }, + "wecom_markdown_v2_enabled": { + "type": [ + "boolean", + "null" + ], + "description": "设置后切换企业微信群机器人通知的 `markdown_v2` / 普通 markdown 格式;省略时保持当前设置。" + }, "zoom": { "description": "Zoom 机器人消息模板源。省略时保持当前内容;传空字符串表示清空。", "type": [ @@ -43844,180 +43900,6 @@ } } }, - "/monit/rule/export": { - "post": { - "description": "将选定告警规则的配置导出为可移植的 JSON 数组,与 `POST /monit/rule/import` 兼容。", - "operationId": "monit-rule-read-export", - "requestBody": { - "content": { - "application/json": { - "example": { - "ids": [ - 50001 - ] - }, - "schema": { - "$ref": "#/components/schemas/RuleIDsRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "data": [ - { - "cron_pattern": "0 * * * * *", - "ds_list": [ - "prometheus*" - ], - "ds_type": "prometheus", - "enabled": true, - "name": "CPU High" - } - ], - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/AlertRuleExportListResponse" - } - }, - "type": "object" - } - ] - } - } - }, - "description": "成功" - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "summary": "导出告警规则", - "tags": [ - "Monitors/告警规则" - ], - "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/天**;**200 次/分钟**;**20 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |", - "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-export", - "metadata": { - "sidebarTitle": "导出告警规则" - } - } - } - }, - "/monit/rule/import": { - "post": { - "description": "从 JSON 数组导入一条或多条告警规则,返回每条规则的导入结果(成功或失败)。", - "operationId": "monit-rule-write-import", - "requestBody": { - "content": { - "application/json": { - "example": [ - { - "cron_pattern": "0 * * * * *", - "ds_list": [ - "prometheus*" - ], - "ds_type": "prometheus", - "enabled": true, - "folder_id": 100, - "name": "CPU High", - "rule_configs": { - "queries": [ - { - "expr": "avg(cpu_usage_idle) < 10", - "name": "A" - } - ] - } - } - ], - "schema": { - "$ref": "#/components/schemas/RuleImportRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "example": { - "data": [ - { - "message": "", - "name": "CPU High" - } - ], - "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4" - }, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/SuccessEnvelope" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/RuleImportResponse" - } - }, - "type": "object" - } - ] - } - } - }, - "description": "成功" - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/ServerError" - } - }, - "summary": "导入告警规则", - "tags": [ - "Monitors/告警规则" - ], - "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **20 次/分钟**;**2 次/秒** |\n| 权限要求 | **告警规则管理**(`monit`) |\n\n## 使用说明\n\n- 请求体为规则导出对象的 JSON 数组(与 `POST /monit/rule/export` 输出兼容)。\n- 每个对象必须包含 `folder_id`、`ds_type` 以及 `ds_list` 或 `ds_ids` 之一。\n- 部分规则可能失败(如名称重复),请检查每条结果的状态。\n- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。", - "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-import", - "metadata": { - "sidebarTitle": "导入告警规则" - } - } - } - }, "/monit/rule/list/basic": { "post": { "description": "返回指定文件夹下所有告警规则的基础信息。如需完整规则详情,请调用 `POST /monit/rule/v2/info`。", diff --git a/api-reference/platform.openapi.en.json b/api-reference/platform.openapi.en.json index dba4d0ea..c5f18bd1 100644 --- a/api-reference/platform.openapi.en.json +++ b/api-reference/platform.openapi.en.json @@ -2532,7 +2532,7 @@ }, "credential_type": { "type": "string", - "description": "Credential type used for the call. `app_key` when authenticated with an app key; empty string for member sessions." + "description": "Credential type used for the call. `app_key` for a long-lived console app key, `ephemeral_app_key` for a short-lived key issued to AI SRE, and an empty string for member sessions." }, "credential_id": { "type": "integer", diff --git a/api-reference/platform.openapi.zh.json b/api-reference/platform.openapi.zh.json index 11f433c7..df313001 100644 --- a/api-reference/platform.openapi.zh.json +++ b/api-reference/platform.openapi.zh.json @@ -2532,7 +2532,7 @@ }, "credential_type": { "type": "string", - "description": "调用使用的凭据类型。使用 App Key 调用时为 `app_key`;成员会话为空字符串。" + "description": "调用使用的凭据类型。控制台长期有效的 App Key 为 `app_key`,AI SRE 签发的短期 Key 为 `ephemeral_app_key`,成员会话为空字符串。" }, "credential_id": { "type": "integer", diff --git a/docs.json b/docs.json index 65db50ba..58f31799 100644 --- a/docs.json +++ b/docs.json @@ -2477,8 +2477,6 @@ "POST /monit/rule/delete", "POST /monit/rule/delete/batch", "POST /monit/rule/update/fields", - "POST /monit/rule/import", - "POST /monit/rule/export", "POST /monit/rule/move", "POST /monit/rule/audits", "POST /monit/rule/audit/detail", @@ -3846,8 +3844,6 @@ "POST /monit/rule/delete", "POST /monit/rule/delete/batch", "POST /monit/rule/update/fields", - "POST /monit/rule/import", - "POST /monit/rule/export", "POST /monit/rule/move", "POST /monit/rule/audits", "POST /monit/rule/audit/detail",