Skip to content

Commit 84845f4

Browse files
authored
Merge pull request #391 from flashcatcloud/api-review/20260914T080818Z
docs(api): daily audit 2026-09-14 — retire monit rule import/export, add template notification fields
2 parents 4bf2b19 + 6f470a6 commit 84845f4

9 files changed

Lines changed: 228 additions & 704 deletions

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

Lines changed: 0 additions & 174 deletions
Original file line numberDiff line numberDiff line change
@@ -682,88 +682,6 @@
682682
}
683683
}
684684
},
685-
"/monit/rule/export": {
686-
"post": {
687-
"operationId": "monit-rule-read-export",
688-
"summary": "Export alert rules",
689-
"description": "Export the configuration of selected alert rules as a portable JSON array, compatible with `POST /monit/rule/import`.",
690-
"tags": [
691-
"Monitors/Alert rules"
692-
],
693-
"x-mint": {
694-
"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`) |",
695-
"href": "/en/api-reference/monitors/alert-rules/monit-rule-read-export",
696-
"metadata": {
697-
"sidebarTitle": "Export alert rules"
698-
}
699-
},
700-
"responses": {
701-
"200": {
702-
"description": "Success",
703-
"content": {
704-
"application/json": {
705-
"schema": {
706-
"allOf": [
707-
{
708-
"$ref": "#/components/schemas/SuccessEnvelope"
709-
},
710-
{
711-
"type": "object",
712-
"properties": {
713-
"data": {
714-
"$ref": "#/components/schemas/AlertRuleExportListResponse"
715-
}
716-
}
717-
}
718-
]
719-
},
720-
"example": {
721-
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
722-
"data": [
723-
{
724-
"name": "CPU High",
725-
"ds_type": "prometheus",
726-
"ds_list": [
727-
"prometheus*"
728-
],
729-
"enabled": true,
730-
"cron_pattern": "0 * * * * *"
731-
}
732-
]
733-
}
734-
}
735-
}
736-
},
737-
"400": {
738-
"$ref": "#/components/responses/BadRequest"
739-
},
740-
"401": {
741-
"$ref": "#/components/responses/Unauthorized"
742-
},
743-
"429": {
744-
"$ref": "#/components/responses/TooManyRequests"
745-
},
746-
"500": {
747-
"$ref": "#/components/responses/ServerError"
748-
}
749-
},
750-
"requestBody": {
751-
"required": true,
752-
"content": {
753-
"application/json": {
754-
"schema": {
755-
"$ref": "#/components/schemas/RuleIDsRequest"
756-
},
757-
"example": {
758-
"ids": [
759-
50001
760-
]
761-
}
762-
}
763-
}
764-
}
765-
}
766-
},
767685
"/monit/datasource/sls/logstores": {
768686
"post": {
769687
"operationId": "monit-datasource-read-sls-logstores",
@@ -1079,98 +997,6 @@
1079997
}
1080998
}
1081999
},
1082-
"/monit/rule/import": {
1083-
"post": {
1084-
"operationId": "monit-rule-write-import",
1085-
"summary": "Import alert rules",
1086-
"description": "Import one or more alert rules from a JSON array. Returns the result for each rule, indicating success or failure.",
1087-
"tags": [
1088-
"Monitors/Alert rules"
1089-
],
1090-
"x-mint": {
1091-
"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.",
1092-
"href": "/en/api-reference/monitors/alert-rules/monit-rule-write-import",
1093-
"metadata": {
1094-
"sidebarTitle": "Import alert rules"
1095-
}
1096-
},
1097-
"responses": {
1098-
"200": {
1099-
"description": "Success",
1100-
"content": {
1101-
"application/json": {
1102-
"schema": {
1103-
"allOf": [
1104-
{
1105-
"$ref": "#/components/schemas/SuccessEnvelope"
1106-
},
1107-
{
1108-
"type": "object",
1109-
"properties": {
1110-
"data": {
1111-
"$ref": "#/components/schemas/RuleImportResponse"
1112-
}
1113-
}
1114-
}
1115-
]
1116-
},
1117-
"example": {
1118-
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
1119-
"data": [
1120-
{
1121-
"name": "CPU High",
1122-
"message": ""
1123-
}
1124-
]
1125-
}
1126-
}
1127-
}
1128-
},
1129-
"400": {
1130-
"$ref": "#/components/responses/BadRequest"
1131-
},
1132-
"401": {
1133-
"$ref": "#/components/responses/Unauthorized"
1134-
},
1135-
"429": {
1136-
"$ref": "#/components/responses/TooManyRequests"
1137-
},
1138-
"500": {
1139-
"$ref": "#/components/responses/ServerError"
1140-
}
1141-
},
1142-
"requestBody": {
1143-
"required": true,
1144-
"content": {
1145-
"application/json": {
1146-
"schema": {
1147-
"$ref": "#/components/schemas/RuleImportRequest"
1148-
},
1149-
"example": [
1150-
{
1151-
"folder_id": 100,
1152-
"name": "CPU High",
1153-
"ds_type": "prometheus",
1154-
"ds_list": [
1155-
"prometheus*"
1156-
],
1157-
"enabled": true,
1158-
"cron_pattern": "0 * * * * *",
1159-
"rule_configs": {
1160-
"queries": [
1161-
{
1162-
"name": "A",
1163-
"expr": "avg(cpu_usage_idle) < 10"
1164-
}
1165-
]
1166-
}
1167-
}
1168-
]
1169-
}
1170-
}
1171-
}
1172-
}
1173-
},
11741000
"/monit/rule/list/basic": {
11751001
"post": {
11761002
"operationId": "monit-rule-read-list",

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

Lines changed: 0 additions & 174 deletions
Original file line numberDiff line numberDiff line change
@@ -682,88 +682,6 @@
682682
}
683683
}
684684
},
685-
"/monit/rule/export": {
686-
"post": {
687-
"operationId": "monit-rule-read-export",
688-
"summary": "导出告警规则",
689-
"description": "将选定告警规则的配置导出为可移植的 JSON 数组,与 `POST /monit/rule/import` 兼容。",
690-
"tags": [
691-
"Monitors/告警规则"
692-
],
693-
"x-mint": {
694-
"content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/天**;**200 次/分钟**;**20 次/秒** |\n| 权限要求 | **告警规则查看**(`monit`) |",
695-
"href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-export",
696-
"metadata": {
697-
"sidebarTitle": "导出告警规则"
698-
}
699-
},
700-
"responses": {
701-
"200": {
702-
"description": "成功",
703-
"content": {
704-
"application/json": {
705-
"schema": {
706-
"allOf": [
707-
{
708-
"$ref": "#/components/schemas/SuccessEnvelope"
709-
},
710-
{
711-
"type": "object",
712-
"properties": {
713-
"data": {
714-
"$ref": "#/components/schemas/AlertRuleExportListResponse"
715-
}
716-
}
717-
}
718-
]
719-
},
720-
"example": {
721-
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
722-
"data": [
723-
{
724-
"name": "CPU High",
725-
"ds_type": "prometheus",
726-
"ds_list": [
727-
"prometheus*"
728-
],
729-
"enabled": true,
730-
"cron_pattern": "0 * * * * *"
731-
}
732-
]
733-
}
734-
}
735-
}
736-
},
737-
"400": {
738-
"$ref": "#/components/responses/BadRequest"
739-
},
740-
"401": {
741-
"$ref": "#/components/responses/Unauthorized"
742-
},
743-
"429": {
744-
"$ref": "#/components/responses/TooManyRequests"
745-
},
746-
"500": {
747-
"$ref": "#/components/responses/ServerError"
748-
}
749-
},
750-
"requestBody": {
751-
"required": true,
752-
"content": {
753-
"application/json": {
754-
"schema": {
755-
"$ref": "#/components/schemas/RuleIDsRequest"
756-
},
757-
"example": {
758-
"ids": [
759-
50001
760-
]
761-
}
762-
}
763-
}
764-
}
765-
}
766-
},
767685
"/monit/datasource/sls/logstores": {
768686
"post": {
769687
"operationId": "monit-datasource-read-sls-logstores",
@@ -1079,98 +997,6 @@
1079997
}
1080998
}
1081999
},
1082-
"/monit/rule/import": {
1083-
"post": {
1084-
"operationId": "monit-rule-write-import",
1085-
"summary": "导入告警规则",
1086-
"description": "从 JSON 数组导入一条或多条告警规则,返回每条规则的导入结果(成功或失败)。",
1087-
"tags": [
1088-
"Monitors/告警规则"
1089-
],
1090-
"x-mint": {
1091-
"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- 每次调用都会记录到账户审计日志,请不要把敏感信息放在请求字段中。",
1092-
"href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-import",
1093-
"metadata": {
1094-
"sidebarTitle": "导入告警规则"
1095-
}
1096-
},
1097-
"responses": {
1098-
"200": {
1099-
"description": "成功",
1100-
"content": {
1101-
"application/json": {
1102-
"schema": {
1103-
"allOf": [
1104-
{
1105-
"$ref": "#/components/schemas/SuccessEnvelope"
1106-
},
1107-
{
1108-
"type": "object",
1109-
"properties": {
1110-
"data": {
1111-
"$ref": "#/components/schemas/RuleImportResponse"
1112-
}
1113-
}
1114-
}
1115-
]
1116-
},
1117-
"example": {
1118-
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
1119-
"data": [
1120-
{
1121-
"name": "CPU High",
1122-
"message": ""
1123-
}
1124-
]
1125-
}
1126-
}
1127-
}
1128-
},
1129-
"400": {
1130-
"$ref": "#/components/responses/BadRequest"
1131-
},
1132-
"401": {
1133-
"$ref": "#/components/responses/Unauthorized"
1134-
},
1135-
"429": {
1136-
"$ref": "#/components/responses/TooManyRequests"
1137-
},
1138-
"500": {
1139-
"$ref": "#/components/responses/ServerError"
1140-
}
1141-
},
1142-
"requestBody": {
1143-
"required": true,
1144-
"content": {
1145-
"application/json": {
1146-
"schema": {
1147-
"$ref": "#/components/schemas/RuleImportRequest"
1148-
},
1149-
"example": [
1150-
{
1151-
"folder_id": 100,
1152-
"name": "CPU High",
1153-
"ds_type": "prometheus",
1154-
"ds_list": [
1155-
"prometheus*"
1156-
],
1157-
"enabled": true,
1158-
"cron_pattern": "0 * * * * *",
1159-
"rule_configs": {
1160-
"queries": [
1161-
{
1162-
"name": "A",
1163-
"expr": "avg(cpu_usage_idle) < 10"
1164-
}
1165-
]
1166-
}
1167-
}
1168-
]
1169-
}
1170-
}
1171-
}
1172-
}
1173-
},
11741000
"/monit/rule/list/basic": {
11751001
"post": {
11761002
"operationId": "monit-rule-read-list",

0 commit comments

Comments
 (0)