{
  "openapi": "3.1.0",
  "info": {
    "title": "Flashduty 开放 API",
    "description": "Flashduty 事件管理平台的公开 HTTP API —— 覆盖故障、通知模板、协作空间、值班排班、监控、RUM、以及平台管理。每次调用都需在 query 中携带 `app_key`，该 key 在 Flashduty 控制台 账户 → APP Key 中签发。所有响应使用统一结构：成功时为 `{ request_id, data }`，失败时为 `{ request_id, error }`。",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.flashcat.cloud",
      "description": "Flashduty Open API"
    }
  ],
  "security": [
    {
      "AppKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "On-call/故障管理",
      "description": ""
    },
    {
      "name": "On-call/协作空间",
      "description": ""
    },
    {
      "name": "On-call/告警管理",
      "description": "查询、查看和处理告警，管理卡片视图与告警处理规则。"
    },
    {
      "name": "On-call/集成中心",
      "description": ""
    },
    {
      "name": "On-call/IM 集成",
      "description": "IM 集成相关查询，例如查看哪些集成开启了作战室。"
    },
    {
      "name": "On-call/值班排班",
      "description": ""
    },
    {
      "name": "On-call/日历管理",
      "description": ""
    },
    {
      "name": "On-call/通知模板",
      "description": ""
    },
    {
      "name": "On-call/标签增强",
      "description": "自定义字段、富化规则及数据映射（映射规则、映射数据、映射 API）管理。"
    },
    {
      "name": "On-call/分析看板",
      "description": ""
    },
    {
      "name": "On-call/状态页",
      "description": ""
    },
    {
      "name": "Monitors/告警规则",
      "description": "创建、管理和导出监控告警规则，查询规则统计和审计历史。"
    },
    {
      "name": "Monitors/告警数据源",
      "description": "管理监控告警规则用于查询指标的数据源。"
    },
    {
      "name": "Monitors/规则集",
      "description": "管理 Monitors 规则仓库中的共享规则集，规则集可在账户内或公开共享。"
    },
    {
      "name": "平台/成员管理",
      "description": ""
    },
    {
      "name": "平台/团队管理",
      "description": ""
    },
    {
      "name": "平台/角色与权限",
      "description": ""
    },
    {
      "name": "平台/审计日志",
      "description": "检索和读取账户操作审计日志。"
    },
    {
      "name": "Monitors/诊断分析",
      "description": "Flashduty AI SRE 使用的诊断与查询接口——数据源即席查询、日志/指标诊断,以及监控对象侧的工具调用。"
    },
    {
      "name": "AI SRE/MCP 服务器",
      "description": "MCP（Model Context Protocol）服务器管理。"
    },
    {
      "name": "平台/账户设置",
      "description": "账户（主体）信息与设置"
    },
    {
      "name": "On-call/变更管理",
      "description": ""
    },
    {
      "name": "AI SRE/A2A 智能体",
      "description": "A2A（智能体到智能体）远程智能体管理。"
    },
    {
      "name": "AI SRE/技能",
      "description": "AI SRE 智能体技能管理。"
    },
    {
      "name": "AI SRE/会话",
      "description": "AI SRE 智能体会话历史 —— 查询、查看与导出会话记录。"
    },
    {
      "name": "Monitors/通用工具",
      "description": "监控服务开通及数据预览工具。"
    },
    {
      "name": "AI SRE/自动化"
    },
    {
      "name": "RUM/应用管理",
      "description": "管理前端性能监控（RUM）应用。"
    },
    {
      "name": "RUM/RUM 数据查询",
      "description": "对 RUM 事件数据执行分析查询。"
    },
    {
      "name": "RUM/RUM 问题跟踪",
      "description": "查询和管理 RUM 异常追踪 Issue 及预设严重性规则。"
    },
    {
      "name": "RUM/RUM 自定义字段",
      "description": "查询 RUM 自定义字段及其值分布，用于构建分析过滤条件。"
    },
    {
      "name": "RUM/RUM Sourcemap",
      "description": "管理和查询用于 Browser、Android、iOS 错误符号化的 RUM Sourcemap 文件。"
    }
  ],
  "paths": {
    "/incident/list": {
      "post": {
        "operationId": "incidentList",
        "summary": "查询故障列表",
        "description": "分页查询故障列表，支持按协作空间、严重程度、状态、处理人员和时间范围过滤。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-list",
          "metadata": {
            "sidebarTitle": "查询故障列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/IncidentListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 88,
                    "has_next_page": true,
                    "search_after_ctx": "69da451ef77b1b51f40e83eb",
                    "items": [
                      {
                        "incident_id": "69da451ef77b1b51f40e83ee",
                        "account_id": 2451002751131,
                        "channel_id": 2551105804131,
                        "integration_id": 2490562293131,
                        "integration_ids": [
                          2490562293131
                        ],
                        "integration_types": [
                          "monit.alert"
                        ],
                        "dedup_key": "100128:prom-10.99.1.107:A:1579244238440766834:anydata",
                        "equals_md5": "",
                        "start_time": 1775912219,
                        "end_time": 0,
                        "last_time": 1775969819,
                        "ack_time": 0,
                        "close_time": 0,
                        "creator_id": 0,
                        "closer_id": 0,
                        "owner_id": 0,
                        "incident_status": "Critical",
                        "incident_severity": "Critical",
                        "progress": "Triggered",
                        "title": "CPU usage high - web-server-01",
                        "description": "",
                        "ai_summary": "",
                        "impact": "",
                        "root_cause": "",
                        "resolution": "",
                        "num": "0E83EE",
                        "frequency": "frequent",
                        "created_at": 1775912222,
                        "updated_at": 1775972145,
                        "snoozed_before": 0,
                        "group_method": "n",
                        "ever_muted": false,
                        "labels": {
                          "check": "cpu_usage_high",
                          "resource": "web-server-01",
                          "env": "production"
                        },
                        "fields": {},
                        "assigned_to": {
                          "person_ids": [
                            2476444212131
                          ],
                          "escalate_rule_id": "000000000000000000000000",
                          "layer_idx": 0,
                          "type": "assign",
                          "assigned_at": 1775972128,
                          "id": "MvQfH9Dc8eNS8k79jmrWn6",
                          "escalate_rule_name": ""
                        },
                        "alert_cnt": 1,
                        "active_alert_cnt": 1,
                        "alert_event_cnt": 17,
                        "responders": [
                          {
                            "person_id": 2476444212131,
                            "assigned_at": 1775972128,
                            "acknowledged_at": 0
                          }
                        ],
                        "account_name": "",
                        "account_locale": "",
                        "account_time_zone": "",
                        "channel_name": "Ops Channel",
                        "channel_status": "enabled",
                        "detail_url": "https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee",
                        "silence_url": "https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee",
                        "integration_type": "monit.alert",
                        "post_mortem_id": "",
                        "images": null,
                        "manual_overrides": [
                          "title"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/ListIncidentsRequest"
              },
              "example": {
                "start_time": 1711900800,
                "end_time": 1712000000,
                "progress": "Triggered,Processing",
                "incident_severity": "Critical,Warning",
                "channel_ids": [
                  2551105804131
                ],
                "limit": 20,
                "p": 1
              }
            }
          }
        }
      }
    },
    "/incident/info": {
      "post": {
        "operationId": "incidentInfo",
        "summary": "获取故障详情",
        "description": "获取单个故障的详细信息，包括时间线、关联告警、处理人员和自定义字段。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-info",
          "metadata": {
            "sidebarTitle": "获取故障详情"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/IncidentInfo"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "incident_id": "69da451ef77b1b51f40e83ee",
                    "account_id": 2451002751131,
                    "channel_id": 2551105804131,
                    "integration_id": 2490562293131,
                    "integration_ids": [
                      2490562293131
                    ],
                    "integration_types": [
                      "monit.alert"
                    ],
                    "dedup_key": "100128:prom-10.99.1.107:A:1579244238440766834:anydata",
                    "equals_md5": "",
                    "start_time": 1775912219,
                    "end_time": 0,
                    "last_time": 1775969819,
                    "ack_time": 0,
                    "close_time": 0,
                    "creator_id": 0,
                    "closer_id": 0,
                    "owner_id": 0,
                    "incident_status": "Critical",
                    "incident_severity": "Critical",
                    "progress": "Triggered",
                    "title": "CPU usage high - web-server-01",
                    "description": "",
                    "ai_summary": "",
                    "impact": "",
                    "root_cause": "",
                    "resolution": "",
                    "num": "0E83EE",
                    "frequency": "frequent",
                    "created_at": 1775912222,
                    "updated_at": 1775972145,
                    "snoozed_before": 0,
                    "group_method": "n",
                    "ever_muted": false,
                    "labels": {
                      "check": "cpu_usage_high",
                      "resource": "web-server-01",
                      "env": "production"
                    },
                    "fields": {},
                    "assigned_to": {
                      "person_ids": [
                        2476444212131
                      ],
                      "escalate_rule_id": "000000000000000000000000",
                      "layer_idx": 0,
                      "type": "assign",
                      "assigned_at": 1775972128,
                      "id": "MvQfH9Dc8eNS8k79jmrWn6",
                      "escalate_rule_name": ""
                    },
                    "alert_cnt": 1,
                    "active_alert_cnt": 1,
                    "alert_event_cnt": 17,
                    "responders": [
                      {
                        "person_id": 2476444212131,
                        "assigned_at": 1775972128,
                        "acknowledged_at": 0
                      }
                    ],
                    "account_name": "",
                    "account_locale": "",
                    "account_time_zone": "",
                    "channel_name": "Ops Channel",
                    "channel_status": "enabled",
                    "detail_url": "https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee",
                    "silence_url": "https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee",
                    "integration_type": "monit.alert",
                    "post_mortem_id": "",
                    "images": null,
                    "manual_overrides": [
                      "title"
                    ]
                  }
                }
              }
            }
          },
          "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/IncidentInfoRequest"
              },
              "example": {
                "incident_id": "69da451ef77b1b51f40e83ee"
              }
            }
          }
        }
      }
    },
    "/incident/list-by-ids": {
      "post": {
        "operationId": "incidentListByIds",
        "summary": "批量查询故障",
        "description": "通过故障 ID 列表批量获取故障信息。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-list-by-ids",
          "metadata": {
            "sidebarTitle": "批量查询故障"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/IncidentListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 2,
                    "has_next_page": false,
                    "items": [
                      {
                        "incident_id": "69da451ef77b1b51f40e83ee",
                        "account_id": 2451002751131,
                        "channel_id": 2551105804131,
                        "integration_id": 2490562293131,
                        "integration_ids": [
                          2490562293131
                        ],
                        "integration_types": [
                          "monit.alert"
                        ],
                        "dedup_key": "100128:prom-10.99.1.107:A:1579244238440766834:anydata",
                        "equals_md5": "",
                        "start_time": 1775912219,
                        "end_time": 0,
                        "last_time": 1775969819,
                        "ack_time": 0,
                        "close_time": 0,
                        "creator_id": 0,
                        "closer_id": 0,
                        "owner_id": 0,
                        "incident_status": "Critical",
                        "incident_severity": "Critical",
                        "progress": "Triggered",
                        "title": "CPU usage high - web-server-01",
                        "description": "",
                        "ai_summary": "",
                        "impact": "",
                        "root_cause": "",
                        "resolution": "",
                        "num": "0E83EE",
                        "frequency": "frequent",
                        "created_at": 1775912222,
                        "updated_at": 1775972145,
                        "snoozed_before": 0,
                        "group_method": "n",
                        "ever_muted": false,
                        "labels": {},
                        "fields": {},
                        "assigned_to": {
                          "escalate_rule_id": "000000000000000000000000",
                          "layer_idx": 0,
                          "type": "",
                          "assigned_at": 0,
                          "id": "",
                          "escalate_rule_name": ""
                        },
                        "alert_cnt": 1,
                        "active_alert_cnt": 1,
                        "alert_event_cnt": 17,
                        "responders": [],
                        "account_name": "",
                        "account_locale": "",
                        "account_time_zone": "",
                        "channel_name": "Ops Channel",
                        "channel_status": "enabled",
                        "detail_url": "https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee",
                        "silence_url": "https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee",
                        "integration_type": "monit.alert",
                        "post_mortem_id": "",
                        "images": null,
                        "manual_overrides": null
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/ListIncidentsByIdsRequest"
              },
              "example": {
                "incident_ids": [
                  "69da451ef77b1b51f40e83ee",
                  "69da451ef77b1b51f40e83ef"
                ]
              }
            }
          }
        }
      }
    },
    "/incident/alert/list": {
      "post": {
        "operationId": "incidentAlertList",
        "summary": "查询故障关联告警",
        "description": "查询合并到指定故障中的所有告警列表。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障查看**（`on-call`） |\n\n## 使用说明\n\n- 仅在需要预览每条告警的原始事件时设置 `include_events=true`。\n- 事件预览最多返回每条告警最新的 20 条事件；完整事件历史请使用 `POST /alert/event/list` 分页查询。\n- `event_cnt` 仍表示合并到每条告警的原始事件总数。",
          "href": "/zh/api-reference/on-call/incidents/incident-alert-list",
          "metadata": {
            "sidebarTitle": "查询故障关联告警"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListIncidentAlertsResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 1,
                    "items": [
                      {
                        "alert_id": "69da451df77b1b51f40e83de",
                        "integration_id": 2490562293131,
                        "data_source_id": 2490562293131,
                        "channel_id": 2551105804131,
                        "account_id": 2451002751131,
                        "description": "",
                        "title": "CPU usage high - web-server-01",
                        "title_rule": "",
                        "alert_key": "100128:prom-10.99.1.107:A:1579244238440766834:anydata",
                        "alert_severity": "Critical",
                        "alert_status": "Critical",
                        "start_time": 1775912219,
                        "last_time": 1775969819,
                        "end_time": 0,
                        "labels": {
                          "check": "cpu_usage_high",
                          "resource": "web-server-01"
                        },
                        "ever_muted": false,
                        "created_at": 1775912221,
                        "updated_at": 1775969821,
                        "integration_name": "FlashMonit",
                        "integration_type": "monit.alert",
                        "integration_ref_id": "a_2451002751131",
                        "channel_name": "Ops Channel",
                        "channel_status": "enabled",
                        "responder_name": "",
                        "responder_email": "",
                        "incident": {
                          "incident_id": "69da451ef77b1b51f40e83ee",
                          "title": "CPU usage high - web-server-01",
                          "progress": "Triggered"
                        },
                        "event_cnt": 17,
                        "images": null,
                        "data_source_name": "FlashMonit",
                        "data_source_type": "monit.alert",
                        "data_source_ref_id": "a_2451002751131",
                        "events": [
                          {
                            "event_id": "69da451df77b1b51f40e83df",
                            "alert_id": "69da451df77b1b51f40e83de",
                            "title": "CPU 使用率 > 90%",
                            "event_severity": "Critical",
                            "event_status": "Critical",
                            "event_time": 1712650000,
                            "labels": {
                              "host": "web-01"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/ListIncidentAlertsRequest"
              },
              "example": {
                "incident_id": "69da451ef77b1b51f40e83ee",
                "is_active": true,
                "limit": 100,
                "p": 1,
                "include_events": true
              }
            }
          }
        }
      }
    },
    "/incident/feed": {
      "post": {
        "operationId": "incidentFeed",
        "summary": "获取故障时间线",
        "description": "获取指定故障的时间线动态，包括状态变更、评论和系统事件。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-feed",
          "metadata": {
            "sidebarTitle": "获取故障时间线"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListIncidentFeedResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "has_next_page": true,
                    "items": [
                      {
                        "ref_id": "69da451ef77b1b51f40e83ee",
                        "type": "i_new",
                        "detail": {
                          "severity": "Critical",
                          "title": "CPU usage high - web-server-01"
                        },
                        "account_id": 2451002751131,
                        "creator_id": 0,
                        "created_at": 1775912222661,
                        "updated_at": 1775912222661
                      },
                      {
                        "ref_id": "69da451ef77b1b51f40e83ee",
                        "type": "i_notify",
                        "detail": {
                          "rid": "5e9ccfabcd154b41a0005fd0f52b674b",
                          "msg_id": "naFudJYCawBWsChdV6ErPH",
                          "fire_type": "fire",
                          "escalate_rule_id": "000000000000000000000000",
                          "layer_idx": 0,
                          "by": "email",
                          "persons": [
                            {
                              "person_id": 2476444212131
                            }
                          ]
                        },
                        "account_id": 2451002751131,
                        "creator_id": 0,
                        "created_at": 1775972130174,
                        "updated_at": 1775972130174
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/ListIncidentFeedRequest"
              },
              "example": {
                "incident_id": "69da451ef77b1b51f40e83ee",
                "p": 1,
                "limit": 20
              }
            }
          }
        }
      }
    },
    "/incident/past/list": {
      "post": {
        "operationId": "incidentPastList",
        "summary": "查询历史相似故障",
        "description": "查询与当前故障相关的历史故障列表，用于参考排查。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **100 次/分钟**；**20 次/秒** |\n| 权限要求 | **故障查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-past-list",
          "metadata": {
            "sidebarTitle": "查询历史相似故障"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListPastIncidentsResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": []
                  }
                }
              }
            }
          },
          "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/ListPastIncidentsRequest"
              },
              "example": {
                "incident_id": "69da451ef77b1b51f40e83ee",
                "limit": 5
              }
            }
          }
        }
      }
    },
    "/incident/create": {
      "post": {
        "operationId": "incidentCreate",
        "summary": "创建故障",
        "description": "手动创建一个新故障并分派处理人员。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-create",
          "metadata": {
            "sidebarTitle": "创建故障"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CreateIncidentResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "incident_id": "69db2ef1a0fe7db6448b14f1",
                    "title": "API test incident for docs"
                  }
                }
              }
            }
          },
          "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/CreateIncidentRequest"
              },
              "example": {
                "incident_severity": "Critical",
                "title": "Database connection timeout on prod-db-01",
                "channel_id": 2551105804131,
                "assigned_to": {
                  "person_ids": [
                    2476444212131
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/incident/ack": {
      "post": {
        "operationId": "incidentAck",
        "summary": "认领故障",
        "description": "认领一个故障以表明正在积极处理。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-ack",
          "metadata": {
            "sidebarTitle": "认领故障"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/AckIncidentRequest"
              },
              "example": {
                "incident_ids": [
                  "69da451ef77b1b51f40e83ee"
                ]
              }
            }
          }
        }
      }
    },
    "/incident/unack": {
      "post": {
        "operationId": "incidentUnack",
        "summary": "取消认领故障",
        "description": "取消故障的认领状态。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-unack",
          "metadata": {
            "sidebarTitle": "取消认领故障"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/UnackIncidentRequest"
              },
              "example": {
                "incident_ids": [
                  "69da451ef77b1b51f40e83ee"
                ]
              }
            }
          }
        }
      }
    },
    "/incident/resolve": {
      "post": {
        "operationId": "incidentResolve",
        "summary": "恢复故障",
        "description": "将故障标记为已恢复。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-resolve",
          "metadata": {
            "sidebarTitle": "恢复故障"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ResolveIncidentRequest"
              },
              "example": {
                "incident_ids": [
                  "69da451ef77b1b51f40e83ee"
                ],
                "root_cause": "Memory leak in the connection pool caused by a missing cleanup call.",
                "resolution": "Deployed hotfix v2.3.1 and restarted the affected service."
              }
            }
          }
        }
      }
    },
    "/incident/reopen": {
      "post": {
        "operationId": "incidentReopen",
        "summary": "重开故障",
        "description": "重新打开一个已恢复的故障。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-reopen",
          "metadata": {
            "sidebarTitle": "重开故障"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ReopenIncidentRequest"
              },
              "example": {
                "incident_ids": [
                  "69da451ef77b1b51f40e83ee"
                ],
                "reason": "Monitoring detected the issue recurred after the initial fix."
              }
            }
          }
        }
      }
    },
    "/incident/snooze": {
      "post": {
        "operationId": "incidentSnooze",
        "summary": "暂停故障通知",
        "description": "暂时屏蔽故障通知直到指定时间。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-snooze",
          "metadata": {
            "sidebarTitle": "暂停故障通知"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/SnoozeIncidentRequest"
              },
              "example": {
                "incident_ids": [
                  "69da451ef77b1b51f40e83ee"
                ],
                "minutes": 60
              }
            }
          }
        }
      }
    },
    "/incident/wake": {
      "post": {
        "operationId": "incidentWake",
        "summary": "恢复故障通知",
        "description": "取消故障的暂停状态，恢复通知。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-wake",
          "metadata": {
            "sidebarTitle": "恢复故障通知"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/WakeIncidentRequest"
              },
              "example": {
                "incident_ids": [
                  "69da451ef77b1b51f40e83ee"
                ]
              }
            }
          }
        }
      }
    },
    "/incident/merge": {
      "post": {
        "operationId": "incidentMerge",
        "summary": "合并故障",
        "description": "将一个或多个故障合并到目标故障中。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-merge",
          "metadata": {
            "sidebarTitle": "合并故障"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/MergeIncidentsRequest"
              },
              "example": {
                "source_incident_ids": [
                  "69da451ef77b1b51f40e83ef",
                  "69da451ef77b1b51f40e83f0"
                ],
                "target_incident_id": "69da451ef77b1b51f40e83ee",
                "comment": "Merging related database connectivity incidents into one."
              }
            }
          }
        }
      }
    },
    "/incident/disable-merge": {
      "post": {
        "operationId": "incidentDisableMerge",
        "summary": "禁止故障合并",
        "description": "禁用指定故障的自动合并功能。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-disable-merge",
          "metadata": {
            "sidebarTitle": "禁止故障合并"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/DisableIncidentMergeRequest"
              },
              "example": {
                "incident_ids": [
                  "69da451ef77b1b51f40e83ee"
                ]
              }
            }
          }
        }
      }
    },
    "/incident/reset": {
      "post": {
        "operationId": "incidentReset",
        "summary": "更新故障信息",
        "description": "一次调用更新故障的多个可编辑字段，包括标题、描述、影响范围、根因、恢复方案和严重程度。至少需要提供一个字段。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-reset",
          "metadata": {
            "sidebarTitle": "更新故障信息"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/UpdateIncidentFieldsRequest"
              },
              "example": {
                "incident_id": "69da451ef77b1b51f40e83ee",
                "title": "Database connection timeout - prod-db-01 primary",
                "incident_severity": "Critical"
              }
            }
          }
        }
      }
    },
    "/incident/remove": {
      "post": {
        "operationId": "incidentRemove",
        "summary": "删除故障",
        "description": "永久删除一个故障及其关联数据。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-remove",
          "metadata": {
            "sidebarTitle": "删除故障"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/RemoveIncidentRequest"
              },
              "example": {
                "incident_ids": [
                  "69da451ef77b1b51f40e83ee"
                ]
              }
            }
          }
        }
      }
    },
    "/incident/comment": {
      "post": {
        "operationId": "incidentComment",
        "summary": "评论故障",
        "description": "在故障时间线上添加文字评论。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-comment",
          "metadata": {
            "sidebarTitle": "评论故障"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/CommentIncidentRequest"
              },
              "example": {
                "incident_ids": [
                  "69da451ef77b1b51f40e83ee"
                ],
                "comment": "Identified the root cause. Rolling back the deployment now."
              }
            }
          }
        }
      }
    },
    "/incident/assign": {
      "post": {
        "operationId": "incidentAssign",
        "summary": "分派故障",
        "description": "将故障分派到指定的升级环节或处理人员。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-assign",
          "metadata": {
            "sidebarTitle": "分派故障"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/AssignIncidentRequest"
              },
              "example": {
                "incident_id": "69da451ef77b1b51f40e83ee",
                "assigned_to": {
                  "person_ids": [
                    2476444212131
                  ],
                  "type": "assign"
                }
              }
            }
          }
        }
      }
    },
    "/incident/responder/add": {
      "post": {
        "operationId": "incidentResponderAdd",
        "summary": "添加故障处理人员",
        "description": "向已有故障添加处理人员。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-responder-add",
          "metadata": {
            "sidebarTitle": "添加故障处理人员"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/AddIncidentResponderRequest"
              },
              "example": {
                "incident_id": "69da451ef77b1b51f40e83ee",
                "person_ids": [
                  2476444212131,
                  2476444212132
                ]
              }
            }
          }
        }
      }
    },
    "/incident/field/reset": {
      "post": {
        "operationId": "incidentFieldReset",
        "summary": "更新故障自定义字段",
        "description": "更新故障的自定义字段值。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-field-reset",
          "metadata": {
            "sidebarTitle": "更新故障自定义字段"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ResetIncidentFieldRequest"
              },
              "example": {
                "incident_id": "69da451ef77b1b51f40e83ee",
                "field_name": "affected_service",
                "field_value": "payment-service"
              }
            }
          }
        }
      }
    },
    "/incident/custom-action/do": {
      "post": {
        "operationId": "incidentCustomActionDo",
        "summary": "执行自定义操作",
        "description": "执行为故障配置的自定义操作。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-custom-action-do",
          "metadata": {
            "sidebarTitle": "执行自定义操作"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/DoIncidentCustomActionResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "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/DoIncidentCustomActionRequest"
              },
              "example": {
                "incident_id": "69da451ef77b1b51f40e83ee",
                "integration_id": 2490562293131
              }
            }
          }
        }
      }
    },
    "/incident/war-room/detail": {
      "post": {
        "operationId": "incidentWarRoomDetail",
        "summary": "获取战情室详情",
        "description": "获取故障的战情室配置和成员信息。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-war-room-detail",
          "metadata": {
            "sidebarTitle": "获取战情室详情"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/WarRoom"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "chat_id": "oc_a0553eda9014c2de1b3a8f75b4e0c000",
                    "chat_name": "Incident #0E83EE war room",
                    "share_link": ""
                  }
                }
              }
            }
          },
          "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/GetWarRoomDetailRequest"
              },
              "example": {
                "integration_id": 2490562293131,
                "chat_id": "oc_a0553eda9014c2de1b3a8f75b4e0c000"
              }
            }
          }
        }
      }
    },
    "/incident/war-room/list": {
      "post": {
        "operationId": "incidentWarRoomList",
        "summary": "查询战情室列表",
        "description": "查询故障关联的所有战情室。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-war-room-list",
          "metadata": {
            "sidebarTitle": "查询战情室列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListWarRoomsResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": []
                  }
                }
              }
            }
          },
          "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/ListWarRoomsRequest"
              },
              "example": {
                "incident_id": "69da451ef77b1b51f40e83ee"
              }
            }
          }
        }
      }
    },
    "/incident/war-room/create": {
      "post": {
        "operationId": "incidentWarRoomCreate",
        "summary": "创建战情室",
        "description": "为故障协同响应创建战情室频道。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-war-room-create",
          "metadata": {
            "sidebarTitle": "创建战情室"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/WarRoom"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "chat_id": "oc_a0553eda9014c2de1b3a8f75b4e0c000",
                    "chat_name": "Incident #0E83EE war room",
                    "share_link": ""
                  }
                }
              }
            }
          },
          "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/CreateWarRoomRequest"
              },
              "example": {
                "incident_id": "69da451ef77b1b51f40e83ee",
                "integration_id": 2490562293131,
                "add_observers": true
              }
            }
          }
        }
      }
    },
    "/incident/war-room/delete": {
      "post": {
        "operationId": "incidentWarRoomDelete",
        "summary": "删除战情室",
        "description": "删除指定的故障战情室。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-war-room-delete",
          "metadata": {
            "sidebarTitle": "删除战情室"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/DeleteWarRoomRequest"
              },
              "example": {
                "incident_id": "69da451ef77b1b51f40e83ee",
                "integration_id": 2490562293131
              }
            }
          }
        }
      }
    },
    "/incident/post-mortem/info": {
      "get": {
        "operationId": "incidentPostMortemInfo",
        "summary": "获取复盘报告",
        "description": "通过 `post_mortem_id` 获取复盘报告。先用 `/incident/post-mortem/list` 列出报告（每行标明所属故障），再用其 id 在此获取完整报告。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-post-mortem-info",
          "metadata": {
            "sidebarTitle": "获取复盘报告"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PostMortemItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "meta": {
                      "account_id": 2451002751131,
                      "title": "Postmortem1",
                      "status": "published",
                      "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e",
                      "template_id": "post_mortem_default_tmpl_en-us",
                      "incident_ids": [
                        "69bb9233331067560c718ecd"
                      ],
                      "media_count": 0,
                      "author_ids": [
                        2477273692131
                      ],
                      "team_id": 2477033058131,
                      "channel_id": 3047621227131,
                      "is_private": false,
                      "channel_name": "Ops Channel",
                      "created_at_seconds": 1773900354,
                      "updated_at_seconds": 1773909012
                    },
                    "basics": {
                      "incidents_highest_severity": "Warning",
                      "incidents_earliest_start_seconds": 1761133512,
                      "incidents_latest_close_seconds": 1761133632,
                      "incidents_total_duration_seconds": 120,
                      "responders": [
                        {
                          "person_id": 3790925372131,
                          "assigned_at": 1761133515,
                          "acknowledged_at": 0
                        }
                      ]
                    },
                    "content": {
                      "content": "{\"type\":\"doc\",\"content\":[]}"
                    },
                    "follow_ups": ""
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "parameters": [
          {
            "name": "post_mortem_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Post-mortem ID. Deterministic hash derived from account ID and the set of linked incident IDs."
          }
        ]
      }
    },
    "/incident/post-mortem/list": {
      "post": {
        "operationId": "incidentPostMortemList",
        "summary": "查询复盘报告列表",
        "description": "分页查询复盘报告列表，支持过滤条件。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-post-mortem-list",
          "metadata": {
            "sidebarTitle": "查询复盘报告列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListPostMortemsResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 3,
                    "has_next_page": false,
                    "items": [
                      {
                        "account_id": 2451002751131,
                        "title": "Postmortem1",
                        "status": "published",
                        "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e",
                        "template_id": "post_mortem_default_tmpl_en-us",
                        "incident_ids": [
                          "69bb9233331067560c718ecd"
                        ],
                        "media_count": 0,
                        "author_ids": [
                          2477273692131
                        ],
                        "team_id": 2477033058131,
                        "channel_id": 3047621227131,
                        "is_private": false,
                        "channel_name": "Ops Channel",
                        "created_at_seconds": 1773900354,
                        "updated_at_seconds": 1773909012
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/ListPostMortemsRequest"
              },
              "example": {
                "status": "published",
                "p": 1,
                "limit": 20
              }
            }
          }
        }
      }
    },
    "/incident/post-mortem/delete": {
      "post": {
        "operationId": "incidentPostMortemDelete",
        "summary": "删除复盘报告",
        "description": "删除指定的复盘报告。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/incident-post-mortem-delete",
          "metadata": {
            "sidebarTitle": "删除复盘报告"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/DeletePostMortemRequest"
              },
              "example": {
                "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e"
              }
            }
          }
        }
      }
    },
    "/channel/info": {
      "post": {
        "operationId": "channelInfo",
        "summary": "获取协作空间详情",
        "description": "获取指定协作空间的详细信息。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/on-call/channels/channel-info",
          "metadata": {
            "sidebarTitle": "获取协作空间详情"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ChannelItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "channel_id": 1001,
                    "channel_name": "Production Alerts",
                    "status": "enabled",
                    "team_id": 10
                  }
                }
              }
            }
          },
          "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/ChannelInfoRequest"
              },
              "example": {
                "channel_id": 1001
              }
            }
          }
        }
      }
    },
    "/channel/list": {
      "post": {
        "operationId": "channelList",
        "summary": "查询协作空间列表",
        "description": "查询当前用户可访问的协作空间列表，支持过滤条件。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/on-call/channels/channel-list",
          "metadata": {
            "sidebarTitle": "查询协作空间列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListChannelsResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 42,
                    "has_next_page": true,
                    "items": [
                      {
                        "channel_id": 1001,
                        "channel_name": "Production Alerts",
                        "status": "enabled"
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/ListChannelsRequest"
              },
              "example": {
                "p": 1,
                "limit": 20,
                "orderby": "created_at",
                "asc": false
              }
            }
          }
        }
      }
    },
    "/channel/infos": {
      "post": {
        "operationId": "channelInfos",
        "summary": "批量获取协作空间",
        "description": "通过 ID 列表批量获取协作空间信息。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/on-call/channels/channel-infos",
          "metadata": {
            "sidebarTitle": "批量获取协作空间"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ChannelInfosResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "channel_id": 1001,
                        "channel_name": "Production Alerts",
                        "status": "enabled"
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/ChannelInfosRequest"
              },
              "example": {
                "channel_ids": [
                  1001,
                  1002
                ]
              }
            }
          }
        }
      }
    },
    "/channel/create": {
      "post": {
        "operationId": "channelCreate",
        "summary": "创建协作空间",
        "description": "创建一个新的协作空间用于故障管理。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/channel-create",
          "metadata": {
            "sidebarTitle": "创建协作空间"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ChannelCreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "channel_id": 6294542005131,
                    "channel_name": "API Test Channel"
                  }
                }
              }
            }
          },
          "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/CreateChannelRequest"
              },
              "example": {
                "team_id": 3521074710131,
                "channel_name": "Production Alerts",
                "description": "Handles all production environment alerts",
                "group": {
                  "method": "p",
                  "time_window": 10,
                  "window_type": "tumbling"
                },
                "auto_resolve_timeout": 86400,
                "auto_resolve_mode": "trigger"
              }
            }
          }
        }
      }
    },
    "/channel/update": {
      "post": {
        "operationId": "channelUpdate",
        "summary": "更新协作空间",
        "description": "更新已有协作空间的配置和设置。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/channel-update",
          "metadata": {
            "sidebarTitle": "更新协作空间"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/UpdateChannelResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "external_report_token": ""
                  }
                }
              }
            }
          },
          "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/UpdateChannelRequest"
              },
              "example": {
                "channel_id": 1001,
                "channel_name": "生产告警（v2）",
                "description": "更新后的描述"
              }
            }
          }
        }
      }
    },
    "/channel/delete": {
      "post": {
        "operationId": "channelDelete",
        "summary": "删除协作空间",
        "description": "删除协作空间及其所有关联配置。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/channel-delete",
          "metadata": {
            "sidebarTitle": "删除协作空间"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ChannelIDRequest"
              },
              "example": {
                "channel_id": 3521074710131
              }
            }
          }
        }
      }
    },
    "/channel/enable": {
      "post": {
        "operationId": "channelEnable",
        "summary": "启用协作空间",
        "description": "启用已禁用的协作空间以恢复故障路由。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/channel-enable",
          "metadata": {
            "sidebarTitle": "启用协作空间"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ChannelIDRequest"
              },
              "example": {
                "channel_id": 3521074710131
              }
            }
          }
        }
      }
    },
    "/channel/disable": {
      "post": {
        "operationId": "channelDisable",
        "summary": "禁用协作空间",
        "description": "禁用协作空间以停止故障路由，而不删除该空间。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/channel-disable",
          "metadata": {
            "sidebarTitle": "禁用协作空间"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ChannelIDRequest"
              },
              "example": {
                "channel_id": 3521074710131
              }
            }
          }
        }
      }
    },
    "/channel/silence/rule/list": {
      "post": {
        "operationId": "channelSilenceRuleList",
        "summary": "查询静默策略列表",
        "description": "查询为指定协作空间配置的所有静默策略。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/channel-silence-rule-list",
          "metadata": {
            "sidebarTitle": "查询静默策略列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListSilenceRulesResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "account_id": 2451002751131,
                        "channel_id": 5967964835131,
                        "priority": 0,
                        "rule_name": "Silence Info alerts",
                        "description": "",
                        "from_incident_id": "000000000000000000000000",
                        "time_filters": [],
                        "time_filter": {
                          "start_time": 1773388800,
                          "end_time": 1773414000
                        },
                        "filters": [
                          [
                            {
                              "key": "severity",
                              "oper": "IN",
                              "vals": [
                                "Info"
                              ]
                            }
                          ]
                        ],
                        "is_directly_discard": true,
                        "status": "enabled",
                        "rule_id": "69b3c426b4a6f5abf1f54873",
                        "updated_by": 3790925372131,
                        "created_at": 1773388838,
                        "updated_at": 1773388838,
                        "is_effective": false
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/ChannelScopedListRequest"
              },
              "example": {
                "channel_id": 1001
              }
            }
          }
        }
      }
    },
    "/channel/silence/rule/create": {
      "post": {
        "operationId": "channelSilenceRuleCreate",
        "summary": "创建静默策略",
        "description": "创建一条静默策略，用于抑制满足特定条件的通知。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/channel-silence-rule-create",
          "metadata": {
            "sidebarTitle": "创建静默策略"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleCreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "rule_id": "69db2f66a0fe7db6448b1503",
                    "rule_name": "Test silence rule"
                  }
                }
              }
            }
          },
          "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/CreateSilenceRuleRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_name": "Maintenance window silence",
                "description": "Silence all Info alerts during planned maintenance",
                "time_filter": {
                  "start_time": 1773388800,
                  "end_time": 1773414000
                },
                "filters": [
                  [
                    {
                      "key": "severity",
                      "oper": "IN",
                      "vals": [
                        "Info"
                      ]
                    }
                  ]
                ],
                "is_directly_discard": false
              }
            }
          }
        }
      }
    },
    "/channel/silence/rule/update": {
      "post": {
        "operationId": "channelSilenceRuleUpdate",
        "summary": "更新静默策略",
        "description": "更新已有静默策略的配置。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/channel-silence-rule-update",
          "metadata": {
            "sidebarTitle": "更新静默策略"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/UpdateSilenceRuleRequest"
              },
              "example": {
                "channel_id": 1001,
                "rule_id": "6621b23f4a2c5e0012ab34cd",
                "rule_name": "Mute during maintenance",
                "time_filter": {
                  "start_time": 1710000000,
                  "end_time": 1710086400
                },
                "filters": [
                  [
                    {
                      "key": "labels.service",
                      "oper": "IN",
                      "vals": [
                        "billing"
                      ]
                    }
                  ]
                ]
              }
            }
          }
        }
      }
    },
    "/channel/silence/rule/delete": {
      "post": {
        "operationId": "channelSilenceRuleDelete",
        "summary": "删除静默策略",
        "description": "删除指定的静默策略。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/channel-silence-rule-delete",
          "metadata": {
            "sidebarTitle": "删除静默策略"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_id": "6621b23f4a2c5e0012ab34cd"
              }
            }
          }
        }
      }
    },
    "/channel/silence/rule/enable": {
      "post": {
        "operationId": "channelSilenceRuleEnable",
        "summary": "启用静默策略",
        "description": "启用已禁用的静默策略。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/channel-silence-rule-enable",
          "metadata": {
            "sidebarTitle": "启用静默策略"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_id": "6621b23f4a2c5e0012ab34cd"
              }
            }
          }
        }
      }
    },
    "/channel/silence/rule/disable": {
      "post": {
        "operationId": "channelSilenceRuleDisable",
        "summary": "禁用静默策略",
        "description": "禁用静默策略而不删除。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/channel-silence-rule-disable",
          "metadata": {
            "sidebarTitle": "禁用静默策略"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_id": "6621b23f4a2c5e0012ab34cd"
              }
            }
          }
        }
      }
    },
    "/channel/inhibit/rule/list": {
      "post": {
        "operationId": "channelInhibitRuleList",
        "summary": "查询抑制策略列表",
        "description": "查询为指定协作空间配置的所有抑制策略。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/channel-inhibit-rule-list",
          "metadata": {
            "sidebarTitle": "查询抑制策略列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListInhibitRulesResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "account_id": 2451002751131,
                        "channel_id": 5967964835131,
                        "priority": 0,
                        "rule_name": "Suppress downstream alerts",
                        "description": "",
                        "source_filters": [
                          [
                            {
                              "key": "severity",
                              "oper": "IN",
                              "vals": [
                                "Info"
                              ]
                            }
                          ]
                        ],
                        "target_filters": [
                          [
                            {
                              "key": "severity",
                              "oper": "IN",
                              "vals": [
                                "Info"
                              ]
                            }
                          ]
                        ],
                        "equals": [
                          "data_source_id",
                          "labels._account_id"
                        ],
                        "is_directly_discard": false,
                        "status": "enabled",
                        "rule_id": "69bcc630b9e63df36603e425",
                        "updated_by": 3790925372131,
                        "created_at": 1773979184,
                        "updated_at": 1773979184
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/ChannelScopedListRequest"
              },
              "example": {
                "channel_id": 1001
              }
            }
          }
        }
      }
    },
    "/channel/inhibit/rule/create": {
      "post": {
        "operationId": "channelInhibitRuleCreate",
        "summary": "创建抑制策略",
        "description": "创建一条抑制策略，当高优先级告警触发时抑制低优先级告警。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/channel-inhibit-rule-create",
          "metadata": {
            "sidebarTitle": "创建抑制策略"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleCreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "rule_id": "69db2f69a0fe7db6448b1504",
                    "rule_name": "Test inhibit rule"
                  }
                }
              }
            }
          },
          "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/CreateInhibitRuleRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_name": "Suppress Info when Critical fires",
                "description": "When a Critical alert fires, suppress matching Info alerts",
                "equals": [
                  "labels.cluster",
                  "labels.service"
                ],
                "source_filters": [
                  [
                    {
                      "key": "severity",
                      "oper": "IN",
                      "vals": [
                        "Critical"
                      ]
                    }
                  ]
                ],
                "target_filters": [
                  [
                    {
                      "key": "severity",
                      "oper": "IN",
                      "vals": [
                        "Info"
                      ]
                    }
                  ]
                ],
                "is_directly_discard": false
              }
            }
          }
        }
      }
    },
    "/channel/inhibit/rule/update": {
      "post": {
        "operationId": "channelInhibitRuleUpdate",
        "summary": "更新抑制策略",
        "description": "更新已有抑制策略的配置。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/channel-inhibit-rule-update",
          "metadata": {
            "sidebarTitle": "更新抑制策略"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/UpdateInhibitRuleRequest"
              },
              "example": {
                "channel_id": 1001,
                "rule_id": "6621b23f4a2c5e0012ab34ce",
                "rule_name": "Suppress downstream",
                "equals": [
                  "labels.cluster"
                ]
              }
            }
          }
        }
      }
    },
    "/channel/inhibit/rule/delete": {
      "post": {
        "operationId": "channelInhibitRuleDelete",
        "summary": "删除抑制策略",
        "description": "删除指定的抑制策略。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/channel-inhibit-rule-delete",
          "metadata": {
            "sidebarTitle": "删除抑制策略"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_id": "6621b23f4a2c5e0012ab34cd"
              }
            }
          }
        }
      }
    },
    "/channel/inhibit/rule/enable": {
      "post": {
        "operationId": "channelInhibitRuleEnable",
        "summary": "启用抑制策略",
        "description": "启用已禁用的抑制策略。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/channel-inhibit-rule-enable",
          "metadata": {
            "sidebarTitle": "启用抑制策略"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_id": "6621b23f4a2c5e0012ab34cd"
              }
            }
          }
        }
      }
    },
    "/channel/inhibit/rule/disable": {
      "post": {
        "operationId": "channelInhibitRuleDisable",
        "summary": "禁用抑制策略",
        "description": "禁用抑制策略而不删除。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/channel-inhibit-rule-disable",
          "metadata": {
            "sidebarTitle": "禁用抑制策略"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_id": "6621b23f4a2c5e0012ab34cd"
              }
            }
          }
        }
      }
    },
    "/channel/unsubscribe/rule/list": {
      "post": {
        "operationId": "channelUnsubscribeRuleList",
        "summary": "查询排除规则列表",
        "description": "查询协作空间的排除规则列表。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/on-call/channels/channel-unsubscribe-rule-list",
          "metadata": {
            "sidebarTitle": "查询排除规则列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListDropRulesResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "account_id": 2451002751131,
                        "channel_id": 5967964835131,
                        "priority": 0,
                        "rule_name": "Drop test alerts",
                        "description": "",
                        "filters": [
                          [
                            {
                              "key": "data_source_id",
                              "oper": "IN",
                              "vals": [
                                "6113996590131"
                              ]
                            }
                          ]
                        ],
                        "status": "enabled",
                        "rule_id": "69bcc530b9e63df36603e421",
                        "updated_by": 3790925372131,
                        "created_at": 1773978928,
                        "updated_at": 1773978928
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/ChannelScopedListRequest"
              },
              "example": {
                "channel_id": 1001
              }
            }
          }
        }
      }
    },
    "/channel/unsubscribe/rule/create": {
      "post": {
        "operationId": "channelUnsubscribeRuleCreate",
        "summary": "创建排除规则",
        "description": "创建排除规则，在告警成为故障之前过滤不需要的告警。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/on-call/channels/channel-unsubscribe-rule-create",
          "metadata": {
            "sidebarTitle": "创建排除规则"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleCreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "rule_id": "69db2f6ba0fe7db6448b1505",
                    "rule_name": "Test drop rule"
                  }
                }
              }
            }
          },
          "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/CreateDropRuleRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_name": "Drop test environment alerts",
                "description": "Discard all alerts from the test environment before they create incidents",
                "filters": [
                  [
                    {
                      "key": "labels.env",
                      "oper": "IN",
                      "vals": [
                        "test",
                        "dev"
                      ]
                    }
                  ]
                ]
              }
            }
          }
        }
      }
    },
    "/channel/unsubscribe/rule/update": {
      "post": {
        "operationId": "channelUnsubscribeRuleUpdate",
        "summary": "更新排除规则",
        "description": "更新已有排除规则的配置。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/on-call/channels/channel-unsubscribe-rule-update",
          "metadata": {
            "sidebarTitle": "更新排除规则"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/UpdateDropRuleRequest"
              },
              "example": {
                "channel_id": 1001,
                "rule_id": "6621b23f4a2c5e0012ab34cf",
                "rule_name": "Drop test alerts",
                "filters": [
                  [
                    {
                      "key": "labels.env",
                      "oper": "IN",
                      "vals": [
                        "test"
                      ]
                    }
                  ]
                ]
              }
            }
          }
        }
      }
    },
    "/channel/unsubscribe/rule/delete": {
      "post": {
        "operationId": "channelUnsubscribeRuleDelete",
        "summary": "删除排除规则",
        "description": "删除指定的排除规则。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/on-call/channels/channel-unsubscribe-rule-delete",
          "metadata": {
            "sidebarTitle": "删除排除规则"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_id": "6621b23f4a2c5e0012ab34cd"
              }
            }
          }
        }
      }
    },
    "/channel/unsubscribe/rule/enable": {
      "post": {
        "operationId": "channelUnsubscribeRuleEnable",
        "summary": "启用排除规则",
        "description": "启用已禁用的排除规则。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/on-call/channels/channel-unsubscribe-rule-enable",
          "metadata": {
            "sidebarTitle": "启用排除规则"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_id": "6621b23f4a2c5e0012ab34cd"
              }
            }
          }
        }
      }
    },
    "/channel/unsubscribe/rule/disable": {
      "post": {
        "operationId": "channelUnsubscribeRuleDisable",
        "summary": "禁用排除规则",
        "description": "禁用排除规则而不删除。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/on-call/channels/channel-unsubscribe-rule-disable",
          "metadata": {
            "sidebarTitle": "禁用排除规则"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_id": "6621b23f4a2c5e0012ab34cd"
              }
            }
          }
        }
      }
    },
    "/channel/escalate/rule/info": {
      "post": {
        "operationId": "channelEscalateRuleInfo",
        "summary": "获取分派策略详情",
        "description": "获取指定分派策略的详细信息。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/channel-escalate-rule-info",
          "metadata": {
            "sidebarTitle": "获取分派策略详情"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EscalateRuleItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "account_id": 2451002751131,
                    "channel_id": 6193426913131,
                    "priority": 0,
                    "aggr_window": 0,
                    "rule_name": "Default",
                    "description": "",
                    "layers": [
                      {
                        "max_times": 1,
                        "notify_step": 10,
                        "target": {
                          "person_ids": [
                            3790925372131
                          ],
                          "by": {
                            "follow_preference": true
                          },
                          "webhooks": null
                        },
                        "escalate_window": 30,
                        "force_escalate": false
                      }
                    ],
                    "time_filters": [],
                    "filters": [],
                    "status": "enabled",
                    "template_id": "6321aad26c12104586a88916",
                    "rule_id": "69bd0ce95a238693176c1d66",
                    "updated_by": 3790925372131,
                    "created_at": 1773997289,
                    "updated_at": 1773997289
                  }
                }
              }
            }
          },
          "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/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 1001,
                "rule_id": "6621b23f4a2c5e0012ab34d0"
              }
            }
          }
        }
      }
    },
    "/channel/escalate/rule/list": {
      "post": {
        "operationId": "channelEscalateRuleList",
        "summary": "查询分派策略列表",
        "description": "查询协作空间下的所有分派策略。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/channel-escalate-rule-list",
          "metadata": {
            "sidebarTitle": "查询分派策略列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListEscalationRulesResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "account_id": 2451002751131,
                        "channel_id": 6193426913131,
                        "priority": 0,
                        "aggr_window": 0,
                        "rule_name": "Default",
                        "description": "",
                        "layers": [
                          {
                            "max_times": 1,
                            "notify_step": 10,
                            "target": {
                              "person_ids": [
                                3790925372131
                              ],
                              "by": {
                                "follow_preference": true
                              },
                              "webhooks": null
                            },
                            "escalate_window": 30,
                            "force_escalate": false
                          }
                        ],
                        "time_filters": [],
                        "filters": [],
                        "status": "enabled",
                        "template_id": "6321aad26c12104586a88916",
                        "rule_id": "69bd0ce95a238693176c1d66",
                        "updated_by": 3790925372131,
                        "created_at": 1773997289,
                        "updated_at": 1773997289
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/ChannelScopedListRequest"
              },
              "example": {
                "channel_id": 1001
              }
            }
          }
        }
      }
    },
    "/channel/escalate/rule/create": {
      "post": {
        "operationId": "channelEscalateRuleCreate",
        "summary": "创建分派策略",
        "description": "创建分派策略，定义故障发生时通知谁以及何时通知。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/channel-escalate-rule-create",
          "metadata": {
            "sidebarTitle": "创建分派策略"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleCreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "rule_id": "69db2f72a0fe7db6448b1506",
                    "rule_name": "Test escalation rule"
                  }
                }
              }
            }
          },
          "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/CreateEscalationRuleRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_name": "On-call escalation",
                "template_id": "6321aad26c12104586a88916",
                "description": "Notify primary on-call, then escalate to secondary after 30 minutes",
                "layers": [
                  {
                    "target": {
                      "person_ids": [
                        3790925372131
                      ],
                      "by": {
                        "follow_preference": true
                      }
                    },
                    "max_times": 3,
                    "notify_step": 10,
                    "escalate_window": 30,
                    "force_escalate": false
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/channel/escalate/rule/update": {
      "post": {
        "operationId": "channelEscalateRuleUpdate",
        "summary": "更新分派策略",
        "description": "更新已有分派策略的配置。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/channel-escalate-rule-update",
          "metadata": {
            "sidebarTitle": "更新分派策略"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/UpdateEscalationRuleRequest"
              },
              "example": {
                "channel_id": 1001,
                "rule_id": "6621b23f4a2c5e0012ab34d0",
                "template_id": "6621b23f4a2c5e0012ab34d1",
                "rule_name": "Default escalation",
                "layers": [
                  {
                    "target": {
                      "person_ids": [
                        42
                      ],
                      "by": {
                        "critical": [
                          "voice"
                        ],
                        "warning": [
                          "sms"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/channel/escalate/rule/delete": {
      "post": {
        "operationId": "channelEscalateRuleDelete",
        "summary": "删除分派策略",
        "description": "删除指定的分派策略。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/channel-escalate-rule-delete",
          "metadata": {
            "sidebarTitle": "删除分派策略"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_id": "6621b23f4a2c5e0012ab34cd"
              }
            }
          }
        }
      }
    },
    "/channel/escalate/rule/enable": {
      "post": {
        "operationId": "channelEscalateRuleEnable",
        "summary": "启用分派策略",
        "description": "启用已禁用的分派策略。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/channel-escalate-rule-enable",
          "metadata": {
            "sidebarTitle": "启用分派策略"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_id": "6621b23f4a2c5e0012ab34cd"
              }
            }
          }
        }
      }
    },
    "/channel/escalate/rule/disable": {
      "post": {
        "operationId": "channelEscalateRuleDisable",
        "summary": "禁用分派策略",
        "description": "禁用分派策略而不删除。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/channel-escalate-rule-disable",
          "metadata": {
            "sidebarTitle": "禁用分派策略"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_id": "6621b23f4a2c5e0012ab34cd"
              }
            }
          }
        }
      }
    },
    "/route/info": {
      "post": {
        "operationId": "routeInfo",
        "summary": "获取路由规则详情",
        "description": "获取指定集成的路由规则配置。当集成尚未配置路由规则时返回 null。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **集成中心查看**（`on-call`） 或 **集成中心管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/route-info",
          "metadata": {
            "sidebarTitle": "获取路由规则详情"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RouteItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "integration_id": 6113996590131,
                    "cases": [
                      {
                        "if": [
                          {
                            "key": "labels.check",
                            "oper": "IN",
                            "vals": [
                              "cpu.idle<20%"
                            ]
                          }
                        ],
                        "channel_ids": [
                          2533748993131
                        ],
                        "fallthrough": false,
                        "routing_mode": "standard"
                      },
                      {
                        "if": [
                          {
                            "key": "severity",
                            "oper": "IN",
                            "vals": [
                              "Warning"
                            ]
                          }
                        ],
                        "channel_ids": null,
                        "fallthrough": false,
                        "routing_mode": "name_mapping",
                        "name_mapping_label": "labels.service"
                      }
                    ],
                    "default": {
                      "channel_ids": [
                        3521074710131
                      ]
                    },
                    "status": "enabled",
                    "version": 6,
                    "updated_by": 3790925372131,
                    "creator_id": 3790925372131,
                    "created_at": 1774606136,
                    "updated_at": 1774606136
                  }
                }
              }
            }
          },
          "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/RouteInfoRequest"
              },
              "example": {
                "integration_id": 6113996590131
              }
            }
          }
        }
      }
    },
    "/route/list": {
      "post": {
        "operationId": "routeList",
        "summary": "查询路由规则列表",
        "description": "返回指定集成的路由规则列表。未配置路由规则的集成将不出现在响应中。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **集成中心查看**（`on-call`） 或 **集成中心管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/route-list",
          "metadata": {
            "sidebarTitle": "查询路由规则列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListRoutesResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "integration_id": 6113996590131,
                        "cases": [
                          {
                            "if": [
                              {
                                "key": "labels.check",
                                "oper": "IN",
                                "vals": [
                                  "cpu.idle<20%"
                                ]
                              }
                            ],
                            "channel_ids": [
                              2533748993131
                            ],
                            "fallthrough": false,
                            "routing_mode": "standard"
                          }
                        ],
                        "default": {
                          "channel_ids": [
                            3521074710131
                          ]
                        },
                        "status": "enabled",
                        "version": 6,
                        "updated_by": 3790925372131,
                        "creator_id": 3790925372131,
                        "created_at": 1774606136,
                        "updated_at": 1774606136
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/ListRoutesRequest"
              },
              "example": {
                "integration_ids": [
                  6113996590131,
                  6113996590132
                ]
              }
            }
          }
        }
      }
    },
    "/route/upsert": {
      "post": {
        "operationId": "routeUpsert",
        "summary": "创建或更新路由规则",
        "description": "创建或更新集成的路由规则，将告警导向特定协作空间。`cases` 与 `default` 至少需要提供其一。",
        "tags": [
          "On-call/协作空间"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **集成中心管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/channels/route-upsert",
          "metadata": {
            "sidebarTitle": "创建或更新路由规则"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/UpsertRouteRequest"
              },
              "example": {
                "integration_id": 6113996590131,
                "cases": [
                  {
                    "if": [
                      {
                        "key": "severity",
                        "oper": "IN",
                        "vals": [
                          "Critical"
                        ]
                      }
                    ],
                    "channel_ids": [
                      3521074710131
                    ],
                    "fallthrough": false,
                    "routing_mode": "standard"
                  }
                ],
                "default": {
                  "channel_ids": [
                    3521074710131
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/alert/list": {
      "post": {
        "operationId": "alert-read-list",
        "summary": "查询告警列表",
        "description": "返回满足过滤条件的告警列表，支持游标分页。",
        "tags": [
          "On-call/告警管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间查看**（`on-call`） |\n\n## 使用说明\n\n- `start_time` 和 `end_time` 均为必填的 Unix 时间戳（秒），最大跨度 31 天。\n- 使用上次响应中的 `search_after_ctx` 获取下一页。\n- 结果会根据调用方的协作空间数据访问权限进行过滤。\n- 将 `is_active` 设为 `true` 可仅返回活跃（触发中）告警；设为 `false` 返回已恢复告警。",
          "href": "/zh/api-reference/on-call/alerts/alert-read-list",
          "metadata": {
            "sidebarTitle": "查询告警列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 1,
                    "has_next_page": false,
                    "search_after_ctx": "",
                    "items": [
                      {
                        "alert_id": "663a1b2c3d4e5f6789abcdef",
                        "integration_id": 10001,
                        "channel_id": 20001,
                        "account_id": 10023,
                        "title": "CPU 使用率 > 90%",
                        "alert_severity": "Critical",
                        "alert_status": "Critical",
                        "start_time": 1712650000,
                        "last_time": 1712655000,
                        "end_time": 0,
                        "labels": {
                          "host": "web-01"
                        },
                        "ever_muted": false,
                        "created_at": 1712650000,
                        "updated_at": 1712655000,
                        "integration_name": "Prometheus",
                        "integration_type": "prometheus",
                        "channel_name": "生产",
                        "event_cnt": 3
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/AlertListRequest"
              },
              "example": {
                "start_time": 1712620800,
                "end_time": 1712707200,
                "limit": 20,
                "is_active": true
              }
            }
          }
        }
      }
    },
    "/alert/info": {
      "post": {
        "operationId": "alert-read-info",
        "summary": "查看告警详情",
        "description": "通过告警 ID 返回单条告警的完整详情，包括关联故障和事件数量。",
        "tags": [
          "On-call/告警管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间查看**（`on-call`） |\n\n## 使用说明\n\n- `alert_id` 为 ObjectID 十六进制字符串，可从 `POST /alert/list` 或 `POST /alert-event/list` 获取。",
          "href": "/zh/api-reference/on-call/alerts/alert-read-info",
          "metadata": {
            "sidebarTitle": "查看告警详情"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "alert_id": "663a1b2c3d4e5f6789abcdef",
                    "title": "CPU 使用率 > 90%",
                    "alert_severity": "Critical",
                    "alert_status": "Critical",
                    "start_time": 1712650000,
                    "event_cnt": 3
                  }
                }
              }
            }
          },
          "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/AlertInfoRequest"
              },
              "example": {
                "alert_id": "663a1b2c3d4e5f6789abcdef"
              }
            }
          }
        }
      }
    },
    "/alert/list-by-ids": {
      "post": {
        "operationId": "alert-read-list-by-ids",
        "summary": "批量查询告警",
        "description": "通过多个告警 ID 一次性返回多条告警详情。",
        "tags": [
          "On-call/告警管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间查看**（`on-call`） |\n\n## 使用说明\n\n- 所有 `alert_ids` 必须属于调用方账户，任何无效 ID 都会导致整个请求失败。",
          "href": "/zh/api-reference/on-call/alerts/alert-read-list-by-ids",
          "metadata": {
            "sidebarTitle": "批量查询告警"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 1,
                    "has_next_page": false,
                    "items": [
                      {
                        "alert_id": "663a1b2c3d4e5f6789abcdef",
                        "title": "CPU 使用率 > 90%"
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/AlertListByIDsRequest"
              },
              "example": {
                "alert_ids": [
                  "663a1b2c3d4e5f6789abcdef"
                ]
              }
            }
          }
        }
      }
    },
    "/alert/event/list": {
      "post": {
        "operationId": "alert-read-event-list",
        "summary": "查询告警事件列表",
        "description": "通过游标或页码分页返回指定告警的原始事件。",
        "tags": [
          "On-call/告警管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间查看**（`on-call`） |\n\n## 使用说明\n\n- 默认按最新事件优先返回；设置 `asc=true` 可按最早事件优先读取。\n- 使用上次响应中的 `search_after_ctx` 搭配 `limit` 获取下一页。\n- 也支持通过 `p` 使用页码分页，但 `p * limit` 必须在 10,000 条以内。\n- 单条告警可能累积大量原始事件，热点告警建议优先使用游标分页。",
          "href": "/zh/api-reference/on-call/alerts/alert-read-event-list",
          "metadata": {
            "sidebarTitle": "查询告警事件列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertEventListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 57,
                    "has_next_page": true,
                    "search_after_ctx": "663a1b2c3d4e5f6789abc001",
                    "items": [
                      {
                        "event_id": "663a1b2c3d4e5f6789abc001",
                        "alert_id": "663a1b2c3d4e5f6789abcdef",
                        "title": "CPU 使用率 > 90%",
                        "event_severity": "Critical",
                        "event_status": "Critical",
                        "event_time": 1712650000,
                        "labels": {
                          "host": "web-01"
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/AlertEventListRequest"
              },
              "example": {
                "alert_id": "663a1b2c3d4e5f6789abcdef",
                "limit": 20
              }
            }
          }
        }
      }
    },
    "/alert/feed": {
      "post": {
        "operationId": "alert-read-feed",
        "summary": "查询告警动态",
        "description": "返回单条告警的动态记录（评论、状态变更、合并、静默事件），支持分页查询。",
        "tags": [
          "On-call/告警管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间查看**（`on-call`） |\n\n## 使用说明\n\n- 使用 `p`（页码，从 1 开始）和 `limit`（最大 100，默认 20）进行分页。\n- 将 `asc` 设为 `true` 可按时间正序返回。\n- 使用 `types` 过滤特定动态类型（如 `alert_comment`、`alert_merge`）。",
          "href": "/zh/api-reference/on-call/alerts/alert-read-feed",
          "metadata": {
            "sidebarTitle": "查询告警动态"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertFeedResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "has_next_page": false,
                    "items": [
                      {
                        "ref_id": "663a1b2c3d4e5f6789abcdef",
                        "type": "alert_comment",
                        "detail": {
                          "comment": "正在排查中。"
                        },
                        "creator_id": 80011,
                        "created_at": 1712651000
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/AlertFeedRequest"
              },
              "example": {
                "alert_id": "663a1b2c3d4e5f6789abcdef",
                "limit": 20,
                "asc": false
              }
            }
          }
        }
      }
    },
    "/alert/merge": {
      "post": {
        "operationId": "alert-write-merge",
        "summary": "将告警合并到故障",
        "description": "将一条或多条告警关联到已有故障。若来源告警之前属于其他故障，且合并后该故障中没有其他告警，则该故障将自动关闭。",
        "tags": [
          "On-call/告警管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间查看**（`on-call`） |\n\n## 使用说明\n\n- 所有 `alert_ids` 和 `incident_id` 必须属于调用方账户。\n- 可选填 `title` 和 `owner_id` 以同时更新目标故障。",
          "href": "/zh/api-reference/on-call/alerts/alert-write-merge",
          "metadata": {
            "sidebarTitle": "将告警合并到故障"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/AlertMergeRequest"
              },
              "example": {
                "alert_ids": [
                  "663a1b2c3d4e5f6789abcdef"
                ],
                "incident_id": "663a000000000000deadbeef"
              }
            }
          }
        }
      }
    },
    "/alert/pipeline/info": {
      "post": {
        "operationId": "alert-read-pipeline-info",
        "summary": "查看告警处理规则",
        "description": "返回指定集成的告警处理规则配置。",
        "tags": [
          "On-call/告警管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **集成中心查看**（`on-call`） |\n\n## 使用说明\n\n- 若该集成尚未配置告警处理规则，则 data 为 `null`。\n- 调用方需有该集成的访问权限。",
          "href": "/zh/api-reference/on-call/alerts/alert-read-pipeline-info",
          "metadata": {
            "sidebarTitle": "查看告警处理规则"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertPipelineItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "integration_id": 10001,
                    "rules": [
                      {
                        "kind": "severity_reset",
                        "if": null,
                        "settings": {
                          "severity": "Warning"
                        }
                      }
                    ],
                    "status": "enabled",
                    "creator_id": 80011,
                    "updated_by": 80011,
                    "created_at": 1710000000,
                    "updated_at": 1712000000
                  }
                }
              }
            }
          },
          "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/AlertPipelineInfoRequest"
              },
              "example": {
                "integration_id": 10001
              }
            }
          }
        }
      }
    },
    "/alert/pipeline/list": {
      "post": {
        "operationId": "alert-read-pipeline-list",
        "summary": "批量查询告警处理规则",
        "description": "返回多个集成的告警处理规则配置。",
        "tags": [
          "On-call/告警管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **集成中心查看**（`on-call`） |\n\n## 使用说明\n\n- 所有 `integration_ids` 必须对调用方可访问。",
          "href": "/zh/api-reference/on-call/alerts/alert-read-pipeline-list",
          "metadata": {
            "sidebarTitle": "批量查询告警处理规则"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertPipelineListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "integration_id": 10001,
                        "rules": [],
                        "status": "enabled",
                        "creator_id": 80011,
                        "updated_by": 80011,
                        "created_at": 1710000000,
                        "updated_at": 1712000000
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/AlertPipelineListRequest"
              },
              "example": {
                "integration_ids": [
                  10001,
                  10002
                ]
              }
            }
          }
        }
      }
    },
    "/alert/pipeline/upsert": {
      "post": {
        "operationId": "alert-write-pipeline-upsert",
        "summary": "创建或更新告警处理规则",
        "description": "为集成设置告警处理规则，将完全替换已有配置。",
        "tags": [
          "On-call/告警管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **集成中心管理**（`on-call`） |\n\n## 使用说明\n\n- 每条处理规则最多 50 条规则。\n- 每条规则包含 `kind`（`title_reset`、`description_reset`、`severity_reset`、`alert_drop`、`alert_inhibit` 之一）、可选的 `if` 过滤器，以及与 kind 对应的 `settings`。\n- `alert_inhibit` 类型需要 Standard 及以上许可证。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/on-call/alerts/alert-write-pipeline-upsert",
          "metadata": {
            "sidebarTitle": "创建或更新告警处理规则"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/AlertPipelineUpsertRequest"
              },
              "example": {
                "integration_id": 10001,
                "rules": [
                  {
                    "kind": "severity_reset",
                    "if": null,
                    "settings": {
                      "severity": "Warning"
                    }
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/alert-event/list": {
      "post": {
        "operationId": "alert-event-read-list",
        "summary": "查询原始告警事件列表",
        "description": "返回跨所有告警的原始告警事件分页列表，支持按集成、协作空间、时间范围和严重程度过滤。",
        "tags": [
          "On-call/告警管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间查看**（`on-call`） |\n\n## 使用说明\n\n- 结果会根据调用方的协作空间数据访问权限进行过滤。\n- `severities` 为逗号分隔的字符串，如 `\"Critical,Warning\"`。",
          "href": "/zh/api-reference/on-call/alerts/alert-event-read-list",
          "metadata": {
            "sidebarTitle": "查询原始告警事件列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertEventGlobalListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 1,
                    "has_next_page": false,
                    "items": [
                      {
                        "event_id": "663a1b2c3d4e5f6789abc001",
                        "alert_id": "663a1b2c3d4e5f6789abcdef",
                        "title": "CPU 使用率 > 90%",
                        "event_severity": "Critical",
                        "event_time": 1712650000
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/AlertEventGlobalListRequest"
              },
              "example": {
                "start_time": 1712620800,
                "end_time": 1712707200,
                "limit": 20,
                "severities": "Critical"
              }
            }
          }
        }
      }
    },
    "/webhook/history/list": {
      "post": {
        "operationId": "webhookHistoryList",
        "summary": "查询 Webhook 推送历史",
        "description": "查询出站 Webhook 通知的推送历史记录。",
        "tags": [
          "On-call/集成中心"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **集成中心查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/integrations/webhook-history-list",
          "metadata": {
            "sidebarTitle": "查询 Webhook 推送历史"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListWebhookHistoryResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "integration_id": 5321026051131,
                        "event_id": "20260412Xatt9hrXsgmFkBR78WF655",
                        "webhook_type": "alert",
                        "event_type": "a_update",
                        "channel_id": 2551105804131,
                        "ref_id": "69da3f0ef77b1b51f40e83cc",
                        "endpoint": "https://example.com/webhook",
                        "attempt": 1,
                        "duration": 132,
                        "status": "success",
                        "status_code": 200,
                        "event_time": "2026-04-12T13:31:11.357472+08:00"
                      }
                    ],
                    "search_after_ctx": "eyJldmVudF90aW1lIjoiMjAyNi0wNC0xMlQxMzoxNToyNi4zODI1NDcrMDg6MDAiLCJldmVudF9pZCI6IjIwMjYwNDEybUdzeFAzZHJwRmZzNFpDUWQycFNEcCJ9",
                    "total": 346
                  }
                }
              }
            }
          },
          "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/ListWebhookHistoryRequest"
              },
              "example": {
                "limit": 20,
                "start_time": 1775116800000,
                "end_time": 1775203200000,
                "integration_id": 6113996590131,
                "status": "success"
              }
            }
          }
        }
      }
    },
    "/webhook/history/detail": {
      "post": {
        "operationId": "webhookHistoryDetail",
        "summary": "获取 Webhook 推送详情",
        "description": "获取指定 Webhook 推送尝试的详细请求体和响应信息。",
        "tags": [
          "On-call/集成中心"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **集成中心查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/integrations/webhook-history-detail",
          "metadata": {
            "sidebarTitle": "获取 Webhook 推送详情"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/WebhookHistoryDetail"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "integration_id": 5321026051131,
                    "event_id": "20260412Xatt9hrXsgmFkBR78WF655",
                    "webhook_type": "alert",
                    "event_type": "a_update",
                    "channel_id": 2551105804131,
                    "ref_id": "69da3f0ef77b1b51f40e83cc",
                    "request_headers": "{\"Content-Type\":\"application/json\"}",
                    "request_body": "{\"event_type\":\"a_update\",\"event_id\":\"d789d65951c0532ea9b6a1d99b707054\"}",
                    "endpoint": "https://example.com/webhook",
                    "attempt": 1,
                    "duration": 132,
                    "status": "success",
                    "status_code": 200,
                    "response_headers": "{\"Content-Type\":\"application/json\"}",
                    "response_body": "{\"ok\":true}",
                    "event_time": "2026-04-12T13:31:11.357472+08:00",
                    "ref_title": "High CPU Usage on host-01",
                    "channel_name": "Production Alerts"
                  }
                }
              }
            }
          },
          "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/GetWebhookHistoryDetailRequest"
              },
              "example": {
                "event_id": "20260412Xatt9hrXsgmFkBR78WF655",
                "integration_id": 6113996590131
              }
            }
          }
        }
      }
    },
    "/schedule/create": {
      "post": {
        "operationId": "scheduleCreate",
        "summary": "创建值班表",
        "description": "创建新的值班表（分派策略值班表）。",
        "tags": [
          "On-call/值班排班"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **值班管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/schedules/schedule-create",
          "metadata": {
            "sidebarTitle": "创建值班表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ScheduleIDResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "schedule_id": 6294534917601
                  }
                }
              }
            }
          },
          "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/ScheduleUpsertRequest"
              },
              "example": {
                "schedule_name": "Production On-Call",
                "description": "Primary on-call rotation for the production team",
                "team_id": 4291079133131,
                "layers": [
                  {
                    "layer_name": "Layer 1",
                    "name": "Layer 1",
                    "mode": 0,
                    "weight": 0,
                    "hidden": 0,
                    "groups": [
                      {
                        "group_name": "A",
                        "name": "A",
                        "members": [
                          {
                            "role_id": 0,
                            "person_ids": [
                              2451002751131
                            ]
                          }
                        ],
                        "start": 0,
                        "end": 0
                      },
                      {
                        "group_name": "B",
                        "name": "B",
                        "members": [
                          {
                            "role_id": 0,
                            "person_ids": [
                              2476123212131
                            ]
                          }
                        ],
                        "start": 0,
                        "end": 0
                      }
                    ],
                    "rotation_unit": "day",
                    "rotation_value": 1,
                    "rotation_duration": 86400,
                    "handoff_time": 0,
                    "enable_time": 1712000000,
                    "expire_time": 0,
                    "restrict_mode": 0,
                    "restrict_start": 0,
                    "restrict_end": 0,
                    "restrict_periods": [],
                    "day_mask": {
                      "repeat": [
                        1,
                        2,
                        3,
                        4,
                        5
                      ]
                    },
                    "fair_rotation": false,
                    "mask_continuous_enabled": false
                  }
                ],
                "notify": {
                  "advance_in_time": 300,
                  "fixed_time": null,
                  "by": {
                    "follow_preference": true,
                    "personal_channels": null
                  },
                  "webhooks": null
                }
              }
            }
          }
        }
      }
    },
    "/schedule/update": {
      "post": {
        "operationId": "scheduleUpdate",
        "summary": "更新值班表",
        "description": "更新已有的值班表，需要通过 schedule_id 指定值班表。",
        "tags": [
          "On-call/值班排班"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **值班管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/schedules/schedule-update",
          "metadata": {
            "sidebarTitle": "更新值班表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ScheduleEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ScheduleUpsertRequest"
              },
              "example": {
                "schedule_id": 2001,
                "schedule_name": "Production On-Call (Updated)",
                "description": "Updated primary on-call rotation",
                "team_id": 4291079133131
              }
            }
          }
        }
      }
    },
    "/schedule/preview": {
      "post": {
        "operationId": "schedulePreview",
        "summary": "预览值班表",
        "description": "预览值班表配置生成的排班结果，不会持久化。请求体与创建/更新相同，并需要指定 start 和 end 时间窗口（最多 45 天）。",
        "tags": [
          "On-call/值班排班"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **60 次/分钟**；**10 次/秒** |\n| 权限要求 | **值班查看**（`on-call`） 或 **值班管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/schedules/schedule-preview",
          "metadata": {
            "sidebarTitle": "预览值班表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ScheduleItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "id": null,
                    "name": null,
                    "account_id": 0,
                    "group_id": null,
                    "disabled": null,
                    "create_at": 0,
                    "create_by": 0,
                    "update_at": 0,
                    "update_by": 0,
                    "layers": [
                      {
                        "account_id": 0,
                        "name": "Layer 1",
                        "schedule_id": 0,
                        "hidden": 0,
                        "mode": 0,
                        "weight": 0,
                        "groups": [
                          {
                            "group_name": "A",
                            "name": "A",
                            "members": [
                              {
                                "role_id": 0,
                                "person_ids": [
                                  2451002751131
                                ]
                              }
                            ],
                            "start": 0,
                            "end": 0
                          },
                          {
                            "group_name": "B",
                            "name": "B",
                            "members": [
                              {
                                "role_id": 0,
                                "person_ids": [
                                  2476123212131
                                ]
                              }
                            ],
                            "start": 0,
                            "end": 0
                          }
                        ],
                        "rotation_duration": 86400,
                        "handoff_time": 0,
                        "enable_time": 1775980800,
                        "expire_time": 0,
                        "restrict_mode": 0,
                        "restrict_start": 0,
                        "restrict_end": 0,
                        "restrict_periods": [],
                        "day_mask": {
                          "repeat": [
                            1,
                            2,
                            3,
                            4,
                            5
                          ]
                        },
                        "create_at": 0,
                        "create_by": 0,
                        "update_at": 0,
                        "update_by": 0,
                        "layer_name": "Layer 1",
                        "fair_rotation": false,
                        "layer_start": 1775980800,
                        "layer_end": null,
                        "rotation_unit": "day",
                        "rotation_value": 1,
                        "mask_continuous_enabled": false
                      }
                    ],
                    "schedule_layers": [
                      {
                        "layer_name": "Layer 1",
                        "name": "Layer 1",
                        "mode": 0,
                        "schedules": [
                          {
                            "start": 1776009600,
                            "end": 1776096000,
                            "group": {
                              "group_name": "A",
                              "name": "A",
                              "members": [
                                {
                                  "role_id": 0,
                                  "person_ids": [
                                    2451002751131
                                  ]
                                }
                              ],
                              "start": 1776009600,
                              "end": 1776096000
                            },
                            "index": 0
                          },
                          {
                            "start": 1776096000,
                            "end": 1776182400,
                            "group": {
                              "group_name": "B",
                              "name": "B",
                              "members": [
                                {
                                  "role_id": 0,
                                  "person_ids": [
                                    2476123212131
                                  ]
                                }
                              ],
                              "start": 1776096000,
                              "end": 1776182400
                            },
                            "index": 0
                          }
                        ]
                      }
                    ],
                    "final_schedule": {
                      "layer_name": "",
                      "name": "",
                      "mode": 0,
                      "schedules": [
                        {
                          "start": 1776009600,
                          "end": 1776096000,
                          "group": {
                            "group_name": "A",
                            "name": "A",
                            "members": [
                              {
                                "role_id": 0,
                                "person_ids": [
                                  2451002751131
                                ]
                              }
                            ],
                            "start": 1776009600,
                            "end": 1776096000
                          },
                          "index": 0
                        }
                      ]
                    },
                    "start": 1775980800,
                    "end": 1776240000,
                    "notify": null,
                    "schedule_id": 0,
                    "schedule_name": null,
                    "team_id": null,
                    "description": null,
                    "layer_schedules": null,
                    "status": null,
                    "cur_oncall": null,
                    "next_oncall": null
                  }
                }
              }
            }
          },
          "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/ScheduleUpsertRequest"
              },
              "example": {
                "schedule_name": "Preview Schedule",
                "start": 1712000000,
                "end": 1712086400,
                "layers": [
                  {
                    "layer_name": "Layer 1",
                    "name": "Layer 1",
                    "mode": 0,
                    "weight": 0,
                    "hidden": 0,
                    "groups": [
                      {
                        "group_name": "A",
                        "name": "A",
                        "members": [
                          {
                            "role_id": 0,
                            "person_ids": [
                              2451002751131
                            ]
                          }
                        ],
                        "start": 0,
                        "end": 0
                      }
                    ],
                    "rotation_unit": "day",
                    "rotation_value": 1,
                    "rotation_duration": 86400,
                    "handoff_time": 0,
                    "enable_time": 1712000000,
                    "expire_time": 0,
                    "restrict_mode": 0,
                    "restrict_start": 0,
                    "restrict_end": 0,
                    "restrict_periods": [],
                    "day_mask": {
                      "repeat": [
                        1,
                        2,
                        3,
                        4,
                        5
                      ]
                    },
                    "fair_rotation": false,
                    "mask_continuous_enabled": false
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/schedule/delete": {
      "post": {
        "operationId": "scheduleDelete",
        "summary": "删除值班表",
        "description": "根据 ID 删除一个或多个值班表。",
        "tags": [
          "On-call/值班排班"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **值班管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/schedules/schedule-delete",
          "metadata": {
            "sidebarTitle": "删除值班表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ScheduleEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ScheduleIDsBodyRequest"
              },
              "example": {
                "schedule_ids": [
                  2001
                ]
              }
            }
          }
        }
      }
    },
    "/schedule/info": {
      "post": {
        "operationId": "scheduleInfo",
        "summary": "获取值班表详情",
        "description": "返回值班表的详细信息，并按照指定时间窗口（最多 45 天）返回计算出的值班分层。",
        "tags": [
          "On-call/值班排班"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **值班查看**（`on-call`） 或 **值班管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/schedules/schedule-info",
          "metadata": {
            "sidebarTitle": "获取值班表详情"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ScheduleItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "id": 5789640530410,
                    "name": "test-000001",
                    "account_id": 2451002751131,
                    "group_id": 4291079133131,
                    "disabled": 0,
                    "create_at": 1766110836,
                    "create_by": 2476123212131,
                    "update_at": 1775205795,
                    "update_by": 2476123212131,
                    "layers": [
                      {
                        "account_id": 2451002751131,
                        "name": "Layer 1",
                        "schedule_id": 5789640530410,
                        "hidden": 0,
                        "mode": 0,
                        "weight": 0,
                        "groups": [
                          {
                            "group_name": "A",
                            "name": "A",
                            "members": [
                              {
                                "role_id": 0,
                                "person_ids": [
                                  3122470302131
                                ]
                              }
                            ],
                            "start": 0,
                            "end": 0
                          },
                          {
                            "group_name": "B",
                            "name": "B",
                            "members": [
                              {
                                "role_id": 0,
                                "person_ids": [
                                  2659460982131
                                ]
                              }
                            ],
                            "start": 0,
                            "end": 0
                          }
                        ],
                        "rotation_duration": 86400,
                        "handoff_time": 0,
                        "enable_time": 1767542400,
                        "expire_time": 0,
                        "restrict_mode": 0,
                        "restrict_start": 0,
                        "restrict_end": 0,
                        "restrict_periods": [],
                        "day_mask": {
                          "repeat": [
                            1,
                            2,
                            3,
                            4,
                            5
                          ]
                        },
                        "create_at": 1775205795,
                        "create_by": 2476123212131,
                        "update_at": 1775205795,
                        "update_by": 2476123212131,
                        "layer_name": "Layer 1",
                        "fair_rotation": false,
                        "layer_start": 1767542400,
                        "layer_end": null,
                        "rotation_unit": "day",
                        "rotation_value": 1,
                        "mask_continuous_enabled": false
                      }
                    ],
                    "schedule_layers": [
                      {
                        "layer_name": "Layer 1",
                        "name": "Layer 1",
                        "mode": 0,
                        "schedules": [
                          {
                            "start": 1776009600,
                            "end": 1776096000,
                            "group": {
                              "group_name": "A",
                              "name": "A",
                              "members": [
                                {
                                  "role_id": 0,
                                  "person_ids": [
                                    3122470302131
                                  ]
                                }
                              ],
                              "start": 1776009600,
                              "end": 1776096000
                            },
                            "index": 0
                          },
                          {
                            "start": 1776096000,
                            "end": 1776182400,
                            "group": {
                              "group_name": "B",
                              "name": "B",
                              "members": [
                                {
                                  "role_id": 0,
                                  "person_ids": [
                                    2659460982131
                                  ]
                                }
                              ],
                              "start": 1776096000,
                              "end": 1776182400
                            },
                            "index": 0
                          }
                        ]
                      }
                    ],
                    "final_schedule": {
                      "layer_name": "",
                      "name": "",
                      "mode": 0,
                      "schedules": [
                        {
                          "start": 1776009600,
                          "end": 1776096000,
                          "group": {
                            "group_name": "A",
                            "name": "A",
                            "members": [
                              {
                                "role_id": 0,
                                "person_ids": [
                                  3122470302131
                                ]
                              }
                            ],
                            "start": 1776009600,
                            "end": 1776096000
                          },
                          "index": 0
                        }
                      ]
                    },
                    "notify": {
                      "advance_in_time": 300,
                      "fixed_time": null,
                      "by": {
                        "follow_preference": false,
                        "personal_channels": [
                          "email"
                        ]
                      },
                      "webhooks": [
                        {
                          "type": "feishu_app",
                          "settings": {
                            "token": "",
                            "alias": "",
                            "data_source_id": 5427276014131,
                            "chat_ids": [
                              "oc_60a6dc4c6e4e5cbc4934ef08aa7ff76d"
                            ],
                            "verify_token": "",
                            "sign_secret": ""
                          }
                        }
                      ]
                    },
                    "schedule_id": 5789640530410,
                    "schedule_name": "test-000001",
                    "team_id": 4291079133131,
                    "description": "abc",
                    "layer_schedules": [
                      {
                        "layer_name": "Layer 1",
                        "name": "Layer 1",
                        "mode": 0,
                        "schedules": [
                          {
                            "start": 1776009600,
                            "end": 1776096000,
                            "group": {
                              "group_name": "A",
                              "name": "A",
                              "members": [
                                {
                                  "role_id": 0,
                                  "person_ids": [
                                    3122470302131
                                  ]
                                }
                              ],
                              "start": 1776009600,
                              "end": 1776096000
                            },
                            "index": 0
                          }
                        ]
                      }
                    ],
                    "status": 0,
                    "cur_oncall": {
                      "start": 1775972040,
                      "end": 1776009600,
                      "group": {
                        "group_name": "A",
                        "name": "A",
                        "members": [
                          {
                            "role_id": 0,
                            "person_ids": [
                              2451002751131
                            ]
                          }
                        ],
                        "start": 1775972040,
                        "end": 1776009600
                      },
                      "update_at": 0,
                      "weight": 0,
                      "index": 0
                    },
                    "next_oncall": {
                      "start": 1776009600,
                      "end": 1776096000,
                      "group": {
                        "group_name": "A",
                        "name": "A",
                        "members": [
                          {
                            "role_id": 0,
                            "person_ids": [
                              3122470302131
                            ]
                          }
                        ],
                        "start": 1776009600,
                        "end": 1776096000
                      },
                      "update_at": 0,
                      "weight": 0,
                      "index": 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/ScheduleInfoRequest"
              },
              "example": {
                "schedule_id": 2001,
                "start": 1712000000,
                "end": 1712086400
              }
            }
          }
        }
      }
    },
    "/schedule/list": {
      "post": {
        "operationId": "scheduleList",
        "summary": "查询值班表列表",
        "description": "返回值班表的分页列表。若同时传入 start 与 end（间隔不超过 45 天），响应会包含计算后的排班分层。",
        "tags": [
          "On-call/值班排班"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/on-call/schedules/schedule-list",
          "metadata": {
            "sidebarTitle": "查询值班表列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ScheduleListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "id": 5789640530410,
                        "name": "test-000001",
                        "account_id": 2451002751131,
                        "group_id": 4291079133131,
                        "disabled": 0,
                        "create_at": 1766110836,
                        "create_by": 2476123212131,
                        "update_at": 1775205795,
                        "update_by": 2476123212131,
                        "layers": null,
                        "schedule_layers": null,
                        "final_schedule": {
                          "layer_name": "",
                          "name": "",
                          "mode": 0,
                          "schedules": null
                        },
                        "notify": {
                          "advance_in_time": 300,
                          "fixed_time": null,
                          "by": {
                            "follow_preference": false,
                            "personal_channels": [
                              "email"
                            ]
                          },
                          "webhooks": [
                            {
                              "type": "feishu_app",
                              "settings": {
                                "token": "",
                                "alias": "",
                                "data_source_id": 5427276014131,
                                "chat_ids": [
                                  "oc_60a6dc4c6e4e5cbc4934ef08aa7ff76d"
                                ],
                                "verify_token": "",
                                "sign_secret": ""
                              }
                            }
                          ]
                        },
                        "schedule_id": 5789640530410,
                        "schedule_name": "test-000001",
                        "team_id": 4291079133131,
                        "description": "abc",
                        "layer_schedules": null,
                        "status": 0,
                        "cur_oncall": null,
                        "next_oncall": null
                      },
                      {
                        "id": 5432326025106,
                        "name": "test-2509300001",
                        "account_id": 2451002751131,
                        "group_id": 2477033058131,
                        "disabled": 0,
                        "create_at": 1759132037,
                        "create_by": 2476123212131,
                        "update_at": 1775207501,
                        "update_by": 2476123212131,
                        "layers": null,
                        "schedule_layers": null,
                        "final_schedule": {
                          "layer_name": "",
                          "name": "",
                          "mode": 0,
                          "schedules": null
                        },
                        "notify": {
                          "advance_in_time": 300,
                          "fixed_time": null,
                          "by": {
                            "follow_preference": true,
                            "personal_channels": null
                          },
                          "webhooks": null
                        },
                        "schedule_id": 5432326025106,
                        "schedule_name": "test-2509300001",
                        "team_id": 2477033058131,
                        "description": "",
                        "layer_schedules": null,
                        "status": 0,
                        "cur_oncall": null,
                        "next_oncall": null
                      }
                    ],
                    "total": 41
                  }
                }
              }
            }
          },
          "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/ScheduleListRequest"
              },
              "example": {
                "p": 1,
                "limit": 20,
                "query": "production",
                "is_my_team": true
              }
            }
          }
        }
      }
    },
    "/schedule/self": {
      "post": {
        "operationId": "scheduleSelf",
        "summary": "查询我的值班表",
        "description": "返回当前用户被分配的值班表列表。",
        "tags": [
          "On-call/值班排班"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **值班查看**（`on-call`） 或 **值班管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/schedules/schedule-self",
          "metadata": {
            "sidebarTitle": "查询我的值班表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ScheduleSelfResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "id": 2539108069860,
                        "name": "Open Source Q&A",
                        "account_id": 2451002751131,
                        "group_id": 2477033058131,
                        "disabled": 0,
                        "create_at": 1702623874,
                        "create_by": 2451002751131,
                        "update_at": 1710468081,
                        "update_by": 2476444212131,
                        "layers": [
                          {
                            "account_id": 2451002751131,
                            "name": "Rule 1",
                            "schedule_id": 2539108069860,
                            "hidden": 0,
                            "mode": 0,
                            "weight": 0,
                            "groups": [
                              {
                                "group_name": "A",
                                "name": "A",
                                "members": [
                                  {
                                    "role_id": 0,
                                    "person_ids": [
                                      2476444212131
                                    ]
                                  }
                                ],
                                "start": 0,
                                "end": 0
                              },
                              {
                                "group_name": "B",
                                "name": "B",
                                "members": [
                                  {
                                    "role_id": 0,
                                    "person_ids": [
                                      2469167612131
                                    ]
                                  }
                                ],
                                "start": 0,
                                "end": 0
                              }
                            ],
                            "rotation_duration": 86400,
                            "handoff_time": 0,
                            "enable_time": 1702623874,
                            "expire_time": 0,
                            "restrict_mode": 0,
                            "restrict_start": 0,
                            "restrict_end": 0,
                            "restrict_periods": [],
                            "day_mask": {
                              "repeat": [
                                1,
                                2,
                                3,
                                4,
                                5
                              ]
                            },
                            "create_at": 1702623874,
                            "create_by": 2451002751131,
                            "update_at": 1710468081,
                            "update_by": 2476444212131,
                            "layer_name": "Rule 1",
                            "fair_rotation": false,
                            "layer_start": 1702623874,
                            "layer_end": null,
                            "rotation_unit": "day",
                            "rotation_value": 1,
                            "mask_continuous_enabled": false
                          }
                        ],
                        "schedule_layers": null,
                        "final_schedule": {
                          "layer_name": "",
                          "name": "",
                          "mode": 0,
                          "schedules": null
                        },
                        "notify": {
                          "fixed_time": null,
                          "by": null,
                          "webhooks": null
                        },
                        "schedule_id": 2539108069860,
                        "schedule_name": "Open Source Q&A",
                        "team_id": 2477033058131,
                        "description": "",
                        "layer_schedules": null,
                        "status": 0,
                        "cur_oncall": null,
                        "next_oncall": null
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/ScheduleSelfRequest"
              },
              "example": {
                "start": 1712000000,
                "end": 1712086400
              }
            }
          }
        }
      }
    },
    "/schedule/infos": {
      "post": {
        "operationId": "scheduleInfos",
        "summary": "批量获取值班表",
        "description": "根据 ID 列表批量返回值班表信息。",
        "tags": [
          "On-call/值班排班"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **值班查看**（`on-call`） 或 **值班管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/schedules/schedule-infos",
          "metadata": {
            "sidebarTitle": "批量获取值班表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ScheduleSelfResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "id": 5789640530410,
                        "name": "test-000001",
                        "account_id": 2451002751131,
                        "group_id": 4291079133131,
                        "disabled": 0,
                        "create_at": 1766110836,
                        "create_by": 2476123212131,
                        "update_at": 1775205795,
                        "update_by": 2476123212131,
                        "layers": null,
                        "schedule_layers": null,
                        "final_schedule": {
                          "layer_name": "",
                          "name": "",
                          "mode": 0,
                          "schedules": null
                        },
                        "notify": {
                          "advance_in_time": 300,
                          "fixed_time": null,
                          "by": {
                            "follow_preference": false,
                            "personal_channels": [
                              "email"
                            ]
                          },
                          "webhooks": [
                            {
                              "type": "feishu_app",
                              "settings": {
                                "token": "",
                                "alias": "",
                                "data_source_id": 5427276014131,
                                "chat_ids": [
                                  "oc_60a6dc4c6e4e5cbc4934ef08aa7ff76d"
                                ],
                                "verify_token": "",
                                "sign_secret": ""
                              }
                            }
                          ]
                        },
                        "schedule_id": 5789640530410,
                        "schedule_name": "test-000001",
                        "team_id": 4291079133131,
                        "description": "abc",
                        "layer_schedules": null,
                        "status": 0,
                        "cur_oncall": null,
                        "next_oncall": null
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/ScheduleIDsRequest"
              },
              "example": {
                "schedule_ids": [
                  2001,
                  2002,
                  2003
                ]
              }
            }
          }
        }
      }
    },
    "/calendar/create": {
      "post": {
        "operationId": "calendarCreate",
        "summary": "创建服务日历",
        "description": "创建个人服务日历。每个账户默认最多 5 个日历，可通过 Flashcat-Break-Cal-Limit 请求头突破限制。",
        "tags": [
          "On-call/日历管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **服务日历管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/calendars/calendar-create",
          "metadata": {
            "sidebarTitle": "创建服务日历"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CalendarCreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM",
                    "cal_name": "API Test Calendar"
                  }
                }
              }
            }
          },
          "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/CalendarCreateRequest"
              },
              "example": {
                "cal_name": "Production On-Call Calendar",
                "description": "Calendar for production on-call team",
                "timezone": "Asia/Shanghai",
                "workdays": [
                  1,
                  2,
                  3,
                  4,
                  5
                ]
              }
            }
          }
        }
      }
    },
    "/calendar/update": {
      "post": {
        "operationId": "calendarUpdate",
        "summary": "更新服务日历",
        "description": "更新个人服务日历，仅更新传入的非空字段。",
        "tags": [
          "On-call/日历管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **服务日历管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/calendars/calendar-update",
          "metadata": {
            "sidebarTitle": "更新服务日历"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CalendarEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/CalendarUpdateRequest"
              },
              "example": {
                "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM",
                "cal_name": "Production On-Call Calendar (Updated)",
                "timezone": "America/New_York",
                "workdays": [
                  1,
                  2,
                  3,
                  4,
                  5
                ]
              }
            }
          }
        }
      }
    },
    "/calendar/delete": {
      "post": {
        "operationId": "calendarDelete",
        "summary": "删除服务日历",
        "description": "删除个人服务日历。当日历被分派或静默策略引用时删除会失败。",
        "tags": [
          "On-call/日历管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **服务日历管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/calendars/calendar-delete",
          "metadata": {
            "sidebarTitle": "删除服务日历"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CalendarEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/CalendarIDRequest"
              },
              "example": {
                "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM"
              }
            }
          }
        }
      }
    },
    "/calendar/info": {
      "post": {
        "operationId": "calendarInfo",
        "summary": "获取服务日历详情",
        "description": "返回服务日历的详细信息。",
        "tags": [
          "On-call/日历管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/on-call/calendars/calendar-info",
          "metadata": {
            "sidebarTitle": "获取服务日历详情"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CalendarItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "account_id": 2451002751131,
                    "team_id": 2477033058131,
                    "cal_id": "cal.eh9gvPtWeH3xXgKeVSRxRg",
                    "cal_name": "Stock Exchange Calendar",
                    "description": "A stock market trading calendar example",
                    "timezone": "Asia/Shanghai",
                    "kind": "personal",
                    "workdays": [
                      0,
                      1,
                      2,
                      3,
                      4,
                      5,
                      6
                    ],
                    "created_at": 1702455630,
                    "updated_at": 1775529526,
                    "creator_id": 2476444212131,
                    "updated_by": 3790925372131,
                    "status": "enabled"
                  }
                }
              }
            }
          },
          "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/CalendarIDRequest"
              },
              "example": {
                "cal_id": "cal.eh9gvPtWeH3xXgKeVSRxRg"
              }
            }
          }
        }
      }
    },
    "/calendar/list": {
      "post": {
        "operationId": "calendarList",
        "summary": "查询服务日历列表",
        "description": "返回当前账户可见的服务日历列表。",
        "tags": [
          "On-call/日历管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/on-call/calendars/calendar-list",
          "metadata": {
            "sidebarTitle": "查询服务日历列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CalendarListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "account_id": 2451002751131,
                        "team_id": 2477033058131,
                        "cal_id": "cal.eh9gvPtWeH3xXgKeVSRxRg",
                        "cal_name": "Stock Exchange Calendar",
                        "description": "A stock market trading calendar example",
                        "timezone": "Asia/Shanghai",
                        "kind": "personal",
                        "workdays": [
                          0,
                          1,
                          2,
                          3,
                          4,
                          5,
                          6
                        ],
                        "created_at": 1702455630,
                        "updated_at": 1775529526,
                        "creator_id": 2476444212131,
                        "updated_by": 3790925372131,
                        "status": "enabled"
                      },
                      {
                        "account_id": 2451002751131,
                        "team_id": 0,
                        "cal_id": "cal.VZYkchxJhGELSF4jzkUAud",
                        "cal_name": "HK Stock Exchange Calendar",
                        "description": "Hong Kong Stock Exchange trading days calendar",
                        "timezone": "Asia/Shanghai",
                        "kind": "personal",
                        "extra_cal_ids": [
                          "zh-cn.china.official"
                        ],
                        "created_at": 1702968470,
                        "updated_at": 1775188967,
                        "creator_id": 2451002751131,
                        "updated_by": 3790925372131,
                        "status": "enabled"
                      }
                    ],
                    "total": 8
                  }
                }
              }
            }
          },
          "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/CalendarListRequest"
              },
              "example": {
                "kind": "personal"
              }
            }
          }
        }
      }
    },
    "/calendar/event/upsert": {
      "post": {
        "operationId": "calEventUpsert",
        "summary": "创建或更新日历事件",
        "description": "创建或更新日历事件（节假日或工作日覆盖）。不传 event_id 时会创建新事件。",
        "tags": [
          "On-call/日历管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **服务日历管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/calendars/cal-event-upsert",
          "metadata": {
            "sidebarTitle": "创建或更新日历事件"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CalEventUpsertResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM",
                    "event_id": "cale.KyG9XWTCU5CucbwukEVBQ4",
                    "summary": "Test Holiday"
                  }
                }
              }
            }
          },
          "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/CalEventUpsertRequest"
              },
              "example": {
                "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM",
                "summary": "Labour Day",
                "start_at": "2024-05-01",
                "end_at": "2024-05-06",
                "is_off": true,
                "description": "International Workers Day holiday"
              }
            }
          }
        }
      }
    },
    "/calendar/event/delete": {
      "post": {
        "operationId": "calEventDelete",
        "summary": "删除日历事件",
        "description": "根据日历 ID 与事件 ID 删除日历事件。",
        "tags": [
          "On-call/日历管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **服务日历管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/calendars/cal-event-delete",
          "metadata": {
            "sidebarTitle": "删除日历事件"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CalendarEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/CalEventIDRequest"
              },
              "example": {
                "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM",
                "event_id": "cale.KyG9XWTCU5CucbwukEVBQ4"
              }
            }
          }
        }
      }
    },
    "/calendar/event/list": {
      "post": {
        "operationId": "calEventList",
        "summary": "查询日历事件列表",
        "description": "返回个人日历在指定年/月/日范围内的事件列表。未同时传入 month 和 day 时返回整年数据。",
        "tags": [
          "On-call/日历管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/on-call/calendars/cal-event-list",
          "metadata": {
            "sidebarTitle": "查询日历事件列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CalEventListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "account_id": 2451002751131,
                        "creator_id": 2476444212131,
                        "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM",
                        "event_id": "cale.KyG9XWTCU5CucbwukEVBQ4",
                        "summary": "Test Holiday",
                        "description": "A test holiday event",
                        "start_at": "2026-05-01",
                        "end_at": "2026-05-02",
                        "is_off": true,
                        "created_at": 1775972034,
                        "updated_at": 1775972034
                      },
                      {
                        "account_id": 2451002751131,
                        "creator_id": 2451002751131,
                        "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM",
                        "event_id": "non_work.20260502",
                        "summary": "non-working day (Saturday)",
                        "description": "",
                        "start_at": "2026-05-02",
                        "end_at": "2026-05-03",
                        "is_off": true,
                        "created_at": 0,
                        "updated_at": 0
                      }
                    ],
                    "total": 11
                  }
                }
              }
            }
          },
          "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/CalEventListRequest"
              },
              "example": {
                "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM",
                "year": 2024,
                "month": 5
              }
            }
          }
        }
      }
    },
    "/template/info": {
      "post": {
        "operationId": "template-read-info",
        "summary": "查看模板详情",
        "description": "按 ID 返回单个通知模板。",
        "tags": [
          "On-call/通知模板"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **模板查看**（`on-call`） |\n\n## 使用说明\n\n- 传入 `000000000000000000000001` 作为 `template_id` 可以获取当前账户语种下的系统预置模板。",
          "href": "/zh/api-reference/on-call/notification-templates/template-read-info",
          "metadata": {
            "sidebarTitle": "查看模板详情"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TemplateItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "account_id": 10023,
                    "team_id": 0,
                    "template_id": "6605a1b2c3d4e5f6a7b8c9d0",
                    "template_name": "生产环境默认模板",
                    "description": "Default template for production incidents.",
                    "email": "Incident {{ .IncidentName }} on {{ .Severity }}",
                    "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}",
                    "voice": "",
                    "dingtalk": "",
                    "wecom": "",
                    "feishu": "",
                    "feishu_app": "",
                    "dingtalk_app": "",
                    "wecom_app": "",
                    "slack_app": "",
                    "teams_app": "",
                    "telegram": "",
                    "slack": "",
                    "zoom": "",
                    "status": "enabled",
                    "creator_id": 80011,
                    "updated_by": 80011,
                    "created_at": 1712700000,
                    "updated_at": 1712702400
                  }
                }
              }
            }
          },
          "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/TemplateIDRequest"
              },
              "example": {
                "template_id": "6605a1b2c3d4e5f6a7b8c9d0"
              }
            }
          }
        }
      }
    },
    "/template/list": {
      "post": {
        "operationId": "template-read-list",
        "summary": "查询模板列表",
        "description": "分页返回当前账户下的通知模板列表。",
        "tags": [
          "On-call/通知模板"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **模板查看**（`on-call`） 或 **模板管理**（`on-call`） |\n\n## 使用说明\n\n- 默认返回第 1 页、每页 20 条。响应中的 `has_next_page` 可以直接告知是否还有下一页，无需额外计数请求。\n- 当 `is_my_team=true` 时 `team_ids` 字段会被忽略。",
          "href": "/zh/api-reference/on-call/notification-templates/template-read-list",
          "metadata": {
            "sidebarTitle": "查询模板列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TemplateListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 47,
                    "has_next_page": true,
                    "items": [
                      {
                        "account_id": 10023,
                        "team_id": 0,
                        "template_id": "6605a1b2c3d4e5f6a7b8c9d0",
                        "template_name": "生产环境默认模板",
                        "description": "Default template for production incidents.",
                        "email": "Incident {{ .IncidentName }} on {{ .Severity }}",
                        "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}",
                        "voice": "",
                        "dingtalk": "",
                        "wecom": "",
                        "feishu": "",
                        "feishu_app": "",
                        "dingtalk_app": "",
                        "wecom_app": "",
                        "slack_app": "",
                        "teams_app": "",
                        "telegram": "",
                        "slack": "",
                        "zoom": "",
                        "status": "enabled",
                        "creator_id": 80011,
                        "updated_by": 80011,
                        "created_at": 1712700000,
                        "updated_at": 1712702400
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/TemplateListRequest"
              },
              "example": {
                "p": 1,
                "limit": 20,
                "orderby": "updated_at",
                "asc": false,
                "is_my_team": false
              }
            }
          }
        }
      }
    },
    "/template/create": {
      "post": {
        "operationId": "template-write-create",
        "summary": "创建模板",
        "description": "创建一个新的通知模板。",
        "tags": [
          "On-call/通知模板"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **模板管理**（`on-call`） |\n\n## 使用说明\n\n- `template_name` 必须在账户内唯一，重名会返回 `InvalidParameter`。\n- 服务端会对所有非空通道按 Mock 故障做一次渲染校验，任何通道的语法错误都会导致整个请求返回 `InvalidParameter`。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/on-call/notification-templates/template-write-create",
          "metadata": {
            "sidebarTitle": "创建模板"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TemplateCreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "template_id": "6605a1b2c3d4e5f6a7b8c9d0",
                    "template_name": "生产环境默认模板"
                  }
                }
              }
            }
          },
          "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/TemplateCreateRequest"
              },
              "example": {
                "team_id": 0,
                "template_name": "生产环境默认模板",
                "description": "生产环境故障的默认模板。",
                "email": "Incident {{ .IncidentName }} on {{ .Severity }}",
                "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}"
              }
            }
          }
        }
      }
    },
    "/template/update": {
      "post": {
        "operationId": "template-write-update",
        "summary": "更新模板",
        "description": "替换指定模板在所有通道上的内容。",
        "tags": [
          "On-call/通知模板"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **模板管理**（`on-call`） |\n\n## 使用说明\n\n- 请求中的每个通道字段会覆盖存储值——想清空某通道时，把该字段设置为空字符串即可。\n- 调用者必须对目标模板所属团队拥有数据权限，否则返回 `AccessDenied`。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/on-call/notification-templates/template-write-update",
          "metadata": {
            "sidebarTitle": "更新模板"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateUpdateRequest"
              },
              "example": {
                "template_id": "6605a1b2c3d4e5f6a7b8c9d0",
                "template_name": "生产环境默认模板",
                "description": "已更新的描述。",
                "email": "Incident {{ .IncidentName }} on {{ .Severity }}",
                "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}"
              }
            }
          }
        }
      }
    },
    "/template/delete": {
      "post": {
        "operationId": "template-write-delete",
        "summary": "删除模板",
        "description": "按 ID 软删除一个模板。",
        "tags": [
          "On-call/通知模板"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **模板管理**（`on-call`） |\n\n## 使用说明\n\n- 若模板仍被任何协作空间、分派策略或通知订阅引用，会返回 `400 ReferenceExist`。\n- 删除是软删除（`deleted_at` 被置值），记录仍保留用于审计，但模板不会再出现在列表中。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/on-call/notification-templates/template-write-delete",
          "metadata": {
            "sidebarTitle": "删除模板"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateIDRequest"
              },
              "example": {
                "template_id": "6605a1b2c3d4e5f6a7b8c9d0"
              }
            }
          }
        }
      }
    },
    "/enrichment/info": {
      "post": {
        "operationId": "enrichment-read-info",
        "summary": "查看富化规则",
        "description": "返回指定集成配置的告警富化规则集。",
        "tags": [
          "On-call/标签增强"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间查看**（`on-call`） 或 **协作空间管理**（`on-call`） 或 **集成中心查看**（`on-call`） 或 **集成中心管理**（`on-call`） |\n\n## 使用说明\n\n- 若该集成尚未配置富化规则，返回 `null`。",
          "href": "/zh/api-reference/on-call/alert-enrichment/enrichment-read-info",
          "metadata": {
            "sidebarTitle": "查看富化规则"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EnrichmentItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "integration_id": 5001,
                    "rules": [
                      {
                        "kind": "extraction",
                        "settings": {
                          "source_field": "labels.env",
                          "result_label": "environment",
                          "pattern": "^(prod|staging|dev).*$",
                          "override": true
                        }
                      }
                    ],
                    "status": "enabled",
                    "updated_by": 80011,
                    "creator_id": 80011,
                    "created_at": 1710000000,
                    "updated_at": 1710000000
                  }
                }
              }
            }
          },
          "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/EnrichmentInfoRequest"
              },
              "example": {
                "integration_id": 5001
              }
            }
          }
        }
      }
    },
    "/enrichment/list": {
      "post": {
        "operationId": "enrichment-read-list",
        "summary": "批量查询富化规则",
        "description": "批量返回指定集成 ID 列表的告警富化规则集。",
        "tags": [
          "On-call/标签增强"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **集成中心查看**（`on-call`） 或 **集成中心管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/alert-enrichment/enrichment-read-list",
          "metadata": {
            "sidebarTitle": "批量查询富化规则"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EnrichmentListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "integration_id": 5001,
                        "rules": [],
                        "status": "enabled",
                        "updated_by": 80011,
                        "creator_id": 80011,
                        "created_at": 1710000000,
                        "updated_at": 1710000000
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/EnrichmentListRequest"
              },
              "example": {
                "integration_ids": [
                  5001,
                  5002
                ]
              }
            }
          }
        }
      }
    },
    "/enrichment/upsert": {
      "post": {
        "operationId": "enrichment-write-upsert",
        "summary": "创建或替换富化规则",
        "description": "创建或全量替换指定集成的告警富化规则集，`rules` 数组将被原子替换。",
        "tags": [
          "On-call/标签增强"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间管理**（`on-call`） 或 **集成中心管理**（`on-call`） |\n\n## 使用说明\n\n- 富化规则按顺序依次执行。\n- 每条规则有一个 `kind`：`extraction`（正则/gjson 提取）、`composition`（模板组合标签）、`mapping`（通过映射规则或 API 查找）、`drop`（删除标签）。\n- 可选的 `if` 字段为 `AndFilters` 条件，不匹配时跳过该规则。\n- `kind: extraction`：`source_field` 须为 `title`、`description` 或 `labels.*` 前缀的键；`pattern`（正则，须包含命名分组 `result`）和 `g_json`（GJson 路径）二选一。\n- `kind: composition`：`template` 使用 Go text/template 语法，可引用 `labels.*` 键。\n- `kind: mapping`：`mapping_type` 为 `schema`（默认）或 `api`；分别提供 `schema_id` 或 `api_id`。\n- `kind: drop`：`drop_labels` 列出要删除的标签键名。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/on-call/alert-enrichment/enrichment-write-upsert",
          "metadata": {
            "sidebarTitle": "创建或替换富化规则"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/EnrichmentUpsertRequest"
              },
              "example": {
                "integration_id": 5001,
                "rules": [
                  {
                    "kind": "extraction",
                    "settings": {
                      "source_field": "labels.env",
                      "result_label": "environment",
                      "pattern": "(?P<result>prod|staging|dev)",
                      "override": true
                    }
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/schema/list": {
      "post": {
        "operationId": "mapping-schema-read-list",
        "summary": "查询映射规则列表",
        "description": "返回账户下所有映射规则，按创建时间升序排列。",
        "tags": [
          "On-call/标签增强"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **协作空间查看**（`on-call`） 或 **协作空间管理**（`on-call`） 或 **集成中心查看**（`on-call`） 或 **集成中心管理**（`on-call`） 或 **映射数据查看**（`on-call`） 或 **映射数据管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/alert-enrichment/mapping-schema-read-list",
          "metadata": {
            "sidebarTitle": "查询映射规则列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MappingSchemaListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 1,
                    "items": [
                      {
                        "schema_id": "665f1a2b3c4d5e6f7a8b9c01",
                        "schema_name": "CMDB 查询",
                        "description": "用 CMDB 数据富化告警",
                        "source_labels": [
                          "host"
                        ],
                        "result_labels": [
                          "owner",
                          "team",
                          "service"
                        ],
                        "status": "enabled",
                        "team_id": 0,
                        "creator_id": 80011,
                        "created_at": 1710000000,
                        "updated_at": 1710000000
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/EmptyRequest"
              },
              "example": {}
            }
          }
        }
      }
    },
    "/enrichment/mapping/schema/info": {
      "post": {
        "operationId": "mapping-schema-read-info",
        "summary": "查看映射规则详情",
        "description": "根据映射规则 ID 返回单个映射规则的详细信息。",
        "tags": [
          "On-call/标签增强"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **集成中心查看**（`on-call`） 或 **集成中心管理**（`on-call`） 或 **映射数据查看**（`on-call`） 或 **映射数据管理**（`on-call`） |\n\n## 使用说明\n\n- 映射规则不存在时返回 `null`。",
          "href": "/zh/api-reference/on-call/alert-enrichment/mapping-schema-read-info",
          "metadata": {
            "sidebarTitle": "查看映射规则详情"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MappingSchemaItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "schema_id": "665f1a2b3c4d5e6f7a8b9c01",
                    "schema_name": "CMDB 查询",
                    "description": "用 CMDB 数据富化告警",
                    "source_labels": [
                      "host"
                    ],
                    "result_labels": [
                      "owner",
                      "team",
                      "service"
                    ],
                    "status": "enabled",
                    "team_id": 0,
                    "creator_id": 80011,
                    "created_at": 1710000000,
                    "updated_at": 1710000000
                  }
                }
              }
            }
          },
          "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/MappingSchemaIDRequest"
              },
              "example": {
                "schema_id": "665f1a2b3c4d5e6f7a8b9c01"
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/schema/create": {
      "post": {
        "operationId": "mapping-schema-write-create",
        "summary": "创建映射规则",
        "description": "创建新的映射规则，定义查找来源标签和待填充的结果标签。需要 Pro 计划。",
        "tags": [
          "On-call/标签增强"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **映射数据管理**（`on-call`） |\n\n## 使用说明\n\n- 映射规则名称在账户内唯一。\n- `source_labels`（1–3 个）为查找键，`result_labels`（1–10 个）为匹配后写入的标签。\n- 标签名须符合 `^[a-z][a-z0-9_]{0,39}$`（小写）。\n- `source_labels` 与 `result_labels` 不得重叠。\n- 账户最多可创建 20 个映射规则。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/on-call/alert-enrichment/mapping-schema-write-create",
          "metadata": {
            "sidebarTitle": "创建映射规则"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MappingSchemaCreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "schema_id": "665f1a2b3c4d5e6f7a8b9c01",
                    "schema_name": "CMDB 查询"
                  }
                }
              }
            }
          },
          "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/MappingSchemaCreateRequest"
              },
              "example": {
                "schema_name": "CMDB 查询",
                "description": "用 CMDB 数据富化告警",
                "source_labels": [
                  "host"
                ],
                "result_labels": [
                  "owner",
                  "team",
                  "service"
                ]
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/schema/update": {
      "post": {
        "operationId": "mapping-schema-write-update",
        "summary": "更新映射规则",
        "description": "更新映射规则的名称、描述或所属团队。来源标签和结果标签创建后不可更改。",
        "tags": [
          "On-call/标签增强"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **映射数据管理**（`on-call`） |\n\n## 使用说明\n\n- 仅映射规则创建者、账户管理员或所属团队成员可更新。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/on-call/alert-enrichment/mapping-schema-write-update",
          "metadata": {
            "sidebarTitle": "更新映射规则"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/MappingSchemaUpdateRequest"
              },
              "example": {
                "schema_id": "665f1a2b3c4d5e6f7a8b9c01",
                "schema_name": "CMDB 查询 v2",
                "description": "更新后的描述"
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/schema/delete": {
      "post": {
        "operationId": "mapping-schema-write-delete",
        "summary": "删除映射规则",
        "description": "删除映射规则及其所有关联数据。若该规则被富化规则或 Webhook 引用，则拒绝删除。",
        "tags": [
          "On-call/标签增强"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **映射数据管理**（`on-call`） |\n\n## 使用说明\n\n- 若映射规则仍被引用，响应返回 HTTP 400，`refs` 字段列出所有阻止删除的引用。\n- 仅映射规则创建者、账户管理员或所属团队成员可删除。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。\n- 本接口为高危操作。控制台 JWT 调用需二次验证码；`app_key` 调用跳过 MFA 但仍会被完整记录，请妥善保管 app_key。",
          "href": "/zh/api-reference/on-call/alert-enrichment/mapping-schema-write-delete",
          "metadata": {
            "sidebarTitle": "删除映射规则"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/MappingSchemaIDRequest"
              },
              "example": {
                "schema_id": "665f1a2b3c4d5e6f7a8b9c01"
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/data/list": {
      "post": {
        "operationId": "mapping-data-read-list",
        "summary": "查询映射数据列表",
        "description": "分页返回指定映射规则的数据行，可按来源标签值进行精确过滤。",
        "tags": [
          "On-call/标签增强"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **集成中心查看**（`on-call`） 或 **集成中心管理**（`on-call`） 或 **映射数据查看**（`on-call`） 或 **映射数据管理**（`on-call`） |\n\n## 使用说明\n\n- 若提供 `query`，须包含全部来源标签——不支持部分来源标签查询。\n- 支持游标分页（`search_after_ctx`）或页码分页（`p`、`limit`）。`limit` 默认 20，最大 100。\n- 响应中的 `search_after_ctx` 可用于获取下一页。",
          "href": "/zh/api-reference/on-call/alert-enrichment/mapping-data-read-list",
          "metadata": {
            "sidebarTitle": "查询映射数据列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MappingDataListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "key": "server01",
                        "fields": {
                          "host": "server01",
                          "owner": "alice",
                          "team": "sre",
                          "service": "api"
                        },
                        "created_at": 1710000000,
                        "updated_at": 1710000000
                      }
                    ],
                    "total": 1,
                    "has_next_page": false
                  }
                }
              }
            }
          },
          "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/MappingDataListRequest"
              },
              "example": {
                "schema_id": "665f1a2b3c4d5e6f7a8b9c01",
                "orderby": "updated_at",
                "asc": false,
                "p": 1,
                "limit": 20
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/data/upsert": {
      "post": {
        "operationId": "mapping-data-write-upsert",
        "summary": "写入映射数据",
        "description": "向映射规则中插入或更新最多 1000 条数据行，每行须包含所有来源标签和结果标签。",
        "tags": [
          "On-call/标签增强"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **映射数据管理**（`on-call`） |\n\n## 使用说明\n\n- 每条数据须包含映射规则中定义的所有来源标签和结果标签的值。\n- 未知标签的值将被静默忽略。\n- 每个值最多 2048 个字符。\n- Upsert 以来源标签组合为键，来源键相同的行将被更新。\n- 单个映射规则默认最多存储 10,000 条数据。\n- 每个映射规则的写入操作有锁保护，并发 Upsert 可能返回 `ErrRequestTooFrequently`。",
          "href": "/zh/api-reference/on-call/alert-enrichment/mapping-data-write-upsert",
          "metadata": {
            "sidebarTitle": "写入映射数据"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MappingDataUpsertResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "keys": [
                      "server01",
                      "server02"
                    ]
                  }
                }
              }
            }
          },
          "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/MappingDataUpsertRequest"
              },
              "example": {
                "schema_id": "665f1a2b3c4d5e6f7a8b9c01",
                "docs": [
                  {
                    "host": "server01",
                    "owner": "alice",
                    "team": "sre",
                    "service": "api"
                  },
                  {
                    "host": "server02",
                    "owner": "bob",
                    "team": "平台",
                    "service": "gateway"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/data/delete": {
      "post": {
        "operationId": "mapping-data-write-delete",
        "summary": "删除映射数据",
        "description": "按键名批量删除最多 100 条映射数据行。",
        "tags": [
          "On-call/标签增强"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **映射数据管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/alert-enrichment/mapping-data-write-delete",
          "metadata": {
            "sidebarTitle": "删除映射数据"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/MappingDataDeleteRequest"
              },
              "example": {
                "schema_id": "665f1a2b3c4d5e6f7a8b9c01",
                "keys": [
                  "server01",
                  "server02"
                ]
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/data/truncate": {
      "post": {
        "operationId": "mapping-data-write-truncate",
        "summary": "清空映射数据",
        "description": "删除指定映射规则的全部数据行。",
        "tags": [
          "On-call/标签增强"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **映射数据管理**（`on-call`） |\n\n## 使用说明\n\n- 此操作不可逆，将删除映射规则中的所有数据。\n- 本接口为高危操作。控制台 JWT 调用需二次验证码；`app_key` 调用跳过 MFA 但仍会被完整记录，请妥善保管 app_key。",
          "href": "/zh/api-reference/on-call/alert-enrichment/mapping-data-write-truncate",
          "metadata": {
            "sidebarTitle": "清空映射数据"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/MappingSchemaIDRequest"
              },
              "example": {
                "schema_id": "665f1a2b3c4d5e6f7a8b9c01"
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/data/upload": {
      "post": {
        "operationId": "mapping-data-write-upload",
        "summary": "通过 CSV 上传映射数据",
        "description": "上传 CSV 文件批量导入映射数据。默认情况下，导入前先清空现有数据。",
        "tags": [
          "On-call/标签增强"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **20 次/分钟**；**2 次/秒** |\n| 权限要求 | **映射数据管理**（`on-call`） |\n\n## 使用说明\n\n- 请求须使用 `Content-Type: multipart/form-data`，文件字段名为 `file`，`schema_id` 通过查询参数传入。\n- CSV 标题行须包含所有来源标签和结果标签名称。\n- 文件大小上限：100 MB。\n- 默认情况下，导入前先清空现有数据；传入查询参数 `do_not_truncate_first=TRUE` 可改为追加模式。\n- CSV 中存在重复来源标签组合时返回 400 错误。",
          "href": "/zh/api-reference/on-call/alert-enrichment/mapping-data-write-upload",
          "metadata": {
            "sidebarTitle": "通过 CSV 上传映射数据"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/MappingDataUploadRequest"
              },
              "example": {
                "schema_id": "665f1a2b3c4d5e6f7a8b9c01"
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/data/download": {
      "post": {
        "operationId": "mapping-data-read-download",
        "summary": "下载映射数据 CSV",
        "description": "将映射规则的所有数据行导出为 CSV 文件。",
        "tags": [
          "On-call/标签增强"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **集成中心查看**（`on-call`） 或 **集成中心管理**（`on-call`） 或 **映射数据查看**（`on-call`） 或 **映射数据管理**（`on-call`） |\n\n## 使用说明\n\n- 响应为 CSV 文件，包含 `Content-Disposition: attachment` 响应头。\n- CSV 标题行按顺序对应映射规则的来源标签和结果标签。",
          "href": "/zh/api-reference/on-call/alert-enrichment/mapping-data-read-download",
          "metadata": {
            "sidebarTitle": "下载映射数据 CSV"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CsvFileResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": "host,owner,team,service\nserver01,alice,sre,api\n"
                }
              }
            }
          },
          "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/MappingSchemaIDRequest"
              },
              "example": {
                "schema_id": "665f1a2b3c4d5e6f7a8b9c01"
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/api/list": {
      "post": {
        "operationId": "mapping-api-read-list",
        "summary": "查询映射 API 列表",
        "description": "返回账户下所有配置的映射 API。",
        "tags": [
          "On-call/标签增强"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **映射数据查看**（`on-call`） 或 **映射数据管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/alert-enrichment/mapping-api-read-list",
          "metadata": {
            "sidebarTitle": "查询映射 API 列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MappingAPIListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 1,
                    "items": [
                      {
                        "api_id": "665f1a2b3c4d5e6f7a8b9c02",
                        "api_name": "CMDB API",
                        "description": "查询 CMDB 主机元数据",
                        "url": "https://cmdb.example.com/api/lookup",
                        "headers": {
                          "X-Token": "***"
                        },
                        "timeout": 2,
                        "retry_count": 1,
                        "insecure_skip_verify": false,
                        "status": "enabled",
                        "team_id": 0,
                        "creator_id": 80011,
                        "created_at": 1710000000,
                        "updated_at": 1710000000
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/EmptyRequest"
              },
              "example": {}
            }
          }
        }
      }
    },
    "/enrichment/mapping/api/info": {
      "post": {
        "operationId": "mapping-api-read-info",
        "summary": "查看映射 API 详情",
        "description": "根据映射 API ID 返回单个映射 API 的详细信息。",
        "tags": [
          "On-call/标签增强"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 映射 API 不存在时返回 `null`。",
          "href": "/zh/api-reference/on-call/alert-enrichment/mapping-api-read-info",
          "metadata": {
            "sidebarTitle": "查看映射 API 详情"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MappingAPIItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "api_id": "665f1a2b3c4d5e6f7a8b9c02",
                    "api_name": "CMDB API",
                    "url": "https://cmdb.example.com/api/lookup",
                    "timeout": 2,
                    "retry_count": 1,
                    "insecure_skip_verify": false,
                    "status": "enabled",
                    "creator_id": 80011,
                    "created_at": 1710000000,
                    "updated_at": 1710000000
                  }
                }
              }
            }
          },
          "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/MappingAPIIDRequest"
              },
              "example": {
                "api_id": "665f1a2b3c4d5e6f7a8b9c02"
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/api/create": {
      "post": {
        "operationId": "mapping-api-write-create",
        "summary": "创建映射 API",
        "description": "创建新的外部 HTTP API 端点，用于通过 HTTP 查询富化告警。",
        "tags": [
          "On-call/标签增强"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **映射数据管理**（`on-call`） |\n\n## 使用说明\n\n- `url` 须以 `http://` 或 `https://` 开头，SaaS 模式下不得解析为内网 IP。\n- `timeout` 为 HTTP 读取超时秒数（1–3，默认 2）。\n- `retry_count` 为失败重试次数（0–1，默认 0）。\n- SaaS 模式下，含敏感名称的请求头（如 `authorization`、`cookie`）将被拒绝。\n- 账户最多可创建 50 个映射 API。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/on-call/alert-enrichment/mapping-api-write-create",
          "metadata": {
            "sidebarTitle": "创建映射 API"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MappingAPICreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "api_id": "665f1a2b3c4d5e6f7a8b9c02",
                    "api_name": "CMDB API"
                  }
                }
              }
            }
          },
          "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/MappingAPICreateRequest"
              },
              "example": {
                "api_name": "CMDB API",
                "description": "查询 CMDB 主机元数据",
                "url": "https://cmdb.example.com/api/lookup",
                "headers": {
                  "X-Token": "mytoken"
                },
                "timeout": 2,
                "retry_count": 1,
                "insecure_skip_verify": false
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/api/update": {
      "post": {
        "operationId": "mapping-api-write-update",
        "summary": "更新映射 API",
        "description": "更新现有映射 API 的配置。",
        "tags": [
          "On-call/标签增强"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **映射数据管理**（`on-call`） |\n\n## 使用说明\n\n- 仅 API 创建者、账户管理员或所属团队成员可更新。\n- 所有可更新字段均为可选，仅更新提供的字段。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/on-call/alert-enrichment/mapping-api-write-update",
          "metadata": {
            "sidebarTitle": "更新映射 API"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/MappingAPIUpdateRequest"
              },
              "example": {
                "api_id": "665f1a2b3c4d5e6f7a8b9c02",
                "timeout": 3,
                "retry_count": 1
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/api/delete": {
      "post": {
        "operationId": "mapping-api-write-delete",
        "summary": "删除映射 API",
        "description": "删除映射 API。若该 API 被富化规则引用，则拒绝删除。",
        "tags": [
          "On-call/标签增强"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **映射数据管理**（`on-call`） |\n\n## 使用说明\n\n- 若 API 仍被引用，响应返回 HTTP 400，`refs` 字段列出所有阻止删除的引用。\n- 仅 API 创建者、账户管理员或所属团队成员可删除。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/on-call/alert-enrichment/mapping-api-write-delete",
          "metadata": {
            "sidebarTitle": "删除映射 API"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/MappingAPIIDRequest"
              },
              "example": {
                "api_id": "665f1a2b3c4d5e6f7a8b9c02"
              }
            }
          }
        }
      }
    },
    "/insight/alert/topk-by-label": {
      "post": {
        "operationId": "insightTopkAlertsByLabel",
        "summary": "查看按 check/resource 聚合的 Top-K 告警",
        "description": "返回指定时间范围内按 `check` 或 `resource` 聚合的 Top-K 告警组。",
        "tags": [
          "On-call/分析看板"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **分析看板查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/analytics/insight-topk-alerts-by-label",
          "metadata": {
            "sidebarTitle": "查看按 check/resource 聚合的 Top-K 告警"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/InsightAlertByLabelResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "label": "cpu-high",
                        "total_alert_cnt": 312,
                        "total_alert_event_cnt": 987
                      },
                      {
                        "label": "disk-full",
                        "total_alert_cnt": 178,
                        "total_alert_event_cnt": 452
                      },
                      {
                        "label": "memory-oom",
                        "total_alert_cnt": 94,
                        "total_alert_event_cnt": 231
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/InsightTopkAlertByLabelRequest"
              },
              "example": {
                "start_time": 1712000000,
                "end_time": 1712604800,
                "label": "check",
                "k": 10,
                "orderby": "total_alert_cnt"
              }
            }
          }
        }
      }
    },
    "/insight/account": {
      "post": {
        "operationId": "insightByAccount",
        "summary": "查看账户级别洞察",
        "description": "返回整个账户的聚合故障洞察指标。",
        "tags": [
          "On-call/分析看板"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **分析看板查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/analytics/insight-by-account",
          "metadata": {
            "sidebarTitle": "查看账户级别洞察"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/DimensionInsightResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "ts": 1740844800,
                        "total_incident_cnt": 2,
                        "total_incidents_acknowledged": 2,
                        "total_incidents_closed": 2,
                        "total_incidents_auto_closed": 0,
                        "total_incidents_manually_closed": 2,
                        "total_incidents_timeout_closed": 0,
                        "total_incidents_escalated": 0,
                        "total_incidents_manually_escalated": 0,
                        "total_incidents_timeout_escalated": 0,
                        "total_incidents_reassigned": 2,
                        "total_interruptions": 3,
                        "total_notifications": 6,
                        "total_engaged_seconds": 3317709,
                        "total_seconds_to_ack": 3317709,
                        "total_seconds_to_close": 3749514,
                        "mean_seconds_to_ack": 1658854.5,
                        "mean_seconds_to_close": 1874757,
                        "noise_reduction_pct": 0,
                        "acknowledgement_pct": 100,
                        "total_alert_cnt": 0,
                        "total_alert_event_cnt": 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/InsightQueryRequest"
              },
              "example": {
                "start_time": 1712000000,
                "end_time": 1712604800,
                "aggregate_unit": "day",
                "severities": [
                  "Critical",
                  "Warning"
                ]
              }
            }
          }
        }
      }
    },
    "/insight/incident/list": {
      "post": {
        "operationId": "insightIncidentList",
        "summary": "查询洞察故障列表",
        "description": "返回用于分析看板的故障分页列表，包含每条故障的处理效能指标。",
        "tags": [
          "On-call/分析看板"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **分析看板查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/analytics/insight-incident-list",
          "metadata": {
            "sidebarTitle": "查询洞察故障列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/InsightIncidentListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 2,
                    "has_next_page": false,
                    "items": [
                      {
                        "incident_id": "67ca560c381a4fedb664f5f8",
                        "title": "CPU spike on prod-web-01",
                        "description": "CPU usage exceeded 90% threshold",
                        "team_id": 4295771902131,
                        "team_name": "SRE Team",
                        "channel_id": 4321322010131,
                        "channel_name": "Production Alerts",
                        "progress": "Closed",
                        "severity": "Info",
                        "created_at": 1741313548,
                        "closed_by": "manually",
                        "seconds_to_ack": 1052085,
                        "seconds_to_close": 1483880,
                        "engaged_seconds": 1052085,
                        "hours": "work",
                        "responders": [
                          {
                            "person_id": 3790925372131,
                            "assigned_at": 1741313548,
                            "acknowledged_at": 1742365633,
                            "person_name": "alice",
                            "email": "alice@example.com"
                          }
                        ],
                        "assigned_to": {
                          "person_ids": [
                            3790925372131
                          ],
                          "escalate_rule_id": "000000000000000000000000",
                          "layer_idx": 0,
                          "type": "reassign"
                        },
                        "labels": {},
                        "fields": {},
                        "notifications": 4,
                        "interruptions": 2,
                        "assignments": 2,
                        "reassignments": 1,
                        "acknowledgements": 1,
                        "escalations": 0,
                        "timeout_escalations": 0,
                        "manual_escalations": 0,
                        "creator_id": 3790925372131,
                        "creator_name": "alice",
                        "owner_id": 3790925372132,
                        "owner_name": "bob",
                        "closer_id": 3790925372133,
                        "closer_name": "carol",
                        "snoozed_before": 1712608400,
                        "ever_muted": false,
                        "frequency": "rare"
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/InsightIncidentListRequest"
              },
              "example": {
                "start_time": 1712000000,
                "end_time": 1712604800,
                "p": 1,
                "limit": 20,
                "severities": [
                  "Critical"
                ]
              }
            }
          }
        }
      }
    },
    "/insight/incident/export": {
      "post": {
        "operationId": "insightIncidentExport",
        "summary": "导出洞察故障",
        "description": "将故障分析列表以 CSV 文件形式导出。CSV 列名和格式化值优先使用请求语言，其次使用成员语言和账户语言。响应为 CSV 字节流（`Content-Disposition: attachment`），不是 JSON 响应包。",
        "tags": [
          "On-call/分析看板"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **10 次/分钟**；**1 次/秒** |\n| 权限要求 | **分析看板查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/analytics/insight-incident-export",
          "metadata": {
            "sidebarTitle": "导出洞察故障"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/InsightIncidentExportRequest"
              },
              "example": {
                "start_time": 1712000000,
                "end_time": 1712604800,
                "severities": [
                  "Critical",
                  "Warning"
                ],
                "export_fields": [
                  "incident_id",
                  "title",
                  "severity",
                  "created_at",
                  "seconds_to_close"
                ],
                "description_html_to_text": true
              }
            }
          }
        }
      }
    },
    "/insight/channel": {
      "post": {
        "operationId": "insightByChannel",
        "summary": "查看协作空间洞察",
        "description": "返回按协作空间聚合的洞察指标。",
        "tags": [
          "On-call/分析看板"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **分析看板查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/analytics/insight-by-channel",
          "metadata": {
            "sidebarTitle": "查看协作空间洞察"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/DimensionInsightResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "ts": 1740844800,
                        "channel_id": 4321322010131,
                        "channel_name": "Production Alerts",
                        "total_incident_cnt": 2,
                        "total_incidents_acknowledged": 2,
                        "total_incidents_closed": 2,
                        "total_incidents_auto_closed": 0,
                        "total_incidents_manually_closed": 2,
                        "total_incidents_timeout_closed": 0,
                        "total_incidents_escalated": 0,
                        "total_incidents_manually_escalated": 0,
                        "total_incidents_timeout_escalated": 0,
                        "total_incidents_reassigned": 2,
                        "total_interruptions": 3,
                        "total_notifications": 6,
                        "total_engaged_seconds": 3317709,
                        "total_seconds_to_ack": 3317709,
                        "total_seconds_to_close": 3749514,
                        "mean_seconds_to_ack": 1658854.5,
                        "mean_seconds_to_close": 1874757,
                        "noise_reduction_pct": 0,
                        "acknowledgement_pct": 100,
                        "total_alert_cnt": 0,
                        "total_alert_event_cnt": 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/InsightQueryRequest"
              },
              "example": {
                "start_time": 1712000000,
                "end_time": 1712604800,
                "channel_ids": [
                  4321322010131
                ],
                "aggregate_unit": "day"
              }
            }
          }
        }
      }
    },
    "/insight/channel/export": {
      "post": {
        "operationId": "insightChannelExport",
        "summary": "导出协作空间洞察",
        "description": "将协作空间洞察指标以 CSV 文件形式导出。CSV 列名和格式化值优先使用请求语言，其次使用成员语言和账户语言。响应为 CSV 字节流（`Content-Disposition: attachment`），不是 JSON 响应包。",
        "tags": [
          "On-call/分析看板"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **10 次/分钟**；**1 次/秒** |\n| 权限要求 | **分析看板查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/analytics/insight-channel-export",
          "metadata": {
            "sidebarTitle": "导出协作空间洞察"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/InsightQueryRequest"
              },
              "example": {
                "start_time": 1712000000,
                "end_time": 1712604800,
                "channel_ids": [
                  4321322010131
                ],
                "severities": [
                  "Critical",
                  "Warning"
                ]
              }
            }
          }
        }
      }
    },
    "/insight/team": {
      "post": {
        "operationId": "insightByTeam",
        "summary": "查看团队洞察",
        "description": "返回按团队聚合的洞察指标。",
        "tags": [
          "On-call/分析看板"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **分析看板查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/analytics/insight-by-team",
          "metadata": {
            "sidebarTitle": "查看团队洞察"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/DimensionInsightResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "ts": 1740844800,
                        "team_id": 4295771902131,
                        "team_name": "SRE Team",
                        "total_incident_cnt": 2,
                        "total_incidents_acknowledged": 2,
                        "total_incidents_closed": 2,
                        "total_incidents_auto_closed": 0,
                        "total_incidents_manually_closed": 2,
                        "total_incidents_timeout_closed": 0,
                        "total_incidents_escalated": 0,
                        "total_incidents_manually_escalated": 0,
                        "total_incidents_timeout_escalated": 0,
                        "total_incidents_reassigned": 2,
                        "total_interruptions": 3,
                        "total_notifications": 6,
                        "total_engaged_seconds": 3317709,
                        "total_seconds_to_ack": 3317709,
                        "total_seconds_to_close": 3749514,
                        "mean_seconds_to_ack": 1658854.5,
                        "mean_seconds_to_close": 1874757,
                        "noise_reduction_pct": 0,
                        "acknowledgement_pct": 100,
                        "total_alert_cnt": 0,
                        "total_alert_event_cnt": 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/InsightQueryRequest"
              },
              "example": {
                "start_time": 1712000000,
                "end_time": 1712604800,
                "team_ids": [
                  4295771902131
                ],
                "aggregate_unit": "day"
              }
            }
          }
        }
      }
    },
    "/insight/team/export": {
      "post": {
        "operationId": "insightTeamExport",
        "summary": "导出团队洞察",
        "description": "将团队洞察指标以 CSV 文件形式导出。CSV 列名和格式化值优先使用请求语言，其次使用成员语言和账户语言。响应为 CSV 字节流（`Content-Disposition: attachment`），不是 JSON 响应包。",
        "tags": [
          "On-call/分析看板"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **10 次/分钟**；**1 次/秒** |\n| 权限要求 | **分析看板查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/analytics/insight-team-export",
          "metadata": {
            "sidebarTitle": "导出团队洞察"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/InsightQueryRequest"
              },
              "example": {
                "start_time": 1712000000,
                "end_time": 1712604800,
                "team_ids": [
                  4295771902131
                ],
                "severities": [
                  "Critical",
                  "Warning"
                ]
              }
            }
          }
        }
      }
    },
    "/insight/responder": {
      "post": {
        "operationId": "insightByResponder",
        "summary": "查看处理人员洞察",
        "description": "返回按处理人员聚合的洞察指标。",
        "tags": [
          "On-call/分析看板"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **分析看板查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/analytics/insight-by-responder",
          "metadata": {
            "sidebarTitle": "查看处理人员洞察"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ResponderInsightResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "ts": 1740844800,
                        "responder_id": 3790925372131,
                        "responder_name": "alice",
                        "total_incident_cnt": 1,
                        "total_incidents_acknowledged": 1,
                        "total_incidents_reassigned": 0,
                        "total_incidents_escalated": 0,
                        "total_incidents_timeout_escalated": 0,
                        "total_incidents_manually_escalated": 0,
                        "total_interruptions": 1,
                        "total_notifications": 2,
                        "total_engaged_seconds": 10,
                        "total_seconds_to_ack": 2265624,
                        "mean_seconds_to_ack": 2265624,
                        "acknowledgement_pct": 100
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/InsightQueryRequest"
              },
              "example": {
                "start_time": 1712000000,
                "end_time": 1712604800,
                "responder_ids": [
                  3790925372131
                ],
                "aggregate_unit": "day"
              }
            }
          }
        }
      }
    },
    "/insight/responder/export": {
      "post": {
        "operationId": "insightResponderExport",
        "summary": "导出处理人员洞察",
        "description": "将处理人员洞察指标以 CSV 文件形式导出。CSV 列名和格式化值优先使用请求语言，其次使用成员语言和账户语言。响应为 CSV 字节流（`Content-Disposition: attachment`），不是 JSON 响应包。",
        "tags": [
          "On-call/分析看板"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **10 次/分钟**；**1 次/秒** |\n| 权限要求 | **分析看板查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/analytics/insight-responder-export",
          "metadata": {
            "sidebarTitle": "导出处理人员洞察"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/InsightQueryRequest"
              },
              "example": {
                "start_time": 1712000000,
                "end_time": 1712604800,
                "responder_ids": [
                  3790925372131
                ],
                "severities": [
                  "Critical",
                  "Warning"
                ]
              }
            }
          }
        }
      }
    },
    "/status-page/change/info": {
      "get": {
        "operationId": "statusPageChangeInfo",
        "summary": "获取状态页事件详情",
        "description": "获取状态页指定事件（故障或维护）的详细信息。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-change-info",
          "metadata": {
            "sidebarTitle": "获取状态页事件详情"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StatusPageChangeItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "change_id": 5821693893131,
                    "page_id": 5750613685214,
                    "type": "incident",
                    "title": "Web Console Degraded Performance",
                    "description": "The issue has been resolved, and all services are operating normally.\n\nThank you for your patience.",
                    "status": "resolved",
                    "affected_components": [
                      {
                        "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
                        "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2",
                        "name": "Web Console",
                        "available_since_seconds": 1765349358,
                        "order_id": 1,
                        "status": "operational"
                      }
                    ],
                    "start_at_seconds": 1766736878,
                    "close_at_seconds": 1775529742,
                    "updates": [
                      {
                        "update_id": "01KDCVJQ88SZPHWPTDV2Z2AZW8",
                        "at_seconds": 1766736876,
                        "status": "investigating",
                        "description": "We are currently investigating an issue affecting some services.",
                        "component_changes": [
                          {
                            "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
                            "component_name": "Web Console",
                            "status": "degraded"
                          }
                        ]
                      },
                      {
                        "update_id": "01KNJX3KW873ZZSRZC14SGFYS3",
                        "at_seconds": 1775529742,
                        "status": "resolved",
                        "description": "The issue has been resolved, and all services are operating normally.",
                        "component_changes": [
                          {
                            "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
                            "component_name": "Web Console",
                            "status": "operational"
                          }
                        ]
                      }
                    ],
                    "notify_subscribers": true
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "parameters": [
          {
            "name": "page_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Status page ID."
          },
          {
            "name": "change_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Event (change) ID."
          }
        ]
      }
    },
    "/status-page/change/list": {
      "get": {
        "operationId": "statusPageChangeList",
        "summary": "查询状态页事件列表",
        "description": "查询状态页的事件列表（故障和维护）。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-change-list",
          "metadata": {
            "sidebarTitle": "查询状态页事件列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StatusPageChangeListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "change_id": 5821693893131,
                        "page_id": 5750613685214,
                        "type": "incident",
                        "title": "Web Console Degraded Performance",
                        "description": "The issue has been resolved, and all services are operating normally.",
                        "status": "resolved",
                        "affected_components": [
                          {
                            "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
                            "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2",
                            "name": "Web Console",
                            "available_since_seconds": 1765349358,
                            "order_id": 1,
                            "status": "operational"
                          }
                        ],
                        "start_at_seconds": 1766736878,
                        "close_at_seconds": 1775529742,
                        "updates": [
                          {
                            "update_id": "01KDCVJQ88SZPHWPTDV2Z2AZW8",
                            "at_seconds": 1766736876,
                            "status": "investigating",
                            "description": "We are currently investigating an issue affecting some services.",
                            "component_changes": [
                              {
                                "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
                                "component_name": "Web Console",
                                "status": "degraded"
                              }
                            ]
                          },
                          {
                            "update_id": "01KNJX3KW873ZZSRZC14SGFYS3",
                            "at_seconds": 1775529742,
                            "status": "resolved",
                            "description": "The issue has been resolved, and all services are operating normally.",
                            "component_changes": [
                              {
                                "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
                                "component_name": "Web Console",
                                "status": "operational"
                              }
                            ]
                          }
                        ],
                        "notify_subscribers": true
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "parameters": [
          {
            "name": "page_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Status page ID."
          },
          {
            "name": "start_at_seconds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Filter events started at or after this unix timestamp (seconds)."
          },
          {
            "name": "end_at_seconds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Filter events started at or before this unix timestamp (seconds)."
          },
          {
            "name": "type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "incident",
                "maintenance"
              ]
            },
            "description": "Event type filter. Required."
          },
          {
            "name": "status",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "investigating",
                "identified",
                "monitoring",
                "resolved",
                "scheduled",
                "ongoing",
                "completed"
              ]
            },
            "description": "Event status filter. Required. Must be a status valid for the given `type` (e.g. `investigating`/`identified`/`monitoring`/`resolved` for incidents; `scheduled`/`ongoing`/`completed` for maintenances)."
          }
        ]
      }
    },
    "/status-page/change/active/list": {
      "get": {
        "operationId": "statusPageChangeActiveList",
        "summary": "查询状态页活跃事件列表",
        "description": "查询状态页指定类型的进行中（非终态）事件列表。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-change-active-list",
          "metadata": {
            "sidebarTitle": "查询状态页活跃事件列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StatusPageChangeListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "change_id": 5821693893131,
                        "page_id": 5750613685214,
                        "type": "incident",
                        "title": "Web Console Degraded Performance",
                        "description": "We are currently investigating an issue affecting some services.",
                        "status": "investigating",
                        "affected_components": [
                          {
                            "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
                            "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2",
                            "name": "Web Console",
                            "available_since_seconds": 1765349358,
                            "order_id": 1,
                            "status": "degraded"
                          }
                        ],
                        "start_at_seconds": 1766736878,
                        "updates": [
                          {
                            "update_id": "01KDCVJQ88SZPHWPTDV2Z2AZW8",
                            "at_seconds": 1766736876,
                            "status": "investigating",
                            "description": "We are currently investigating an issue affecting some services.",
                            "component_changes": [
                              {
                                "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
                                "component_name": "Web Console",
                                "status": "degraded"
                              }
                            ]
                          }
                        ],
                        "notify_subscribers": true
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "parameters": [
          {
            "name": "page_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "状态页 ID。"
          },
          {
            "name": "type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "incident",
                "maintenance"
              ]
            },
            "description": "事件类型筛选，必填。仅返回进行中（非终态）事件：incident 含 investigating/identified/monitoring，maintenance 含 scheduled/ongoing。"
          }
        ]
      }
    },
    "/status-page/change/create": {
      "post": {
        "operationId": "statusPageChangeCreate",
        "summary": "创建状态页事件",
        "description": "在状态页上创建新的故障或维护事件。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **状态页面事件管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-change-create",
          "metadata": {
            "sidebarTitle": "创建状态页事件"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StatusPageChangeCreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "change_id": 6294539747131,
                    "change_name": "API Test Incident"
                  }
                }
              }
            }
          },
          "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/CreateStatusPageChangeRequest"
              },
              "example": {
                "page_id": 5750613685214,
                "type": "incident",
                "title": "Web Console Degraded Performance",
                "description": "We are investigating degraded performance affecting the web console.",
                "status": "investigating",
                "start_at_seconds": 1712000000,
                "notify_subscribers": true,
                "updates": [
                  {
                    "status": "investigating",
                    "description": "We are currently investigating an issue affecting some users.",
                    "component_changes": [
                      {
                        "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
                        "status": "degraded"
                      }
                    ]
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/status-page/change/update": {
      "post": {
        "operationId": "statusPageChangeUpdate",
        "summary": "更新状态页事件",
        "description": "更新已有状态页事件。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **状态页面事件管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-change-update",
          "metadata": {
            "sidebarTitle": "更新状态页事件"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/UpdateStatusPageChangeRequest"
              },
              "example": {
                "page_id": 5750613685214,
                "change_id": 5821693893131,
                "title": "Web Console Degraded Performance (Updated)"
              }
            }
          }
        }
      }
    },
    "/status-page/change/delete": {
      "post": {
        "operationId": "statusPageChangeDelete",
        "summary": "删除状态页事件",
        "description": "删除指定的状态页事件。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **状态页面事件管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-change-delete",
          "metadata": {
            "sidebarTitle": "删除状态页事件"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/DeleteStatusPageChangeRequest"
              },
              "example": {
                "page_id": 5750613685214,
                "change_id": 5821693893131
              }
            }
          }
        }
      }
    },
    "/status-page/change/timeline/create": {
      "post": {
        "operationId": "statusPageChangeTimelineCreate",
        "summary": "创建事件时间线",
        "description": "在状态页事件上添加时间线更新。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **状态页面事件管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-change-timeline-create",
          "metadata": {
            "sidebarTitle": "创建事件时间线"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StatusPageChangeTimelineCreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "update_id": "01KP0311872NVYFRRQ82FWXAP4"
                  }
                }
              }
            }
          },
          "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/CreateStatusPageChangeTimelineRequest"
              },
              "example": {
                "page_id": 5750613685214,
                "change_id": 5821693893131,
                "status": "identified",
                "description": "We have identified the root cause and are working on a fix.",
                "at_seconds": 1712003600,
                "component_changes": [
                  {
                    "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
                    "status": "partial_outage"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/status-page/change/timeline/update": {
      "post": {
        "operationId": "statusPageChangeTimelineUpdate",
        "summary": "更新事件时间线",
        "description": "更新状态页事件的时间线条目。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **状态页面事件管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-change-timeline-update",
          "metadata": {
            "sidebarTitle": "更新事件时间线"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/UpdateStatusPageChangeTimelineRequest"
              },
              "example": {
                "page_id": 5750613685214,
                "change_id": 5821693893131,
                "update_id": "01KP0311872NVYFRRQ82FWXAP4",
                "description": "Corrected description: root cause identified in database layer.",
                "at_seconds": 1712003600
              }
            }
          }
        }
      }
    },
    "/status-page/change/timeline/delete": {
      "post": {
        "operationId": "statusPageChangeTimelineDelete",
        "summary": "删除事件时间线",
        "description": "从状态页事件中删除时间线条目。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **状态页面事件管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-change-timeline-delete",
          "metadata": {
            "sidebarTitle": "删除事件时间线"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/DeleteStatusPageChangeTimelineRequest"
              },
              "example": {
                "page_id": 5750613685214,
                "change_id": 5821693893131,
                "update_id": "01KP0311872NVYFRRQ82FWXAP4"
              }
            }
          }
        }
      }
    },
    "/status-page/subscriber/list": {
      "get": {
        "operationId": "statusPageSubscriberList",
        "summary": "查询状态页订阅者列表",
        "description": "查询已订阅状态页通知的用户列表。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-subscriber-list",
          "metadata": {
            "sidebarTitle": "查询状态页订阅者列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StatusPageSubscriberListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 2,
                    "has_next_page": false,
                    "items": [
                      {
                        "recipient": "alice@example.com",
                        "method": "email",
                        "components": [],
                        "all": true,
                        "locale": "zh-CN"
                      },
                      {
                        "recipient": "bob@example.com",
                        "method": "email",
                        "components": [],
                        "all": true,
                        "locale": "en-US"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "parameters": [
          {
            "name": "page_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Status page ID."
          },
          {
            "name": "component_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated component IDs to filter subscribers by."
          },
          {
            "name": "p",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "default": 1
            },
            "description": "Page number (1-based)."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "description": "Page size (1-100)."
          }
        ]
      }
    },
    "/status-page/subscriber/import": {
      "post": {
        "operationId": "statusPageSubscriberImport",
        "summary": "批量导入订阅者",
        "description": "批量导入状态页的订阅者。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **20 次/分钟**；**2 次/秒** |\n| 权限要求 | **状态页面管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-subscriber-import",
          "metadata": {
            "sidebarTitle": "批量导入订阅者"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ImportStatusPageSubscribersRequest"
              },
              "example": {
                "page_id": 5750613685214,
                "method": "email",
                "subscribers": [
                  {
                    "recipient": "alice@example.com",
                    "all": true,
                    "locale": "en-US"
                  },
                  {
                    "recipient": "bob@example.com",
                    "component_ids": [
                      "01KC3GAZ6ZJE40H55GM31RPWZE"
                    ],
                    "all": false,
                    "locale": "zh-CN"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/status-page/subscriber/export": {
      "post": {
        "operationId": "statusPageSubscriberExport",
        "summary": "导出订阅者",
        "description": "以 CSV 附件形式导出状态页的订阅者列表。响应为 `text/csv` 文件，包含列：Method、Recipient、Components、Subscribe All、Locale。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **10 次/分钟**；**1 次/秒** |\n| 权限要求 | **状态页面管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-subscriber-export",
          "metadata": {
            "sidebarTitle": "导出订阅者"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StatusPageSubscriberExportResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": "Method,Recipient,Components,Subscribe All,Locale\nemail,alice@example.com,,true,zh-CN\nemail,bob@example.com,,true,en-US"
                }
              }
            }
          },
          "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/ExportStatusPageSubscribersRequest"
              },
              "example": {
                "page_id": 5750613685214
              }
            }
          }
        }
      }
    },
    "/status-page/migrate-structure": {
      "post": {
        "operationId": "statusPageMigrateStructure",
        "summary": "迁移状态页结构",
        "description": "启动迁移任务，从 Atlassian Statuspage 导入结构和历史事件到新的 Flashduty 状态页。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **状态页面管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-migrate-structure",
          "metadata": {
            "sidebarTitle": "迁移状态页结构"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StatusPageMigrationStartResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "job_id": "01KP0311872NVYFRRQ82FW0001"
                  }
                }
              }
            }
          },
          "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/MigrateStatusPageStructureRequest"
              },
              "example": {
                "api_key": "sk-stsp-xxxxxxxxxxxxxxxxxxxx",
                "source_page_id": "abcdefghij"
              }
            }
          }
        }
      }
    },
    "/status-page/migrate-email-subscribers": {
      "post": {
        "operationId": "statusPageMigrateEmailSubscribers",
        "summary": "迁移邮件订阅者",
        "description": "启动迁移任务，从 Atlassian Statuspage 将邮件订阅者导入到已有的 Flashduty 状态页。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **状态页面管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-migrate-email-subscribers",
          "metadata": {
            "sidebarTitle": "迁移邮件订阅者"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StatusPageMigrationStartResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "job_id": "01KP0311872NVYFRRQ82FW0002"
                  }
                }
              }
            }
          },
          "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/MigrateStatusPageEmailSubscribersRequest"
              },
              "example": {
                "api_key": "sk-stsp-xxxxxxxxxxxxxxxxxxxx",
                "source_page_id": "abcdefghij",
                "target_page_id": 5750613685214
              }
            }
          }
        }
      }
    },
    "/status-page/migration/status": {
      "get": {
        "operationId": "statusPageMigrationStatus",
        "summary": "获取迁移状态",
        "description": "获取状态页迁移任务的当前状态和进度。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-migration-status",
          "metadata": {
            "sidebarTitle": "获取迁移状态"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StatusPageMigrationJob"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "job_id": "01KP0311872NVYFRRQ82FW0001",
                    "account_id": 2451002751131,
                    "source_page_id": "abcdefghij",
                    "target_page_id": 5750613685214,
                    "phase": "history",
                    "status": "completed",
                    "progress": {
                      "total_steps": 5,
                      "completed_steps": 5,
                      "components_imported": 8,
                      "sections_imported": 3,
                      "incidents_imported": 12,
                      "maintenances_imported": 2,
                      "subscribers_imported": 0,
                      "templates_imported": 0,
                      "subscribers_skipped": 0
                    },
                    "created_at": 1766736878,
                    "updated_at": 1766740000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "parameters": [
          {
            "name": "job_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Migration job ID returned by `migrate-structure` or `migrate-email-subscribers`."
          }
        ]
      }
    },
    "/status-page/migration/cancel": {
      "post": {
        "operationId": "statusPageMigrationCancel",
        "summary": "取消状态页迁移",
        "description": "取消正在进行的状态页迁移任务。只能取消处于 `running` 状态的任务。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **状态页面管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-migration-cancel",
          "metadata": {
            "sidebarTitle": "取消状态页迁移"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/CancelStatusPageMigrationRequest"
              },
              "example": {
                "job_id": "01KP0311872NVYFRRQ82FW0001"
              }
            }
          }
        }
      }
    },
    "/monit/rule/list/basic": {
      "post": {
        "operationId": "monit-rule-read-list",
        "summary": "查询告警规则列表",
        "description": "返回指定文件夹下所有告警规则的基础信息。如需完整规则详情，请调用 `POST /monit/rule/info`。",
        "tags": [
          "Monitors/告警规则"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **告警规则查看**（`monit`） |\n\n## 使用说明\n\n- 将 `folder_id` 设为 `0` 可列出当前用户有权查看的所有文件夹下的规则。\n- `triggered` 字段表示该规则当前是否有活跃告警。",
          "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-list",
          "metadata": {
            "sidebarTitle": "查询告警规则列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleBasicListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "id": 50001,
                      "folder_id": 100,
                      "name": "CPU 过高",
                      "ds_type": "prometheus",
                      "enabled": true,
                      "triggered": true,
                      "created_at": 1710000000
                    }
                  ]
                }
              }
            }
          },
          "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/RuleListRequest"
              },
              "example": {
                "folder_id": 100
              }
            }
          }
        }
      }
    },
    "/monit/rule/info": {
      "post": {
        "operationId": "monit-rule-read-info",
        "summary": "查看告警规则详情",
        "description": "通过 ID 返回告警规则的完整配置，包括规则查询、阈值和通知设置。",
        "tags": [
          "Monitors/告警规则"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **告警规则查看**（`monit`） |",
          "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-info",
          "metadata": {
            "sidebarTitle": "查看告警规则详情"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertRuleInfoResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "id": 50001,
                    "folder_id": 100,
                    "name": "CPU 过高",
                    "ds_type": "prometheus",
                    "ds_list": [
                      "prometheus*"
                    ],
                    "enabled": true,
                    "cron_pattern": "* * * * *",
                    "channel_ids": [
                      20001
                    ]
                  }
                }
              }
            }
          },
          "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/RuleIDRequest"
              },
              "example": {
                "id": 50001
              }
            }
          }
        }
      }
    },
    "/monit/rule/create": {
      "post": {
        "operationId": "monit-rule-write-create",
        "summary": "创建告警规则",
        "description": "创建新的告警规则，返回带有分配 ID 的已创建规则。",
        "tags": [
          "Monitors/告警规则"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **告警规则管理**（`monit`） |\n\n## 使用说明\n\n- `name`、`ds_type`、`cron_pattern` 和 `rule_configs.queries` 为必填项。\n- `ds_list`（支持通配符）或 `ds_ids` 必须有一个非空。\n- `cron_pattern` 使用标准 5 字段 cron 语法。\n- `channel_ids` 可为空，告警将通过全局集成路由。\n- `name` 在 `folder_id` 内必须唯一；重名会返回 `InvalidParameter`。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-create",
          "metadata": {
            "sidebarTitle": "创建告警规则"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertRule"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "id": 50001,
                    "folder_id": 100,
                    "name": "CPU 过高",
                    "ds_type": "prometheus",
                    "created_at": 1712000000
                  }
                }
              }
            }
          },
          "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/AlertRule"
              },
              "example": {
                "folder_id": 100,
                "name": "CPU 过高",
                "ds_type": "prometheus",
                "ds_list": [
                  "prometheus*"
                ],
                "enabled": true,
                "cron_pattern": "* * * * *",
                "channel_ids": [
                  20001
                ],
                "rule_configs": {
                  "queries": [
                    {
                      "name": "A",
                      "expr": "avg(cpu_usage_idle) < 10"
                    }
                  ],
                  "check_threshold": {
                    "enabled": true,
                    "critical": "A",
                    "alerting_check_times": 1,
                    "recovery_check_times": 1,
                    "push_recovery_event": true,
                    "recovery": {
                      "mode": "invert"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monit/rule/update": {
      "post": {
        "operationId": "monit-rule-write-update",
        "summary": "更新告警规则",
        "description": "替换已有告警规则的完整配置，所有字段将被覆盖。",
        "tags": [
          "Monitors/告警规则"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **告警规则管理**（`monit`） |\n\n## 使用说明\n\n- `id` 为必填项。其他字段与 `POST /monit/rule/create` 的规则相同。\n- 名称在所在文件夹内必须保持唯一；重名会返回 `InvalidParameter`。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-update",
          "metadata": {
            "sidebarTitle": "更新告警规则"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertRule"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "id": 50001,
                    "updated_at": 1712100000
                  }
                }
              }
            }
          },
          "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/AlertRule"
              },
              "example": {
                "id": 50001,
                "folder_id": 100,
                "name": "CPU 过高 v2",
                "ds_type": "prometheus",
                "ds_list": [
                  "prometheus*"
                ],
                "enabled": true,
                "cron_pattern": "* * * * *",
                "rule_configs": {
                  "queries": [
                    {
                      "name": "A",
                      "expr": "avg(cpu_usage_idle) < 5"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/monit/rule/delete": {
      "post": {
        "operationId": "monit-rule-write-delete",
        "summary": "删除告警规则",
        "description": "通过 ID 删除单条告警规则。",
        "tags": [
          "Monitors/告警规则"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **告警规则管理**（`monit`） |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-delete",
          "metadata": {
            "sidebarTitle": "删除告警规则"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleEmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/RuleIDRequest"
              },
              "example": {
                "id": 50001
              }
            }
          }
        }
      }
    },
    "/monit/rule/delete/batch": {
      "post": {
        "operationId": "monit-rule-write-delete-batch",
        "summary": "批量删除告警规则",
        "description": "在单次请求中删除多条告警规则。",
        "tags": [
          "Monitors/告警规则"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **30 次/分钟**；**5 次/秒** |\n| 权限要求 | **告警规则管理**（`monit`） |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-delete-batch",
          "metadata": {
            "sidebarTitle": "批量删除告警规则"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleEmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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,
                  50002
                ]
              }
            }
          }
        }
      }
    },
    "/monit/rule/update/fields": {
      "post": {
        "operationId": "monit-rule-write-fields-update",
        "summary": "批量更新规则字段",
        "description": "一次性更新多条告警规则的特定字段，仅应用 `fields` 列表中指定的字段。",
        "tags": [
          "Monitors/告警规则"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **告警规则管理**（`monit`） |\n\n## 使用说明\n\n- 在 `fields` 数组中指定要更新的字段名，如 `[\"enabled\", \"channel_ids\"]`。\n- 仅更新指定字段，其他字段保持不变。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-fields-update",
          "metadata": {
            "sidebarTitle": "批量更新规则字段"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleNameMessageListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "name": "CPU 过高",
                      "message": ""
                    },
                    {
                      "name": "磁盘告警",
                      "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/RuleFieldsUpdateRequest"
              },
              "example": {
                "ids": [
                  50001,
                  50002
                ],
                "fields": [
                  "enabled"
                ],
                "enabled": false
              }
            }
          }
        }
      }
    },
    "/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 过高",
                      "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 过高",
                  "ds_type": "prometheus",
                  "ds_list": [
                    "prometheus*"
                  ],
                  "enabled": true,
                  "cron_pattern": "* * * * *",
                  "rule_configs": {
                    "queries": [
                      {
                        "name": "A",
                        "expr": "avg(cpu_usage_idle) < 10"
                      }
                    ]
                  }
                }
              ]
            }
          }
        }
      }
    },
    "/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| 速率限制 | 每个账户 **10 次/分钟**；**1 次/秒** |\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 过高",
                      "ds_type": "prometheus",
                      "ds_list": [
                        "prometheus*"
                      ],
                      "enabled": true,
                      "cron_pattern": "* * * * *"
                    }
                  ]
                }
              }
            }
          },
          "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/rule/move": {
      "post": {
        "operationId": "monit-rule-write-move",
        "summary": "移动告警规则到文件夹",
        "description": "将一条或多条告警规则移动到其他文件夹。",
        "tags": [
          "Monitors/告警规则"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **告警规则管理**（`monit`） |\n\n## 使用说明\n\n- 如果目标文件夹中已存在同名规则，该规则会被跳过；请检查每条结果的 `message` 以识别冲突。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-move",
          "metadata": {
            "sidebarTitle": "移动告警规则到文件夹"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleNameMessageListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "name": "CPU 过高",
                      "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/RuleMoveRequest"
              },
              "example": {
                "ids": [
                  50001,
                  50002
                ],
                "dest_folder_id": 200
              }
            }
          }
        }
      }
    },
    "/monit/rule/status": {
      "post": {
        "operationId": "monit-rule-write-status",
        "summary": "查看文件夹下规则触发状态",
        "description": "返回指定文件夹节点及其子孙节点下所有规则的触发情况汇总。",
        "tags": [
          "Monitors/告警规则"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **告警规则管理**（`monit`） |\n\n## 使用说明\n\n- 将 `folder_id` 设为 `0` 可获取所有文件夹的汇总。\n- 若文件夹包含规则数量过多，为保护系统会跳过计算。",
          "href": "/zh/api-reference/monitors/alert-rules/monit-rule-write-status",
          "metadata": {
            "sidebarTitle": "查看文件夹下规则触发状态"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleStatusResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "folder_id": 100,
                      "folder_name": "生产环境",
                      "rule_total": 10,
                      "triggered_rule_count": 2
                    }
                  ]
                }
              }
            }
          },
          "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/RuleFolderIDRequest"
              },
              "example": {
                "folder_id": 100
              }
            }
          }
        }
      }
    },
    "/monit/rule/audits": {
      "post": {
        "operationId": "monit-rule-read-audits",
        "summary": "查询规则变更历史",
        "description": "返回告警规则的变更历史（审计记录）。",
        "tags": [
          "Monitors/告警规则"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **告警规则查看**（`monit`） |",
          "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-audits",
          "metadata": {
            "sidebarTitle": "查询规则变更历史"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleAuditListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "id": 9001,
                      "account_id": 10023,
                      "alert_rule_id": 50001,
                      "action": "update",
                      "creator_id": 80011,
                      "creator_name": "Alice",
                      "created_at": 1712000000
                    }
                  ]
                }
              }
            }
          },
          "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/RuleIDRequest"
              },
              "example": {
                "id": 50001
              }
            }
          }
        }
      }
    },
    "/monit/rule/audit/detail": {
      "post": {
        "operationId": "monit-rule-read-audit-detail",
        "summary": "查看规则审计快照",
        "description": "返回审计记录（包含 `content` 字段，即该时间点规则配置的 JSON 字符串快照）。",
        "tags": [
          "Monitors/告警规则"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **告警规则查看**（`monit`） |\n\n## 使用说明\n\n- 传入来自 `POST /monit/rule/audits` 的审计记录 `id`（非规则 `id`）。\n- `content` 为 JSON 字符串，解析后可获得完整的规则快照。",
          "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-audit-detail",
          "metadata": {
            "sidebarTitle": "查看规则审计快照"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertRuleAudit"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "id": 9001,
                    "account_id": 10023,
                    "alert_rule_id": 50001,
                    "action": "update",
                    "content": "{\"id\":50001,\"name\":\"CPU 过高\"}",
                    "creator_id": 80011,
                    "creator_name": "Alice",
                    "created_at": 1712000000
                  }
                }
              }
            }
          },
          "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/AuditRecordIDRequest"
              },
              "example": {
                "id": 9001
              }
            }
          }
        }
      }
    },
    "/monit/rule/dstypes": {
      "post": {
        "operationId": "monit-rule-read-dstypes",
        "summary": "查询可用的数据源类型",
        "description": "返回当前账户在创建告警规则时可使用的数据源类型（`DSType` 记录）列表，包括全局类型和账户自定义类型。",
        "tags": [
          "Monitors/告警规则"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **告警规则查看**（`monit`） |",
          "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-dstypes",
          "metadata": {
            "sidebarTitle": "查询可用的数据源类型"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleDsTypesResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "id": 1,
                      "name": "Prometheus",
                      "ident": "prometheus",
                      "account_id": 0,
                      "weight": 100
                    }
                  ]
                }
              }
            }
          },
          "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/RuleEmptyRequest"
              },
              "example": {}
            }
          }
        }
      }
    },
    "/monit/rule/counter/total": {
      "post": {
        "operationId": "monit-rule-read-counter-total",
        "summary": "查看规则数量时序",
        "description": "返回当前账户下规则总数的历史时序数据，每个 `clock` 时间戳对应一个采样。",
        "tags": [
          "Monitors/告警规则"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **告警规则查看**（`monit`） |\n\n## 使用说明\n\n- 每一项为一次历史快照：`num` 为 `clock`（Unix 时间戳，秒）时刻的规则总数。",
          "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-counter-total",
          "metadata": {
            "sidebarTitle": "查看规则数量时序"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleCounterTotalResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "id": 1,
                      "account_id": 10023,
                      "num": 50,
                      "clock": 1712000000
                    }
                  ]
                }
              }
            }
          },
          "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/RuleEmptyRequest"
              },
              "example": {}
            }
          }
        }
      }
    },
    "/monit/rule/counter/node": {
      "post": {
        "operationId": "monit-rule-read-counter-node",
        "summary": "按文件夹节点查询规则统计",
        "description": "返回一个对象，key 为顶层文件夹名称，value 为该文件夹及其子孙下的规则总数。",
        "tags": [
          "Monitors/告警规则"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **告警规则查看**（`monit`） |",
          "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-counter-node",
          "metadata": {
            "sidebarTitle": "按文件夹节点查询规则统计"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleCounterNodeResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "生产环境": 10,
                    "预发环境": 3
                  }
                }
              }
            }
          },
          "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/RuleEmptyRequest"
              },
              "example": {}
            }
          }
        }
      }
    },
    "/monit/rule/counter/channel": {
      "post": {
        "operationId": "monit-rule-read-counter-channel",
        "summary": "按协作空间查询规则统计",
        "description": "返回一个对象，key 为协作空间名称，value 为将告警路由到该协作空间的规则数量。若协作空间名称无法解析，则以协作空间 ID（字符串形式）作为 key。",
        "tags": [
          "Monitors/告警规则"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **告警规则查看**（`monit`） |",
          "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-counter-channel",
          "metadata": {
            "sidebarTitle": "按协作空间查询规则统计"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleCounterChannelResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "生产": 8
                  }
                }
              }
            }
          },
          "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/RuleEmptyRequest"
              },
              "example": {}
            }
          }
        }
      }
    },
    "/monit/rule/counter/status": {
      "post": {
        "operationId": "monit-rule-read-counter-status",
        "summary": "查看顶层文件夹规则状态统计",
        "description": "返回所有顶层文件夹节点的规则触发状态汇总，用于概览看板。",
        "tags": [
          "Monitors/告警规则"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **告警规则查看**（`monit`） |",
          "href": "/zh/api-reference/monitors/alert-rules/monit-rule-read-counter-status",
          "metadata": {
            "sidebarTitle": "查看顶层文件夹规则状态统计"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleStatusResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "folder_id": 100,
                      "folder_name": "生产环境",
                      "rule_total": 10,
                      "triggered_rule_count": 2
                    }
                  ]
                }
              }
            }
          },
          "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/RuleEmptyRequest"
              },
              "example": {}
            }
          }
        }
      }
    },
    "/monit/datasource/list": {
      "post": {
        "operationId": "monit-datasource-read-list",
        "summary": "查询数据源列表",
        "description": "返回当前账户下的所有数据源，可通过 `type_ident` 过滤类型。",
        "tags": [
          "Monitors/告警数据源"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **数据源查看**（`monit`） |\n\n## 使用说明\n\n- 省略 `type_ident` 可返回所有类型的数据源。\n- 列表响应中不返回敏感凭证字段（密码、密钥）。",
          "href": "/zh/api-reference/monitors/data-sources/monit-datasource-read-list",
          "metadata": {
            "sidebarTitle": "查询数据源列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/DataSourceListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "id": 10,
                      "account_id": 10023,
                      "type_ident": "prometheus",
                      "name": "生产 Prometheus",
                      "enabled": true,
                      "note": "生产环境 Prometheus",
                      "address": "http://prometheus.example.com:9090",
                      "edge_cluster_name": "default",
                      "updated_at": 1712000000
                    }
                  ]
                }
              }
            }
          },
          "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/DataSourceListRequest"
              },
              "example": {
                "type": "prometheus"
              }
            }
          }
        }
      }
    },
    "/monit/datasource/info": {
      "post": {
        "operationId": "monit-datasource-read-info",
        "summary": "查看数据源详情",
        "description": "通过 ID 获取单个数据源的完整信息，包括 `payload` 配置。",
        "tags": [
          "Monitors/告警数据源"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **数据源查看**（`monit`） |",
          "href": "/zh/api-reference/monitors/data-sources/monit-datasource-read-info",
          "metadata": {
            "sidebarTitle": "查看数据源详情"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/DataSourceItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "id": 10,
                    "account_id": 10023,
                    "type_ident": "prometheus",
                    "name": "生产 Prometheus",
                    "enabled": true,
                    "note": "生产环境 Prometheus",
                    "address": "http://prometheus.example.com:9090",
                    "payload": {
                      "prometheus": {
                        "basic_auth_enabled": false,
                        "basic_auth_username": "",
                        "basic_auth_password": "",
                        "tls_skip_verify": false
                      }
                    },
                    "edge_cluster_name": "default",
                    "updated_at": 1712000000
                  }
                }
              }
            }
          },
          "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/IDRequest"
              },
              "example": {
                "id": 10
              }
            }
          }
        }
      }
    },
    "/monit/datasource/create": {
      "post": {
        "operationId": "monit-datasource-write-create",
        "summary": "创建数据源",
        "description": "创建新的监控数据源，`payload` 中须包含对应类型的配置块。",
        "tags": [
          "Monitors/告警数据源"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **数据源管理**（`monit`） |\n\n## 使用说明\n\n- `type_ident` 必须为以下之一：`prometheus`、`loki`、`mysql`、`oracle`、`postgres`、`clickhouse`、`elasticsearch`、`sls`、`victorialogs`。\n- `edge_cluster_name` 指定使用该数据源进行规则评估的 Monitors Edge 集群。\n- 对于 `elasticsearch`，`payload.elasticsearch.deployment` 须设为 `cloud` 或 `self-managed`。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/monitors/data-sources/monit-datasource-write-create",
          "metadata": {
            "sidebarTitle": "创建数据源"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/DataSourceItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "id": 10,
                    "type_ident": "prometheus",
                    "name": "生产 Prometheus",
                    "enabled": true,
                    "edge_cluster_name": "default",
                    "updated_at": 1712000000
                  }
                }
              }
            }
          },
          "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/DataSourceUpsertRequest"
              },
              "example": {
                "type_ident": "prometheus",
                "name": "生产 Prometheus",
                "note": "生产环境 Prometheus",
                "address": "http://prometheus.example.com:9090",
                "edge_cluster_name": "default",
                "payload": {
                  "prometheus": {
                    "basic_auth_enabled": false
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monit/datasource/update": {
      "post": {
        "operationId": "monit-datasource-write-update",
        "summary": "更新数据源",
        "description": "更新已有数据源，需提供 `id` 及待修改的字段。",
        "tags": [
          "Monitors/告警数据源"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **数据源管理**（`monit`） |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/monitors/data-sources/monit-datasource-write-update",
          "metadata": {
            "sidebarTitle": "更新数据源"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/DataSourceItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "id": 10,
                    "type_ident": "prometheus",
                    "name": "生产 Prometheus v2",
                    "enabled": true,
                    "edge_cluster_name": "default",
                    "updated_at": 1712100000
                  }
                }
              }
            }
          },
          "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/DataSourceUpsertRequest"
              },
              "example": {
                "id": 10,
                "type_ident": "prometheus",
                "name": "生产 Prometheus v2",
                "note": "已更新",
                "address": "http://prometheus-v2.example.com:9090",
                "edge_cluster_name": "default",
                "payload": {
                  "prometheus": {
                    "basic_auth_enabled": false
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monit/datasource/delete": {
      "post": {
        "operationId": "monit-datasource-write-delete",
        "summary": "删除数据源",
        "description": "通过 ID 删除数据源。引用该数据源的告警规则需提前更新或删除。",
        "tags": [
          "Monitors/告警数据源"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **数据源管理**（`monit`） |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/monitors/data-sources/monit-datasource-write-delete",
          "metadata": {
            "sidebarTitle": "删除数据源"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/IDRequest"
              },
              "example": {
                "id": 10
              }
            }
          }
        }
      }
    },
    "/monit/datasource/sls/projects": {
      "post": {
        "operationId": "monit-datasource-read-sls-projects",
        "summary": "查询 SLS 项目列表",
        "description": "列出指定 SLS 数据源中可用的阿里云日志服务（SLS）项目。",
        "tags": [
          "Monitors/告警数据源"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **数据源查看**（`monit`） |\n\n## 使用说明\n\n- `id` 指定的数据源类型必须为 `sls`。\n- 使用 `query` 按名称前缀过滤项目，使用 `offset` 和 `size` 分页。",
          "href": "/zh/api-reference/monitors/data-sources/monit-datasource-read-sls-projects",
          "metadata": {
            "sidebarTitle": "查询 SLS 项目列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SLSProjectsResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    "project-a",
                    "project-b"
                  ]
                }
              }
            }
          },
          "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/SLSProjectsRequest"
              },
              "example": {
                "id": 10,
                "query": "",
                "offset": 0,
                "size": 50
              }
            }
          }
        }
      }
    },
    "/monit/datasource/sls/logstores": {
      "post": {
        "operationId": "monit-datasource-read-sls-logstores",
        "summary": "查询 SLS 日志库列表",
        "description": "列出指定 SLS 数据源中某个项目下的日志库。",
        "tags": [
          "Monitors/告警数据源"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **数据源查看**（`monit`） |\n\n## 使用说明\n\n- `id` 指定的数据源类型必须为 `sls`。\n- 通过 `project` 指定要列出日志库的 SLS 项目。",
          "href": "/zh/api-reference/monitors/data-sources/monit-datasource-read-sls-logstores",
          "metadata": {
            "sidebarTitle": "查询 SLS 日志库列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SLSLogstoresResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    "logstore-1",
                    "logstore-2"
                  ]
                }
              }
            }
          },
          "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/SLSLogstoresRequest"
              },
              "example": {
                "id": 10,
                "project": "project-a",
                "offset": 0,
                "size": 50
              }
            }
          }
        }
      }
    },
    "/monit/store/ruleset/list": {
      "post": {
        "operationId": "monit-store-ruleset-list",
        "summary": "查询规则集列表",
        "description": "返回指定数据源类型下当前用户有权访问的所有规则集。",
        "tags": [
          "Monitors/规则集"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **规则仓库查看**（`monit`） |\n\n## 使用说明\n\n- 当 `open_flag` 为 `2`（公开）、当前用户为创建者（`open_flag=0`）或与账户共享（`open_flag=1`）时，规则集对当前用户可见。\n- 列表不包含 `payload` 字段，完整内容请调用 `/monit/store/ruleset/info`。",
          "href": "/zh/api-reference/monitors/rule-sets/monit-store-ruleset-list",
          "metadata": {
            "sidebarTitle": "查询规则集列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StoreRulesetListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "id": 1,
                      "type_ident": "prometheus",
                      "note": "CPU 用量告警",
                      "open_flag": 2,
                      "creator_account_id": 10023,
                      "creator_id": 80011,
                      "creator_name": "Alice",
                      "created_at": 1710000000,
                      "updated_at": 1712000000
                    }
                  ]
                }
              }
            }
          },
          "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/StoreRulesetListRequest"
              },
              "example": {
                "type_ident": "prometheus"
              }
            }
          }
        }
      }
    },
    "/monit/store/ruleset/info": {
      "post": {
        "operationId": "monit-store-ruleset-info",
        "summary": "查看规则集详情",
        "description": "获取规则集的完整信息，包括 `payload`（JSON 字符串形式的告警规则定义）。",
        "tags": [
          "Monitors/规则集"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **规则仓库查看**（`monit`） |",
          "href": "/zh/api-reference/monitors/rule-sets/monit-store-ruleset-info",
          "metadata": {
            "sidebarTitle": "查看规则集详情"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StoreRulesetItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "id": 1,
                    "type_ident": "prometheus",
                    "note": "CPU 用量告警",
                    "open_flag": 2,
                    "payload": "[{\"prom_ql\":\"...\"}]",
                    "creator_account_id": 10023,
                    "creator_id": 80011,
                    "creator_name": "Alice",
                    "created_at": 1710000000,
                    "updated_at": 1712000000
                  }
                }
              }
            }
          },
          "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/IDRequest"
              },
              "example": {
                "id": 1
              }
            }
          }
        }
      }
    },
    "/monit/store/ruleset/create": {
      "post": {
        "operationId": "monit-store-ruleset-create",
        "summary": "创建规则集",
        "description": "在规则仓库中创建新的规则集。",
        "tags": [
          "Monitors/规则集"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **规则仓库管理**（`monit`） |\n\n## 使用说明\n\n- `open_flag`：`0` 仅创建者可见，`1` 账户内共享，`2` 公开。\n- `payload` 为必填 JSON 字符串，包含告警规则定义。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/monitors/rule-sets/monit-store-ruleset-create",
          "metadata": {
            "sidebarTitle": "创建规则集"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StoreRulesetItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "id": 1,
                    "type_ident": "prometheus",
                    "note": "CPU 用量告警",
                    "open_flag": 1,
                    "created_at": 1712000000,
                    "updated_at": 1712000000
                  }
                }
              }
            }
          },
          "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/StoreRulesetUpsertRequest"
              },
              "example": {
                "type_ident": "prometheus",
                "note": "CPU 用量告警",
                "open_flag": 1,
                "payload": "[{\"prom_ql\":\"rate(cpu_usage[5m]) > 0.8\"}]"
              }
            }
          }
        }
      }
    },
    "/monit/store/ruleset/update": {
      "post": {
        "operationId": "monit-store-ruleset-update",
        "summary": "更新规则集",
        "description": "更新已有规则集的备注、共享标志及 payload。",
        "tags": [
          "Monitors/规则集"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **规则仓库管理**（`monit`） |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/monitors/rule-sets/monit-store-ruleset-update",
          "metadata": {
            "sidebarTitle": "更新规则集"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StoreRulesetItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "id": 1,
                    "note": "更新后的 CPU 告警",
                    "open_flag": 2,
                    "updated_at": 1712100000
                  }
                }
              }
            }
          },
          "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/StoreRulesetUpdateRequest"
              },
              "example": {
                "id": 1,
                "note": "更新后的 CPU 告警",
                "open_flag": 2,
                "payload": "[{\"prom_ql\":\"rate(cpu_usage[5m]) > 0.9\"}]"
              }
            }
          }
        }
      }
    },
    "/monit/store/ruleset/delete": {
      "post": {
        "operationId": "monit-store-ruleset-delete",
        "summary": "删除规则集",
        "description": "通过 ID 从规则仓库中删除规则集。",
        "tags": [
          "Monitors/规则集"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **规则仓库管理**（`monit`） |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/monitors/rule-sets/monit-store-ruleset-delete",
          "metadata": {
            "sidebarTitle": "删除规则集"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/IDRequest"
              },
              "example": {
                "id": 1
              }
            }
          }
        }
      }
    },
    "/rum/facet/count": {
      "post": {
        "operationId": "rum-read-facet-count",
        "summary": "查询分值分布",
        "description": "按出现次数降序返回指定时间范围内某个分面字段的 Top N 值及其计数。",
        "tags": [
          "RUM/RUM 自定义字段"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 使用 `POST /rum/facet/list` 发现每个 scope 下可用的 `facet_key` 值。\n- `scope` 必须是以下之一：`session`、`view`、`action`、`error`、`resource`、`long_task`、`vital`、`issue`、`sourcemap`。\n- 传入 `dql` 可在统计前进一步过滤事件，DQL 语法遵循 RUM 查询语言。\n- 传入 `sql` 可使用仅含 WHERE 子句（无 SELECT）的 SQL 风格过滤。\n- 默认 limit 为 100，最大 100。\n- 时间范围必填（`start_time` / `end_time` 为 Unix 毫秒时间戳），最大跨度 31 天。",
          "href": "/zh/api-reference/rum/facets/rum-read-facet-count",
          "metadata": {
            "sidebarTitle": "查询分值分布"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RumFacetCountResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "facet_value": "TypeError",
                        "count": 1523
                      },
                      {
                        "facet_value": "ReferenceError",
                        "count": 342
                      },
                      {
                        "facet_value": "SyntaxError",
                        "count": 89
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/RumFacetCountRequest"
              },
              "example": {
                "scope": "error",
                "facet_key": "error.type",
                "start_time": 1712620800000,
                "end_time": 1712707200000,
                "limit": 10
              }
            }
          }
        }
      }
    },
    "/rum/application/webhook/test": {
      "post": {
        "operationId": "rum-application-webhook-test",
        "summary": "测试应用 Webhook",
        "description": "发送一条 RUM 告警样例事件，用于验证应用的 Webhook URL。",
        "tags": [
          "RUM/应用管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **应用管理**（`rum`） |\n\n## 使用说明\n\n- 接口会先校验 URL，再发送样例事件。\n- 投递失败时仍返回 HTTP 200，但 `ok=false`，错误原因在 `message` 中。",
          "href": "/zh/api-reference/rum/applications/rum-application-webhook-test",
          "metadata": {
            "sidebarTitle": "测试应用 Webhook"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RumWebhookTestResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "ok": true,
                    "status_code": 200,
                    "message": "ok"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RumWebhookTestRequest"
              },
              "example": {
                "application_id": "rum-app-prod",
                "webhook_url": "https://hooks.example.com/rum-alerts"
              }
            }
          }
        }
      }
    },
    "/rum/issue/info": {
      "post": {
        "operationId": "rum-issue-read-info",
        "summary": "查看 Issue 详情",
        "description": "通过 `issue_id` 获取单个 Issue 的完整信息。",
        "tags": [
          "RUM/RUM 问题跟踪"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/rum/issues/rum-issue-read-info",
          "metadata": {
            "sidebarTitle": "查看 Issue 详情"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RumIssueItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "team_id": 2477033058131,
                    "issue_id": "NHEacQHi2DhXqobr9qPQz9",
                    "application_id": "eWbr4xk3ZRnLabRa6unqwD",
                    "application_name": "Flashduty DEV",
                    "service": "fd-console",
                    "status": "for_review",
                    "error_count": 752,
                    "session_count": 381,
                    "is_crash": false,
                    "age": 5078684,
                    "resolved_at": 0,
                    "resolved_by": 0,
                    "created_at": 1770883154944,
                    "updated_at": 1775961914595,
                    "first_seen": {
                      "timestamp": 1770883154944,
                      "version": "1.0.0"
                    },
                    "last_seen": {
                      "timestamp": 1775961839090,
                      "version": "1.0.0"
                    },
                    "error": {
                      "message": "Script error.",
                      "type": "Error"
                    },
                    "suspected_cause": {
                      "source": "auto",
                      "value": "code.exception",
                      "reason": "错误信息 'Script error.' 通常表示 JavaScript 中的未处理异常。",
                      "person_id": 0
                    },
                    "versions": [
                      "1.0.0"
                    ],
                    "severity": "Info"
                  }
                }
              }
            }
          },
          "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/RumIssueIDRequest"
              },
              "example": {
                "issue_id": "NHEacQHi2DhXqobr9qPQz9"
              }
            }
          }
        }
      }
    },
    "/rum/application/list": {
      "post": {
        "operationId": "rum-application-read-list",
        "summary": "查询应用列表",
        "description": "返回当前用户可访问的 RUM 应用分页列表。",
        "tags": [
          "RUM/应用管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 使用 `is_my_team` 可过滤当前用户所在团队的应用。\n- 默认每页 20 条，最大 100 条。\n- `orderby` 支持 `created_at` 或 `updated_at`。",
          "href": "/zh/api-reference/rum/applications/rum-application-read-list",
          "metadata": {
            "sidebarTitle": "查询应用列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RumApplicationListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "has_next_page": true,
                    "total": 7,
                    "items": [
                      {
                        "account_id": 2451002751131,
                        "application_id": "WoyQQ3BohkdtPivubEvE8o",
                        "application_name": "flashcat-rum",
                        "type": "browser",
                        "client_token": "a3cea433a8685a398cdfd68f54a45e06131",
                        "team_id": 2477033058131,
                        "is_private": true,
                        "no_ip": true,
                        "no_geo": false,
                        "alerting": {
                          "enabled": true,
                          "channel_ids": [
                            2490121812131
                          ],
                          "integration_id": 4759595678131
                        },
                        "tracing": {
                          "enabled": false,
                          "open_type": "",
                          "endpoint": ""
                        },
                        "status": "enabled",
                        "created_by": 4441703362131,
                        "updated_by": 3790925372131,
                        "created_at": 1746673831462,
                        "updated_at": 1773398630657,
                        "links": {
                          "enabled": true,
                          "systems": [
                            {
                              "id": "s3-crash-logs",
                              "name": "S3 Crash Logs",
                              "icon_text": "S3",
                              "icon_color": "#0F766E",
                              "url": "https://s3.example.com/logs?app=${application_id}&trace=${trace_id}",
                              "event_types": [
                                "crash",
                                "error"
                              ],
                              "enabled": true
                            }
                          ]
                        }
                      },
                      {
                        "account_id": 2451002751131,
                        "application_id": "eWbr4xk3ZRnLabRa6unqwD",
                        "application_name": "Flashduty DEV",
                        "type": "browser",
                        "client_token": "ce8d1be90fc6534f89ce36ebf526765e131",
                        "team_id": 2477033058131,
                        "is_private": false,
                        "no_ip": false,
                        "no_geo": false,
                        "alerting": {
                          "enabled": true,
                          "channel_ids": [
                            5962711836131,
                            5967875767131
                          ],
                          "integration_id": 4759595678131
                        },
                        "tracing": {
                          "enabled": true,
                          "open_type": "popup",
                          "endpoint": "https://www.tracing.com/${trace_id}"
                        },
                        "status": "enabled",
                        "created_by": 2476444212131,
                        "updated_by": 3122470302131,
                        "created_at": 1742958482000,
                        "updated_at": 1772096392711,
                        "links": {
                          "enabled": false,
                          "systems": []
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/RumApplicationListRequest"
              },
              "example": {
                "p": 1,
                "limit": 20,
                "query": "",
                "is_my_team": false
              }
            }
          }
        }
      }
    },
    "/rum/facet/list": {
      "post": {
        "operationId": "rum-read-facet-list",
        "summary": "查询分面列表",
        "description": "返回所有可用的 RUM 字段定义，可按 scope 和是否为分面字段过滤。",
        "tags": [
          "RUM/RUM 自定义字段"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 使用返回的 `field_key` 作为 `POST /rum/facet/count` 的 `facet_key` 参数。\n- 合法的 `scopes` 值为：`session`、`view`、`action`、`error`、`resource`、`long_task`、`vital`、`issue`、`sourcemap`。\n- 设置 `is_facet: true` 只返回支持分面查询的字段（即支持值分布统计的字段）。",
          "href": "/zh/api-reference/rum/facets/rum-read-facet-list",
          "metadata": {
            "sidebarTitle": "查询分面列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RumFacetListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "account_id": 0,
                        "field_key": "error.type",
                        "field_name": "Error type",
                        "group": "Error",
                        "description": "错误类型。",
                        "value_type": "string",
                        "show_type": "list",
                        "unit_family": "",
                        "unit_name": "",
                        "edit_able": false,
                        "is_facet": true,
                        "enum_values": [],
                        "scopes": [
                          "error"
                        ],
                        "status": "active",
                        "queryable": true
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/RumFacetListRequest"
              },
              "example": {
                "scopes": [
                  "error"
                ],
                "is_facet": true
              }
            }
          }
        }
      }
    },
    "/sourcemap/stack/enrich": {
      "post": {
        "operationId": "sourcemap-read-stack-enrich",
        "summary": "丰富错误栈信息",
        "description": "对 Browser、Android、iOS、小程序或 HarmonyOS 错误栈进行符号化或反混淆。",
        "tags": [
          "RUM/RUM Sourcemap"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 为兼容旧调用，省略 `type` 时默认按 `browser` 处理。\n- 设置 1 到 20 之间的 `near` 可在转换后的栈帧附近返回源码片段。\n- Android NDK native 崩溃需传入 `arch` 和 `source_type: ndk`，后端会路由到 native 符号化逻辑。\n- iOS 崩溃栈需传入 `binary_images`，以便按上传的 dSYM 文件重定位地址。\n- `no_cache` 主要用于调试，会绕过已缓存的 enrich 结果。",
          "href": "/zh/api-reference/rum/sourcemaps/sourcemap-read-stack-enrich",
          "metadata": {
            "sidebarTitle": "丰富错误栈信息"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SourcemapStackEnrichResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "frames": [
                      {
                        "function": "renderCheckout",
                        "file": "src/pages/checkout.tsx",
                        "line": 42,
                        "column": 17,
                        "converted": true,
                        "code_snippets": [
                          {
                            "line": 41,
                            "code": "const cart = props.cart;"
                          },
                          {
                            "line": 42,
                            "code": "return cart.items.map(renderItem);"
                          }
                        ],
                        "original_frame": {
                          "function": "render",
                          "file": "https://cdn.example.com/app.min.js",
                          "line": 1,
                          "column": 2345
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/SourcemapStackEnrichRequest"
              },
              "example": {
                "type": "browser",
                "service": "my-web-app",
                "version": "1.0.0",
                "stack": "TypeError: Cannot read properties of undefined\n    at render (https://cdn.example.com/app.min.js:1:2345)",
                "near": 3
              }
            }
          }
        }
      }
    },
    "/rum/data/query": {
      "post": {
        "operationId": "rum-read-data-query",
        "summary": "查询 RUM 数据",
        "description": "在指定时间范围内执行一个或多个 SQL 风格的 RUM 数据查询。",
        "tags": [
          "RUM/RUM 数据查询"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 单次请求可提交 1 到 10 个查询；每个查询的 `id` 会成为响应对象中的 key。\n- `start_time` 和 `end_time` 必填，均为 Unix 毫秒时间戳；最大时间范围为 31 天。\n- 使用 `format: table` 返回表格结果，使用 `format: time_series` 返回按时间桶聚合的时序结果。\n- 当 `format: time_series` 时，省略 `interval` 会默认使用 3600 秒，省略 `max_points` 会默认使用 1226。\n- 分页表格查询会返回 `search_after_ctx`，继续扫描时可原样传回。",
          "href": "/zh/api-reference/rum/data-query/rum-read-data-query",
          "metadata": {
            "sidebarTitle": "查询 RUM 数据"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RumDataQueryResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "errors_by_type": {
                      "data": {
                        "fields": [
                          {
                            "name": "error.type",
                            "type": "String",
                            "nullable": false
                          },
                          {
                            "name": "errors",
                            "type": "UInt64",
                            "nullable": false
                          }
                        ],
                        "values": [
                          [
                            "TypeError",
                            1523
                          ],
                          [
                            "ReferenceError",
                            342
                          ]
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "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/RumDataQueryRequest"
              },
              "example": {
                "start_time": 1712620800000,
                "end_time": 1712707200000,
                "queries": [
                  {
                    "id": "errors_by_type",
                    "sql": "SELECT error.type, count(*) AS errors FROM error GROUP BY error.type ORDER BY errors DESC LIMIT 10",
                    "format": "table",
                    "time_zone": "Asia/Shanghai"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/rum/issue/list": {
      "post": {
        "operationId": "rum-issue-read-list",
        "summary": "查询 Issue 列表",
        "description": "返回符合过滤条件的 RUM 异常追踪 Issue 分页列表。",
        "tags": [
          "RUM/RUM 问题跟踪"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- `start_time` 和 `end_time` 为毫秒时间戳，最大范围 183 天。\n- `statuses` 按状态过滤，可选值：`for_review`、`reviewed`、`ignored`、`resolved`。\n- `orderby` 支持：`created_at`、`updated_at`、`session_count`、`error_count`。\n- 使用 `dql` 或 `sql` 进行高级过滤，两者不可同时使用。",
          "href": "/zh/api-reference/rum/issues/rum-issue-read-list",
          "metadata": {
            "sidebarTitle": "查询 Issue 列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RumIssueListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "team_id": 2477033058131,
                        "issue_id": "NHEacQHi2DhXqobr9qPQz9",
                        "application_id": "eWbr4xk3ZRnLabRa6unqwD",
                        "application_name": "Flashduty DEV",
                        "service": "fd-console",
                        "status": "for_review",
                        "error_count": 752,
                        "session_count": 381,
                        "is_crash": false,
                        "age": 5078684,
                        "resolved_at": 0,
                        "resolved_by": 0,
                        "created_at": 1770883154944,
                        "updated_at": 1775961914595,
                        "first_seen": {
                          "timestamp": 1770883154944,
                          "version": "1.0.0"
                        },
                        "last_seen": {
                          "timestamp": 1775961839090,
                          "version": "1.0.0"
                        },
                        "error": {
                          "message": "Script error.",
                          "type": "Error"
                        },
                        "suspected_cause": {
                          "source": "auto",
                          "value": "code.exception",
                          "reason": "错误信息 'Script error.' 通常表示 JavaScript 中的未处理异常。",
                          "person_id": 0
                        },
                        "versions": [
                          "1.0.0"
                        ],
                        "severity": "Info"
                      },
                      {
                        "team_id": 2477033058131,
                        "issue_id": "H8kZSmxiE7EgdyD4fCyyNa",
                        "application_id": "eWbr4xk3ZRnLabRa6unqwD",
                        "application_name": "Flashduty DEV",
                        "service": "fd-console",
                        "status": "for_review",
                        "error_count": 3,
                        "session_count": 1,
                        "is_crash": false,
                        "age": 48,
                        "resolved_at": 0,
                        "resolved_by": 0,
                        "created_at": 1775189479566,
                        "updated_at": 1775191284163,
                        "first_seen": {
                          "timestamp": 1775189479566,
                          "version": "1.0.0"
                        },
                        "last_seen": {
                          "timestamp": 1775189527762,
                          "version": "1.0.0"
                        },
                        "error": {
                          "message": "API ERROR: We encountered an internal error | POST /api/access/logout",
                          "type": "Error"
                        },
                        "suspected_cause": {
                          "source": "auto",
                          "value": "api.failed_request",
                          "reason": "错误信息表明 POST /api/access/logout 请求时服务端发生内部错误。",
                          "person_id": 0
                        },
                        "versions": [
                          "1.0.0"
                        ],
                        "severity": "Info"
                      }
                    ],
                    "has_next_page": true,
                    "total": 111
                  }
                }
              }
            }
          },
          "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/RumIssueListRequest"
              },
              "example": {
                "start_time": 1772611200000,
                "end_time": 1775961914595,
                "application_ids": [
                  "eWbr4xk3ZRnLabRa6unqwD"
                ],
                "statuses": [
                  "for_review"
                ],
                "p": 1,
                "limit": 20,
                "orderby": "updated_at"
              }
            }
          }
        }
      }
    },
    "/rum/issue/update": {
      "post": {
        "operationId": "rum-issue-write-update",
        "summary": "更新 Issue",
        "description": "更新 Issue 的状态或疑似原因。",
        "tags": [
          "RUM/RUM 问题跟踪"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- `status` 可选值：`for_review`、`reviewed`、`ignored`、`resolved`。\n- `suspected_cause` 可选值：`api.failed_request`、`network.error`、`code.exception`、`code.invalid_object_access`、`code.invalid_argument`、`unknown`。\n- 将 `status` 设为 `resolved` 会同时记录 `resolved_at` 和 `resolved_by`；从 resolved 切回其他状态则会清空这两个字段。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/rum/issues/rum-issue-write-update",
          "metadata": {
            "sidebarTitle": "更新 Issue"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/RumIssueUpdateRequest"
              },
              "example": {
                "issue_id": "NHEacQHi2DhXqobr9qPQz9",
                "status": "resolved"
              }
            }
          }
        }
      }
    },
    "/rum/application/infos": {
      "post": {
        "operationId": "rum-application-read-infos",
        "summary": "批量查询应用详情",
        "description": "通过 ID 列表批量获取多个 RUM 应用的详情。",
        "tags": [
          "RUM/应用管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 每次请求最多传入 200 个 ID。",
          "href": "/zh/api-reference/rum/applications/rum-application-read-infos",
          "metadata": {
            "sidebarTitle": "批量查询应用详情"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RumApplicationInfosResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "account_id": 2451002751131,
                        "application_id": "eWbr4xk3ZRnLabRa6unqwD",
                        "application_name": "Flashduty DEV",
                        "type": "browser",
                        "client_token": "ce8d1be90fc6534f89ce36ebf526765e131",
                        "team_id": 2477033058131,
                        "is_private": false,
                        "no_ip": false,
                        "no_geo": false,
                        "alerting": {
                          "enabled": true,
                          "channel_ids": [
                            5962711836131,
                            5967875767131
                          ],
                          "integration_id": 4759595678131
                        },
                        "tracing": {
                          "enabled": true,
                          "open_type": "popup",
                          "endpoint": "https://www.tracing.com/${trace_id}"
                        },
                        "status": "enabled",
                        "created_by": 2476444212131,
                        "updated_by": 3122470302131,
                        "created_at": 1742958482000,
                        "updated_at": 1772096392711,
                        "links": {
                          "enabled": false,
                          "systems": []
                        }
                      },
                      {
                        "account_id": 2451002751131,
                        "application_id": "WoyQQ3BohkdtPivubEvE8o",
                        "application_name": "flashcat-rum",
                        "type": "browser",
                        "client_token": "a3cea433a8685a398cdfd68f54a45e06131",
                        "team_id": 2477033058131,
                        "is_private": true,
                        "no_ip": true,
                        "no_geo": false,
                        "alerting": {
                          "enabled": true,
                          "channel_ids": [
                            2490121812131
                          ],
                          "integration_id": 4759595678131
                        },
                        "tracing": {
                          "enabled": false,
                          "open_type": "",
                          "endpoint": ""
                        },
                        "status": "enabled",
                        "created_by": 4441703362131,
                        "updated_by": 3790925372131,
                        "created_at": 1746673831462,
                        "updated_at": 1773398630657,
                        "links": {
                          "enabled": true,
                          "systems": [
                            {
                              "id": "s3-crash-logs",
                              "name": "S3 Crash Logs",
                              "icon_text": "S3",
                              "icon_color": "#0F766E",
                              "url": "https://s3.example.com/logs?app=${application_id}&trace=${trace_id}",
                              "event_types": [
                                "crash",
                                "error"
                              ],
                              "enabled": true
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/RumApplicationInfosRequest"
              },
              "example": {
                "application_ids": [
                  "eWbr4xk3ZRnLabRa6unqwD",
                  "WoyQQ3BohkdtPivubEvE8o"
                ]
              }
            }
          }
        }
      }
    },
    "/rum/field/list": {
      "post": {
        "operationId": "rum-read-field-list",
        "summary": "查询字段列表",
        "description": "返回 RUM 字段定义，可按 scope 和是否为分面字段过滤。",
        "tags": [
          "RUM/RUM 自定义字段"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 这是当前字段模型下用于发现 RUM 字段的路由。\n- 返回的 `field_key` 可用于 RUM 数据查询和分面值统计请求。\n- 设置 `is_facet: true` 只返回支持值分布统计的字段。",
          "href": "/zh/api-reference/rum/facets/rum-read-field-list",
          "metadata": {
            "sidebarTitle": "查询字段列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RumFieldListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "account_id": 0,
                        "field_key": "error.type",
                        "field_name": "Error type",
                        "group": "Error",
                        "description": "错误类型。",
                        "value_type": "string",
                        "show_type": "list",
                        "unit_family": "",
                        "unit_name": "",
                        "edit_able": false,
                        "is_facet": true,
                        "enum_values": [],
                        "scopes": [
                          "error"
                        ],
                        "status": "active",
                        "queryable": true
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/RumFieldListRequest"
              },
              "example": {
                "scopes": [
                  "error"
                ],
                "is_facet": false
              }
            }
          }
        }
      }
    },
    "/rum/application/info": {
      "post": {
        "operationId": "rum-application-read-info",
        "summary": "查看应用详情",
        "description": "通过 `application_id` 获取单个 RUM 应用的完整信息。",
        "tags": [
          "RUM/应用管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/rum/applications/rum-application-read-info",
          "metadata": {
            "sidebarTitle": "查看应用详情"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RumApplicationItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "account_id": 2451002751131,
                    "application_id": "WoyQQ3BohkdtPivubEvE8o",
                    "application_name": "flashcat-rum",
                    "type": "browser",
                    "client_token": "a3cea433a8685a398cdfd68f54a45e06131",
                    "team_id": 2477033058131,
                    "is_private": true,
                    "no_ip": true,
                    "no_geo": false,
                    "alerting": {
                      "enabled": true,
                      "channel_ids": [
                        2490121812131
                      ],
                      "integration_id": 4759595678131
                    },
                    "tracing": {
                      "enabled": false,
                      "open_type": "",
                      "endpoint": ""
                    },
                    "status": "enabled",
                    "created_by": 4441703362131,
                    "updated_by": 3790925372131,
                    "created_at": 1746673831462,
                    "updated_at": 1773398630657,
                    "links": {
                      "enabled": true,
                      "systems": [
                        {
                          "id": "s3-crash-logs",
                          "name": "S3 Crash Logs",
                          "icon_text": "S3",
                          "icon_color": "#0F766E",
                          "url": "https://s3.example.com/logs?app=${application_id}&trace=${trace_id}",
                          "event_types": [
                            "crash",
                            "error"
                          ],
                          "enabled": true
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "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/RumApplicationIDRequest"
              },
              "example": {
                "application_id": "WoyQQ3BohkdtPivubEvE8o"
              }
            }
          }
        }
      }
    },
    "/rum/application/delete": {
      "post": {
        "operationId": "rum-application-write-delete",
        "summary": "删除应用",
        "description": "通过 `application_id` 删除 RUM 应用。",
        "tags": [
          "RUM/应用管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **应用管理**（`rum`） |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/rum/applications/rum-application-write-delete",
          "metadata": {
            "sidebarTitle": "删除应用"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/RumApplicationIDRequest"
              },
              "example": {
                "application_id": "qLpu24Dz4CAzWsESPbJYWA"
              }
            }
          }
        }
      }
    },
    "/rum/application/create": {
      "post": {
        "operationId": "rum-application-write-create",
        "summary": "创建应用",
        "description": "创建新的 RUM 应用，返回生成的 `application_id` 和 `client_token`。",
        "tags": [
          "RUM/应用管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **应用管理**（`rum`） |\n\n## 使用说明\n\n- `type` 须为以下之一：`browser`、`ios`、`android`、`react-native`、`flutter`、`kotlin-multiplatform`、`roku`、`unity`。\n- `links.systems[].url` 必须以 `http` 或 `https` 开头；`${var}` 变量会根据 RUM 事件上下文解析。\n- `links.systems[].event_types` 支持：`crash`、`error`、`view`、`action`、`resource`、`session`、`all`。\n- `client_token` 自动生成，用于初始化 RUM SDK。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/rum/applications/rum-application-write-create",
          "metadata": {
            "sidebarTitle": "创建应用"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RumApplicationCreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "application_id": "qLpu24Dz4CAzWsESPbJYWA",
                    "application_name": "我的 Web 应用",
                    "client_token": "e090078724855a4ca168c3884880dfbc131"
                  }
                }
              }
            }
          },
          "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/RumApplicationCreateRequest"
              },
              "example": {
                "application_name": "我的 Web 应用",
                "type": "browser",
                "team_id": 2477033058131,
                "is_private": false,
                "links": {
                  "enabled": true,
                  "systems": [
                    {
                      "id": "s3-crash-logs",
                      "name": "S3 Crash Logs",
                      "icon_text": "S3",
                      "icon_color": "#0F766E",
                      "url": "https://s3.example.com/logs?app=${application_id}&trace=${trace_id}",
                      "event_types": [
                        "crash",
                        "error"
                      ],
                      "enabled": true
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/rum/application/update": {
      "post": {
        "operationId": "rum-application-write-update",
        "summary": "更新应用",
        "description": "更新已有 RUM 应用，除 `application_id` 外均为可选，仅更新提供的字段。",
        "tags": [
          "RUM/应用管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **应用管理**（`rum`） |\n\n## 使用说明\n\n- `links.systems[].url` 必须以 `http` 或 `https` 开头；`${var}` 变量会根据 RUM 事件上下文解析。\n- `links.systems[].event_types` 支持：`crash`、`error`、`view`、`action`、`resource`、`session`、`all`。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/rum/applications/rum-application-write-update",
          "metadata": {
            "sidebarTitle": "更新应用"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/RumApplicationUpdateRequest"
              },
              "example": {
                "application_id": "WoyQQ3BohkdtPivubEvE8o",
                "application_name": "我的 Web 应用 v2",
                "alerting": {
                  "enabled": true,
                  "channel_ids": [
                    2490121812131
                  ]
                },
                "links": {
                  "enabled": true,
                  "systems": [
                    {
                      "id": "s3-crash-logs",
                      "name": "S3 Crash Logs",
                      "icon_text": "S3",
                      "icon_color": "#0F766E",
                      "url": "https://s3.example.com/logs?app=${application_id}&trace=${trace_id}",
                      "event_types": [
                        "crash",
                        "error"
                      ],
                      "enabled": true
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/sourcemap/list": {
      "post": {
        "operationId": "sourcemap-read-list",
        "summary": "查询 Sourcemap 列表",
        "description": "分页返回已上传的 Sourcemap 文件列表，可按平台类型、服务和版本过滤。",
        "tags": [
          "RUM/RUM Sourcemap"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- `start_time` 和 `end_time` 为必填字段，均使用 Unix 时间戳（**毫秒**），最大时间跨度 365 天。\n- `type` 字段用于选择平台：`browser`（JavaScript）、`android` 或 `ios`。省略时默认为 `browser`。\n- 默认每页 20 条，最大 100 条，默认按 `created_at` 倒序排列。\n- Android 平台可用 `build_id` 匹配 Gradle 插件的构建标识；iOS 平台可用 `uuid` 匹配 dSYM bundle UUID。",
          "href": "/zh/api-reference/rum/sourcemaps/sourcemap-read-list",
          "metadata": {
            "sidebarTitle": "查询 Sourcemap 列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SourcemapListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 3,
                    "items": [
                      {
                        "key": "browser/my-web-app/1.0.0/main.js.map",
                        "type": "browser",
                        "service": "my-web-app",
                        "version": "1.0.0",
                        "size": 204800,
                        "git_repository_url": "https://github.com/example/my-web-app",
                        "git_commit_sha": "abc1234def5678",
                        "created_at": 1712700000,
                        "updated_at": 1712700000,
                        "metadata": {}
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/SourcemapListRequest"
              },
              "example": {
                "start_time": 1712000000000,
                "end_time": 1712700000000,
                "type": "browser",
                "services": [
                  "my-web-app"
                ],
                "p": 1,
                "limit": 20
              }
            }
          }
        }
      }
    },
    "/member/info": {
      "post": {
        "operationId": "memberInfo",
        "summary": "获取当前成员信息",
        "description": "返回当前会话成员的完整资料。",
        "tags": [
          "平台/成员管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/platform/members/member-info",
          "metadata": {
            "sidebarTitle": "获取当前成员信息"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MemberInfoResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "account_avatar": "",
                    "account_email": "alice@example.com",
                    "account_id": 2451002751131,
                    "account_locale": "en-US",
                    "account_name": "Acme Corp",
                    "account_role_ids": [
                      6
                    ],
                    "account_time_zone": "Asia/Shanghai",
                    "avatar": "/image/avatar1.png",
                    "country_code": "CN",
                    "created_at": 1701399971,
                    "domain": "acme",
                    "email": "alice@example.com",
                    "email_verified": true,
                    "is_external": false,
                    "locale": "zh-CN",
                    "member_id": 2476444212131,
                    "member_name": "Alice",
                    "phone": "+86185****0300",
                    "phone_verified": true,
                    "time_zone": "Asia/Shanghai"
                  }
                }
              }
            }
          },
          "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/MemberInfoRequest"
              },
              "example": {}
            }
          }
        }
      }
    },
    "/member/list": {
      "post": {
        "operationId": "memberList",
        "summary": "查询成员列表",
        "description": "返回组织成员的分页列表。",
        "tags": [
          "平台/成员管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/platform/members/member-list",
          "metadata": {
            "sidebarTitle": "查询成员列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MemberListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "p": 1,
                    "limit": 5,
                    "total": 148,
                    "items": [
                      {
                        "account_id": 2451002751131,
                        "member_id": 5068740052131,
                        "member_name": "Bob",
                        "country_code": "",
                        "phone": "+86151****6519",
                        "email": "bob@example.com",
                        "phone_verified": true,
                        "email_verified": true,
                        "avatar": "",
                        "status": "enabled",
                        "account_role_ids": [
                          2,
                          6
                        ],
                        "created_at": 1752030749,
                        "updated_at": 1775962064,
                        "ref_id": "",
                        "is_external": false
                      },
                      {
                        "account_id": 2451002751131,
                        "member_id": 2476444212131,
                        "member_name": "Alice",
                        "country_code": "CN",
                        "phone": "+86185****0300",
                        "email": "alice@example.com",
                        "phone_verified": true,
                        "email_verified": true,
                        "avatar": "/image/avatar1.png",
                        "status": "enabled",
                        "account_role_ids": [
                          6
                        ],
                        "created_at": 1701399971,
                        "updated_at": 1775809507,
                        "ref_id": "",
                        "is_external": false
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/MemberListRequest"
              },
              "example": {
                "p": 1,
                "limit": 5
              }
            }
          }
        }
      }
    },
    "/member/delete": {
      "post": {
        "operationId": "memberDelete",
        "summary": "删除成员",
        "description": "通过 ID、邮箱、手机号或名称从组织中移除成员。",
        "tags": [
          "平台/成员管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **成员管理**（`organization`） |\n\n## 使用说明\n\n- 默认情况下（`is_force=false`），系统会检查该成员是否被其他资源引用（如分派策略、值班表等）。如果存在引用，接口将返回错误码 `ReferenceExist` 并在 `data.refs` 中返回引用列表。设置 `is_force=true` 可跳过引用检查，直接强制删除。\n- 通过 SSO 同步且 SSO 配置了成员不可编辑（`sso_user_non_editable=true`）的成员，无法通过此接口删除。需要先在 SSO 配置中关闭该限制。\n- 此操作会记录审计日志。",
          "href": "/zh/api-reference/platform/members/member-delete",
          "metadata": {
            "sidebarTitle": "删除成员"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MemberEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/MemberDeleteRequest"
              },
              "example": {
                "member_id": 5068740052131
              }
            }
          }
        }
      }
    },
    "/member/invite": {
      "post": {
        "operationId": "memberInvite",
        "summary": "邀请成员",
        "description": "通过邮箱或手机号批量邀请新成员加入组织。",
        "tags": [
          "平台/成员管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **成员管理**（`organization`） |",
          "href": "/zh/api-reference/platform/members/member-invite",
          "metadata": {
            "sidebarTitle": "邀请成员"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MemberInviteResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "member_id": 5068740052131,
                        "member_name": "Charlie"
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/MemberInviteRequest"
              },
              "example": {
                "members": [
                  {
                    "member_name": "Charlie",
                    "email": "charlie@example.com",
                    "locale": "en-US",
                    "time_zone": "Asia/Shanghai",
                    "role_ids": [
                      6
                    ]
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/member/role/grant": {
      "post": {
        "operationId": "memberGrantRole",
        "summary": "授予成员角色",
        "description": "为成员添加角色授权。",
        "tags": [
          "平台/成员管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **成员管理**（`organization`） |",
          "href": "/zh/api-reference/platform/members/member-grant-role",
          "metadata": {
            "sidebarTitle": "授予成员角色"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MemberEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/MemberRoleGrantRequest"
              },
              "example": {
                "member_id": 5068740052131,
                "role_ids": [
                  6
                ]
              }
            }
          }
        }
      }
    },
    "/member/role/revoke": {
      "post": {
        "operationId": "memberRevokeRole",
        "summary": "解除成员角色",
        "description": "移除成员的角色授权。",
        "tags": [
          "平台/成员管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **成员管理**（`organization`） |",
          "href": "/zh/api-reference/platform/members/member-revoke-role",
          "metadata": {
            "sidebarTitle": "解除成员角色"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MemberEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/MemberRoleRevokeRequest"
              },
              "example": {
                "member_id": 5068740052131,
                "role_ids": [
                  6
                ]
              }
            }
          }
        }
      }
    },
    "/member/role/update": {
      "post": {
        "operationId": "memberUpdateRole",
        "summary": "更新成员角色",
        "description": "一次性替换成员的全部角色授权。",
        "tags": [
          "平台/成员管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **成员管理**（`organization`） |",
          "href": "/zh/api-reference/platform/members/member-update-role",
          "metadata": {
            "sidebarTitle": "更新成员角色"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MemberEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/MemberRoleUpdateRequest"
              },
              "example": {
                "member_id": 5068740052131,
                "role_ids": [
                  2,
                  6
                ]
              }
            }
          }
        }
      }
    },
    "/member/info/reset": {
      "post": {
        "operationId": "memberResetInfo",
        "summary": "重置成员信息",
        "description": "批量更新当前成员的多个资料字段。",
        "tags": [
          "平台/成员管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/platform/members/member-reset-info",
          "metadata": {
            "sidebarTitle": "重置成员信息"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MemberEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/MemberResetInfoRequest"
              },
              "example": {
                "member_id": 2476444212131,
                "member_name": "Alice",
                "locale": "zh-CN",
                "time_zone": "Asia/Shanghai"
              }
            }
          }
        }
      }
    },
    "/person/infos": {
      "post": {
        "operationId": "personInfos",
        "summary": "批量获取人员信息",
        "description": "根据 ID 批量返回成员或账户的资料信息。",
        "tags": [
          "平台/成员管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/platform/members/person-infos",
          "metadata": {
            "sidebarTitle": "批量获取人员信息"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PersonInfosResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "account_id": 2451002751131,
                        "person_id": 2476444212131,
                        "person_name": "Alice",
                        "avatar": "/image/avatar1.png",
                        "locale": "zh-CN",
                        "time_zone": "Asia/Shanghai",
                        "email": "alice@example.com",
                        "phone_verified": false,
                        "email_verified": true,
                        "as": "member",
                        "status": "enabled"
                      },
                      {
                        "account_id": 2451002751131,
                        "person_id": 3790925372131,
                        "person_name": "Bob",
                        "email": "bob@example.com",
                        "phone_verified": false,
                        "email_verified": true,
                        "as": "member",
                        "status": "enabled"
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/PersonInfosRequest"
              },
              "example": {
                "person_ids": [
                  2476444212131,
                  3790925372131
                ]
              }
            }
          }
        }
      }
    },
    "/team/info": {
      "post": {
        "operationId": "team-read-info",
        "summary": "查看团队详情",
        "description": "按 ID、名称或外部引用 ID 返回单个团队的详细信息。",
        "tags": [
          "平台/团队管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- `team_id`、`team_name`、`ref_id` 三者至少提供一个。",
          "href": "/zh/api-reference/platform/teams/team-read-info",
          "metadata": {
            "sidebarTitle": "查看团队详情"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TeamItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "account_id": 10023,
                    "team_id": 1001,
                    "team_name": "后端 SRE",
                    "description": "后端可靠性工程团队",
                    "status": "enabled",
                    "updated_by_name": "alice",
                    "updated_by": 80011,
                    "creator_id": 80011,
                    "creator_name": "alice",
                    "created_at": 1710000000,
                    "updated_at": 1712000000,
                    "person_ids": [
                      80011,
                      80012
                    ],
                    "ref_id": ""
                  }
                }
              }
            }
          },
          "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/TeamInfoRequest"
              },
              "example": {
                "team_id": 1001
              }
            }
          }
        }
      }
    },
    "/team/infos": {
      "post": {
        "operationId": "team-read-infos",
        "summary": "批量查看团队信息",
        "description": "一次请求按 ID 列表批量返回多个团队的基本信息。",
        "tags": [
          "平台/团队管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 每次最多传入 100 个团队 ID。",
          "href": "/zh/api-reference/platform/teams/team-read-infos",
          "metadata": {
            "sidebarTitle": "批量查看团队信息"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TeamInfosResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "team_id": 1001,
                        "team_name": "后端 SRE",
                        "person_ids": [
                          80011,
                          80012
                        ]
                      },
                      {
                        "team_id": 1002,
                        "team_name": "前端",
                        "person_ids": [
                          80013
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/TeamInfosRequest"
              },
              "example": {
                "team_ids": [
                  1001,
                  1002
                ]
              }
            }
          }
        }
      }
    },
    "/team/list": {
      "post": {
        "operationId": "team-read-list",
        "summary": "查看团队列表",
        "description": "分页返回当前账户下的团队列表。",
        "tags": [
          "平台/团队管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 传入 `person_id` 可过滤返回指定人员所属的团队。\n- 默认 p=1、limit=20。",
          "href": "/zh/api-reference/platform/teams/team-read-list",
          "metadata": {
            "sidebarTitle": "查看团队列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TeamListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "p": 1,
                    "limit": 20,
                    "total": 5,
                    "items": [
                      {
                        "account_id": 10023,
                        "team_id": 1001,
                        "team_name": "后端 SRE",
                        "status": "enabled",
                        "creator_id": 80011,
                        "created_at": 1710000000,
                        "updated_at": 1712000000,
                        "person_ids": [
                          80011
                        ],
                        "description": "",
                        "updated_by_name": "",
                        "updated_by": 0,
                        "creator_name": "alice",
                        "ref_id": ""
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/TeamListRequest"
              },
              "example": {
                "p": 1,
                "limit": 20,
                "orderby": "created_at",
                "asc": false
              }
            }
          }
        }
      }
    },
    "/team/upsert": {
      "post": {
        "operationId": "team-write-upsert",
        "summary": "变更团队信息",
        "description": "创建新团队或更新已有团队，更新时传入 `team_id`。",
        "tags": [
          "平台/团队管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **团队管理**（`organization`） |\n\n## 使用说明\n\n- 省略 `team_id`（或置为 0）表示创建新团队；传入已有 ID 表示更新。\n- `team_name` 须为 1–39 个字符且在账户内唯一。\n- 传入 `person_ids` 可设置团队成员，会替换整个成员列表。\n- 传入 `emails` 或 `phones` 可邀请尚未注册的成员。\n- `ref_id` 是供第三方 HR 系统集成使用的外部标识。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/platform/teams/team-write-upsert",
          "metadata": {
            "sidebarTitle": "变更团队信息"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TeamUpsertResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "team_id": 1001,
                    "team_name": "后端 SRE"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamUpsertRequest"
              },
              "example": {
                "team_name": "后端 SRE",
                "description": "后端可靠性工程团队",
                "person_ids": [
                  80011,
                  80012
                ]
              }
            }
          }
        }
      }
    },
    "/team/delete": {
      "post": {
        "operationId": "team-write-delete",
        "summary": "删除团队",
        "description": "按 ID、名称或外部引用 ID 永久删除一个团队。",
        "tags": [
          "平台/团队管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **团队管理**（`organization`） |\n\n## 使用说明\n\n- `team_id`、`team_name`、`ref_id` 三者至少提供一个。\n- 若团队仍被排班、分派策略等资源引用，会返回 `400 ReferenceExist`。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/platform/teams/team-write-delete",
          "metadata": {
            "sidebarTitle": "删除团队"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PlatformEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamDeleteRequest"
              },
              "example": {
                "team_id": 1001
              }
            }
          }
        }
      }
    },
    "/role/info": {
      "post": {
        "operationId": "role-read-info",
        "summary": "查看角色详情",
        "description": "按角色 ID 返回单个角色的详细信息。",
        "tags": [
          "平台/角色与权限"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/platform/roles-permissions/role-read-info",
          "metadata": {
            "sidebarTitle": "查看角色详情"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RoleItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "role_id": 2,
                    "role_name": "账户管理员",
                    "description": "拥有所有权限的账户管理员。",
                    "status": "enabled",
                    "permission_ids": [
                      101,
                      102,
                      201
                    ],
                    "editable": false,
                    "created_at": 1700000000,
                    "updated_at": 1700000000
                  }
                }
              }
            }
          },
          "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/RoleInfoRequest"
              },
              "example": {
                "role_id": 2
              }
            }
          }
        }
      }
    },
    "/role/list": {
      "post": {
        "operationId": "role-read-list",
        "summary": "查看角色列表",
        "description": "返回当前账户下所有自定义及内置角色。",
        "tags": [
          "平台/角色与权限"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 内置角色（`editable: false`）不可修改或删除。",
          "href": "/zh/api-reference/platform/roles-permissions/role-read-list",
          "metadata": {
            "sidebarTitle": "查看角色列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RoleListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 3,
                    "items": [
                      {
                        "role_id": 2,
                        "role_name": "账户管理员",
                        "description": "",
                        "status": "enabled",
                        "permission_ids": [],
                        "editable": false,
                        "created_at": 1700000000,
                        "updated_at": 1700000000
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/RoleListRequest"
              },
              "example": {
                "orderby": "created_at",
                "asc": false
              }
            }
          }
        }
      }
    },
    "/role/upsert": {
      "post": {
        "operationId": "role-write-upsert",
        "summary": "创建或更新角色",
        "description": "创建新的自定义角色或更新已有角色，更新时传入 `role_id`。",
        "tags": [
          "平台/角色与权限"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **角色管理**（`organization`） |\n\n## 使用说明\n\n- 省略 `role_id`（或置为 0）表示创建；传入已有 ID 表示更新。\n- `role_name` 须为 1–39 个字符且在账户内唯一。\n- `permission_ids` 会完整替换角色的权限集合。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/platform/roles-permissions/role-write-upsert",
          "metadata": {
            "sidebarTitle": "创建或更新角色"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RoleUpsertResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "role_id": 150,
                    "role_name": "值班管理员"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleUpsertRequest"
              },
              "example": {
                "role_name": "值班管理员",
                "description": "管理值班排班和故障处理。",
                "permission_ids": [
                  501,
                  502
                ]
              }
            }
          }
        }
      }
    },
    "/role/enable": {
      "post": {
        "operationId": "role-write-enable",
        "summary": "启用角色",
        "description": "重新启用已被禁用的自定义角色。",
        "tags": [
          "平台/角色与权限"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **角色管理**（`organization`） |\n\n## 使用说明\n\n- 只有自定义角色可以被启用/禁用，内置角色始终保持启用状态。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/platform/roles-permissions/role-write-enable",
          "metadata": {
            "sidebarTitle": "启用角色"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PlatformEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleIDRequest"
              },
              "example": {
                "role_id": 150
              }
            }
          }
        }
      }
    },
    "/role/disable": {
      "post": {
        "operationId": "role-write-disable",
        "summary": "禁用角色",
        "description": "禁用自定义角色，使其停止授予权限。",
        "tags": [
          "平台/角色与权限"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **角色管理**（`organization`） |\n\n## 使用说明\n\n- 持有该角色的成员将立即失去其权限。\n- 只有自定义角色可被禁用。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/platform/roles-permissions/role-write-disable",
          "metadata": {
            "sidebarTitle": "禁用角色"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PlatformEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleIDRequest"
              },
              "example": {
                "role_id": 150
              }
            }
          }
        }
      }
    },
    "/role/delete": {
      "post": {
        "operationId": "role-write-delete",
        "summary": "删除角色",
        "description": "永久删除自定义角色并从所有成员处撤销授权。",
        "tags": [
          "平台/角色与权限"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **角色管理**（`organization`） |\n\n## 使用说明\n\n- 内置角色无法删除。\n- 持有该角色的所有成员将立即失去其权限。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/platform/roles-permissions/role-write-delete",
          "metadata": {
            "sidebarTitle": "删除角色"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PlatformEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleIDRequest"
              },
              "example": {
                "role_id": 150
              }
            }
          }
        }
      }
    },
    "/role/permission/list": {
      "post": {
        "operationId": "role-read-list-permission",
        "summary": "查看角色权限集合",
        "description": "返回所有可用权限，可按角色 ID 过滤仅返回指定角色已授予的权限。",
        "tags": [
          "平台/角色与权限"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 传入 `role_ids` 可过滤只返回指定角色已授予的权限。\n- 传入 `with_all: true` 可返回全部权限，并在每项中通过 `is_granted` 标记是否已授予。",
          "href": "/zh/api-reference/platform/roles-permissions/role-read-list-permission",
          "metadata": {
            "sidebarTitle": "查看角色权限集合"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RolePermissionListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "id": 501,
                        "permission_name": "模板查看",
                        "permission_type": "read",
                        "description": "查看通知模板",
                        "class": "On-call",
                        "scope": "on-call",
                        "status": "enabled",
                        "is_granted": true
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/RolePermissionListRequest"
              },
              "example": {
                "role_ids": [
                  150
                ],
                "with_all": true
              }
            }
          }
        }
      }
    },
    "/role/permission/factor/list": {
      "post": {
        "operationId": "role-read-list-permission-factor",
        "summary": "查看权限因子集合",
        "description": "返回所有权限因子（API、按钮、菜单、URL、访问），可按类型过滤。",
        "tags": [
          "平台/角色与权限"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 权限因子是每个权限的细粒度控制项。\n- `factor_types` 可选值：`api`、`button`、`visit`、`menu`、`url`。",
          "href": "/zh/api-reference/platform/roles-permissions/role-read-list-permission-factor",
          "metadata": {
            "sidebarTitle": "查看权限因子集合"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PermissionFactorListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "factor_name": "template:read:info",
                      "factor_type": "api"
                    }
                  ]
                }
              }
            }
          },
          "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/PermissionFactorListRequest"
              },
              "example": {
                "factor_types": [
                  "api"
                ]
              }
            }
          }
        }
      }
    },
    "/role/member/grant": {
      "post": {
        "operationId": "role-write-grant-role",
        "summary": "授予成员账户权限",
        "description": "将角色授予一个或多个成员，赋予其该角色包含的权限。",
        "tags": [
          "平台/角色与权限"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **角色管理**（`organization`） |\n\n## 使用说明\n\n- 每次最多传入 100 个成员 ID。\n- 已持有该角色的成员会被静默跳过。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/platform/roles-permissions/role-write-grant-role",
          "metadata": {
            "sidebarTitle": "授予成员账户权限"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PlatformEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleGrantRequest"
              },
              "example": {
                "member_ids": [
                  80011,
                  80012
                ],
                "role_id": 150
              }
            }
          }
        }
      }
    },
    "/role/member/revoke": {
      "post": {
        "operationId": "role-write-revoke-role",
        "summary": "解除成员账户权限",
        "description": "从一个或多个成员处撤销角色授权。",
        "tags": [
          "平台/角色与权限"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **角色管理**（`organization`） |\n\n## 使用说明\n\n- 未持有该角色的成员会被静默跳过。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/platform/roles-permissions/role-write-revoke-role",
          "metadata": {
            "sidebarTitle": "解除成员账户权限"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PlatformEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleGrantRequest"
              },
              "example": {
                "member_ids": [
                  80011
                ],
                "role_id": 150
              }
            }
          }
        }
      }
    },
    "/audit/search": {
      "post": {
        "operationId": "audit-read-search",
        "summary": "检索审计日志",
        "description": "按时间范围返回游标分页的操作审计日志列表。",
        "tags": [
          "平台/审计日志"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **审计查看**（`organization`） |\n\n## 使用说明\n\n- 时间范围必填。最大跨度 90 天，`start_time` 和 `end_time` 均为 Unix 时间戳（**秒**）。\n- 使用上次响应中的 `search_after_ctx` 获取下一页。该 token 是不透明的，请勿手动构造。\n- 可查询的时间窗口受账户许可证限制，超出保留期的查询会静默返回空结果，而不是报错。\n- 默认每页 20 条，最大 99 条。",
          "href": "/zh/api-reference/platform/audit-logs/audit-read-search",
          "metadata": {
            "sidebarTitle": "检索审计日志"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AuditSearchResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 2,
                    "search_after_ctx": "",
                    "docs": [
                      {
                        "created_at": 1712700123456,
                        "account_id": 10023,
                        "member_id": 80011,
                        "member_name": "Alice",
                        "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                        "ip": "203.0.113.42",
                        "operation": "template:write:create",
                        "operation_name": "创建模板",
                        "body": "{\"template_name\":\"生产默认模板\"}",
                        "params": [],
                        "is_dangerous": false,
                        "is_write": true
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/AuditSearchRequest"
              },
              "example": {
                "start_time": 1712620800,
                "end_time": 1712707200,
                "limit": 20,
                "operations": [
                  "template:write:create",
                  "template:write:delete"
                ]
              }
            }
          }
        }
      }
    },
    "/audit/operation/list": {
      "post": {
        "operationId": "audit-read-operation-list",
        "summary": "查看事件类型列表",
        "description": "返回所有会记录到审计日志中的操作名称，可用于 `operations` 过滤参数。",
        "tags": [
          "平台/审计日志"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **审计查看**（`organization`） |\n\n## 使用说明\n\n- 将本接口返回的 `name` 值作为 `POST /audit/search` 的 `operations` 过滤参数使用。\n- `name_cn` 是控制台展示的中文标签；`name` 是用于过滤的稳定字段值。",
          "href": "/zh/api-reference/platform/audit-logs/audit-read-operation-list",
          "metadata": {
            "sidebarTitle": "查看事件类型列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AuditOperationListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "name": "template:write:create",
                        "name_cn": "创建模板"
                      },
                      {
                        "name": "template:write:delete",
                        "name_cn": "删除模板"
                      },
                      {
                        "name": "incident:write:acknowledge",
                        "name_cn": "认领故障"
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/AuditOperationListRequest"
              },
              "example": {}
            }
          }
        }
      }
    },
    "/field/info": {
      "post": {
        "operationId": "field-read-info",
        "summary": "查看自定义字段",
        "description": "按 ID 查询单个故障自定义字段的配置。",
        "tags": [
          "On-call/标签增强"
        ],
        "x-mint": {
          "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | 每账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限 | **故障可读** (`on-call`) 或 **故障可管理** (`on-call`) |\n\n## 使用说明\n\n- 仅返回非删除状态的字段；`field_id` 已删除或不存在时会返回 400。\n- `options` 与 `default_value` 的形态随 `field_type` 变化，详见 `FieldItem`。",
          "href": "/zh/api-reference/on-call/alert-enrichment/field-read-info",
          "metadata": {
            "sidebarTitle": "查看自定义字段"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/FieldItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "account_id": 80001,
                    "field_id": "66e9d3a4f7c2b04a1c8a91b3",
                    "field_name": "severity_class",
                    "display_name": "Severity Class",
                    "description": "Business severity tier.",
                    "field_type": "single_select",
                    "value_type": "string",
                    "options": [
                      "Critical",
                      "High",
                      "Medium",
                      "Low"
                    ],
                    "default_value": "Medium",
                    "status": "enabled",
                    "creator_id": 80011,
                    "updated_by": 80011,
                    "created_at": 1710000000,
                    "updated_at": 1710000000
                  }
                }
              }
            }
          },
          "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/FieldInfoRequest"
              },
              "example": {
                "field_id": "66e9d3a4f7c2b04a1c8a91b3"
              }
            }
          }
        }
      }
    },
    "/field/list": {
      "post": {
        "operationId": "field-read-list",
        "summary": "查看自定义字段列表",
        "description": "返回账号下所有的故障自定义字段。",
        "tags": [
          "On-call/标签增强"
        ],
        "x-mint": {
          "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | 每账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限 | **故障可读** (`on-call`) 或 **故障可管理** (`on-call`) |\n\n## 使用说明\n\n- 一次性返回全部未删除字段，无分页与 `total`。\n- `query` 同时匹配 `field_name` 与 `display_name`；非法正则会自动转义为字面量子串匹配。",
          "href": "/zh/api-reference/on-call/alert-enrichment/field-read-list",
          "metadata": {
            "sidebarTitle": "查看自定义字段列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/FieldListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "account_id": 80001,
                        "field_id": "66e9d3a4f7c2b04a1c8a91b3",
                        "field_name": "severity_class",
                        "display_name": "Severity Class",
                        "description": "Business severity tier.",
                        "field_type": "single_select",
                        "value_type": "string",
                        "options": [
                          "Critical",
                          "High",
                          "Medium",
                          "Low"
                        ],
                        "default_value": "Medium",
                        "status": "enabled",
                        "creator_id": 80011,
                        "updated_by": 80011,
                        "created_at": 1710000000,
                        "updated_at": 1710000000
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/FieldListRequest"
              },
              "example": {
                "orderby": "updated_at",
                "asc": false,
                "query": "severity"
              }
            }
          }
        }
      }
    },
    "/field/create": {
      "post": {
        "operationId": "field-write-create",
        "summary": "创建自定义字段",
        "description": "为账号新建一个故障自定义字段。",
        "tags": [
          "On-call/标签增强"
        ],
        "x-mint": {
          "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | 每账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限 | **故障可管理** (`on-call`) |\n\n## 使用说明\n\n- 每个账号最多 **15** 个自定义字段。\n- `field_name` 必须匹配 `^[a-zA-Z_][a-zA-Z0-9_]{0,39}$`，创建后不可更改；`display_name` 在账号内须唯一。\n- 类型规则：`checkbox` 仅支持 `value_type=bool` 且无 `options`；`single_select`/`multi_select` 要求 `value_type=string` 且 `options` 非空且元素唯一；`text` 仅支持 `value_type=string` 且无 `options`。\n- 响应仅包含 `field_id` 与 `field_name`，如需完整对象请调用 `/field/info`。\n- 该接口会被审计日志记录。",
          "href": "/zh/api-reference/on-call/alert-enrichment/field-write-create",
          "metadata": {
            "sidebarTitle": "创建自定义字段"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CreateFieldResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "field_id": "66e9d3a4f7c2b04a1c8a91b3",
                    "field_name": "severity_class"
                  }
                }
              }
            }
          },
          "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/CreateFieldRequest"
              },
              "example": {
                "field_name": "severity_class",
                "display_name": "Severity Class",
                "description": "Business severity tier.",
                "field_type": "single_select",
                "value_type": "string",
                "options": [
                  "Critical",
                  "High",
                  "Medium",
                  "Low"
                ],
                "default_value": "Medium"
              }
            }
          }
        }
      }
    },
    "/field/update": {
      "post": {
        "operationId": "field-write-update",
        "summary": "变更自定义字段",
        "description": "修改已有自定义字段的可变属性。",
        "tags": [
          "On-call/标签增强"
        ],
        "x-mint": {
          "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | 每账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限 | **故障可管理** (`on-call`) |\n\n## 使用说明\n\n- 仅可修改 `display_name`、`description`、`options`、`default_value`；`field_name`、`field_type`、`value_type` 不可更改。\n- `options` 与 `default_value` 需保持与字段当前类型一致，规则同创建接口。\n- 该接口会被审计日志记录。",
          "href": "/zh/api-reference/on-call/alert-enrichment/field-write-update",
          "metadata": {
            "sidebarTitle": "变更自定义字段"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "object"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/UpdateFieldRequest"
              },
              "example": {
                "field_id": "66e9d3a4f7c2b04a1c8a91b3",
                "display_name": "Severity Class",
                "description": "Business severity tier.",
                "options": [
                  "Critical",
                  "High",
                  "Medium",
                  "Low"
                ],
                "default_value": "Medium"
              }
            }
          }
        }
      }
    },
    "/field/delete": {
      "post": {
        "operationId": "field-write-delete",
        "summary": "删除自定义字段",
        "description": "删除自定义字段，并异步清理历史故障中的同名字段值。",
        "tags": [
          "On-call/标签增强"
        ],
        "x-mint": {
          "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | 每账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限 | **故障可管理** (`on-call`) |\n\n## 使用说明\n\n- 字段会立即标记为已删除；从历史故障中剥离对应值的清理过程在后台执行，数据量大时可能较慢。\n- 仅当 `field_type` 与 `value_type` 完全一致时，才允许复用已删除字段的 `field_name`。\n- 该接口会被审计日志记录。",
          "href": "/zh/api-reference/on-call/alert-enrichment/field-write-delete",
          "metadata": {
            "sidebarTitle": "删除自定义字段"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "object"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/DeleteFieldRequest"
              },
              "example": {
                "field_id": "66e9d3a4f7c2b04a1c8a91b3"
              }
            }
          }
        }
      }
    },
    "/monit/query/rows": {
      "post": {
        "operationId": "monit-read-query-rows",
        "summary": "查询数据源原始行",
        "description": "对已配置的数据源执行同步即席查询并返回原始行。供 Flashduty AI SRE 及 UI 预览使用。请求通过 WebSocket 转发至 monit-edge,由其对底层数据源(Prometheus / Loki / VictoriaLogs / SLS / MySQL / Postgres / Oracle / ClickHouse / Elasticsearch)执行查询。",
        "tags": [
          "Monitors/诊断分析"
        ],
        "x-mint": {
          "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | **600 次/分钟**;**10 次/秒** 每账户 |\n| 权限 | 任意有效的 `app_key`(只读;不受特定权限分类约束) |\n\n## 使用说明\n\n- 请求通过 WebSocket 转发至 `monit-edge`;`ds_type` + `ds_name` 指定的数据源必须已在调用方账户下存在。\n- 请求体中的 `account_id` 为可选;若提供,必须与已认证账户一致,否则拒绝。\n- 存在两层错误:webapi 层失败使用标准错误信封返回,而 `monit-edge` 执行查询时抛出的错误以 HTTP 200 返回,并在响应体中携带 `error` 对象。除 HTTP 状态外,务必同时检查响应体中的 `error`。\n- monit-edge 强制行数上限;过大结果集会返回 `error.message = \"too many rows\"`。请收窄时间范围或在数据源端聚合。\n- `args` 是一个多态 `string→string` 映射,原样转发。语义取决于 `ds_type`(SLS 需要 `sls.project` + `sls.logstore`;Loki / VictoriaLogs 原始模式需要通过 `*.start`/`*.end` 或 `*.timespan.value`/`*.timespan.unit` 指定时间范围;Prometheus 与 SQL 类数据源忽略该字段)。各数据源的键列表见 monit-webapi query-api 文档。",
          "href": "/zh/api-reference/monitors/diagnostics/monit-read-query-rows",
          "metadata": {
            "sidebarTitle": "查询数据源原始行"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryRowsRequest"
              },
              "example": {
                "account_id": 10001,
                "ds_type": "prometheus",
                "ds_name": "prod-prom",
                "expr": "up",
                "delay_seconds": 30
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/QueryRowsResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "fields": {
                        "__name__": "up",
                        "instance": "10.0.0.1:9100",
                        "job": "node"
                      },
                      "values": {
                        "__value__": 1
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/monit/query/diagnose": {
      "post": {
        "operationId": "monit-read-query-diagnose",
        "summary": "数据源诊断",
        "description": "执行同步诊断查询(Loki/VictoriaLogs 使用 `log_patterns`,Prometheus 使用 `metric_trends`)。Flashduty AI SRE 用于日志模式聚类与时间序列趋势分析。长耗时——最长可达 35 秒。",
        "tags": [
          "Monitors/诊断分析"
        ],
        "x-mint": {
          "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | **600 次/分钟**;**10 次/秒** 每账户 |\n| 权限 | 任意有效的 `app_key`(只读;不受特定权限分类约束) |\n\n## 使用说明\n\n- 这是诊断 / RCA 接口,而非原始数据查询接口——如需查看明细行,请配合 `/monit/query/rows` 使用。\n- `operation` 由 `ds_type` 推导:`loki` / `victorialogs` → `log_patterns`,`prometheus` → `metric_trends`。其他数据源必须显式传入 `operation`。\n- `methods` 选择要执行的分析方法;省略时,`log_patterns` 默认为 `pattern_snapshot + pattern_compare(previous_window)`,`metric_trends` 默认为 `single_window_shape + window_compare(previous_window)`。\n- `time_range` 单位为 Unix 秒;缺失或无效时默认最近 15 分钟;窗口宽度超过 6 小时将被拒绝。\n- 请求通过 WebSocket 转发至 `monit-edge`。长耗时:边缘侧执行可能耗时约 30 秒,叠加 webapi 开销。客户端超时应至少设置为 **35 秒**。\n- `options.*` 由边缘侧设置上限(`max_logs_scanned` ≤ 50 000,`max_patterns` ≤ 50,`examples_per_pattern` ≤ 3,`step_seconds` ∈ [15, 300],`max_series` ≤ 200,`topk` ≤ 50,`timeout_seconds` ≤ 30)。\n- 与 `/monit/query/rows` 一样存在两层错误:边缘侧执行错误以 HTTP 200 返回,响应体中带 `error` 对象——务必同时检查两层。\n- 日志样例在返回前会经过基础脱敏处理,响应中会带 `warnings: [\"examples redacted\"]`。不可作为原始日志使用。",
          "href": "/zh/api-reference/monitors/diagnostics/monit-read-query-diagnose",
          "metadata": {
            "sidebarTitle": "数据源诊断"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiagnoseRequest"
              },
              "example": {
                "account_id": 10001,
                "ds_type": "victorialogs",
                "ds_name": "vmlogs-read",
                "operation": "log_patterns",
                "time_range": {
                  "start": 1776847544,
                  "end": 1776849344
                },
                "methods": [
                  {
                    "name": "pattern_snapshot"
                  },
                  {
                    "name": "pattern_compare",
                    "baseline": "same_window_yesterday"
                  }
                ],
                "input": {
                  "query": "_stream:{status='500'}"
                },
                "options": {
                  "max_logs_scanned": 10000,
                  "max_patterns": 20,
                  "examples_per_pattern": 2,
                  "timeout_seconds": 25
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/DiagnoseResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "operation": "log_patterns",
                    "ds_type": "victorialogs",
                    "ds_name": "vmlogs-read",
                    "query": "_stream:{status='500'}",
                    "window": {
                      "start": 1776847544,
                      "end": 1776849344
                    },
                    "results": [
                      {
                        "method": "pattern_snapshot",
                        "window": {
                          "start": 1776847544,
                          "end": 1776849344
                        },
                        "summary": {
                          "logs_scanned": 405,
                          "baseline_logs_scanned": 0,
                          "current_truncated": false,
                          "baseline_truncated": false,
                          "patterns_total": 2,
                          "returned_patterns": 2,
                          "new_patterns": 0,
                          "surging_patterns": 0,
                          "surging_threshold": {
                            "change_ratio_min": 3,
                            "count_min": 5
                          }
                        },
                        "patterns": [
                          {
                            "pattern_hash": "239fa5da",
                            "template": "POST /api/v<number>/orders/<number> HTTP/<number>",
                            "count": 213,
                            "first_seen": 1776847562,
                            "last_seen": 1776849336,
                            "severity": "unknown",
                            "approximate": false,
                            "sources": [
                              {
                                "field": "pod",
                                "value": "order-api-7f69d8d9b6-m4x9n",
                                "count": 130
                              }
                            ],
                            "examples": [
                              "POST /api/v<number>/orders/<number> HTTP/<number>"
                            ]
                          }
                        ],
                        "warnings": [
                          "examples redacted"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/monit/tools/catalog": {
      "post": {
        "operationId": "monit-read-tools-catalog",
        "summary": "查询监控对象工具能力清单",
        "description": "根据 `target_locator`(host、mysql 等)查询该监控对象上 monit-agent 当前暴露的工具能力。返回每个工具的名称、描述以及 JSON-Schema `input_schema`。配合 `/monit/tools/invoke` 驱动 AI-SRE 的工具调用。",
        "tags": [
          "Monitors/诊断分析"
        ],
        "x-mint": {
          "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | **600 次/分钟**;**10 次/秒** 每账户 |\n| 权限 | 任意有效的 `app_key`(只读;不受特定权限分类约束) |\n\n## 使用说明\n\n- 使用 `target_locator` 标识监控对象;`target_kind` 可选,省略时自动推断。内置的 target kind 包括 `host` 与 `mysql`。\n- 若同一 locator 匹配多个 kind,响应为 HTTP 200,`data.error.code = \"ambiguous_target_kind\"`,并附带 `target_kinds` 列表——请带上显式的 `target_kind` 重试。\n- 工具能力清单是*候选能力*视图,并非执行保证。目标 Agent 可能在拿到清单与发起调用之间下线,本地 Agent 策略也可能在调用时拦截某些工具。\n- 设置 `include_output_shape: true` 可额外返回每个工具的 `output_shape`。默认为 `false`,以便为 LLM 消费保持响应精简。\n- 业务错误(`target_unavailable`、`unknown_toolset_hash`、`ambiguous_target_kind`)以 HTTP 200 返回,`data.error` 非空。只有协议 / 鉴权 / 内部错误才使用标准错误信封。",
          "href": "/zh/api-reference/monitors/diagnostics/monit-read-tools-catalog",
          "metadata": {
            "sidebarTitle": "查询监控对象工具能力清单"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ToolCatalogRequest"
              },
              "example": {
                "account_id": 10001,
                "target_locator": "web-01",
                "include_output_shape": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ToolCatalogResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "target": {
                      "kind": "host",
                      "locator": "web-01"
                    },
                    "tools": [
                      {
                        "name": "os.overview",
                        "target_kind": "host",
                        "description": "Returns a bounded overview of host health (CPU, memory, disk, network, top processes).",
                        "input_schema": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {}
                        },
                        "output_shape": {
                          "type": "object",
                          "required": [
                            "data",
                            "summary",
                            "truncated"
                          ],
                          "properties": {
                            "data": {
                              "type": "object"
                            },
                            "summary": {
                              "type": "string"
                            },
                            "truncated": {
                              "type": "object"
                            }
                          }
                        }
                      }
                    ],
                    "error": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/monit/tools/invoke": {
      "post": {
        "operationId": "monit-read-tools-invoke",
        "summary": "调用监控对象工具",
        "description": "在单个监控对象上并发调用至多 8 个 monit-agent 工具。结果按入参 `tools` 数组顺序返回。长耗时——单个工具在 Agent 上有自己的超时,整体请求可能耗时数十秒。",
        "tags": [
          "Monitors/诊断分析"
        ],
        "x-mint": {
          "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | **600 次/分钟**;**10 次/秒** 每账户 |\n| 权限 | 任意有效的 `app_key`(只读;不受特定权限分类约束) |\n\n## 使用说明\n\n- 单次调用至多 **8** 个工具(`MaxToolsPerInvoke`);超出需在客户端拆分。8 个工具的上限与单监控对象 Agent 的并发能力对齐。\n- 工具在 Agent 上并行执行;webapi 返回的 `results[]` 与请求中的 `tools[]` 顺序对齐。\n- 长耗时:客户端超时至少设置 **35 秒**。该接口面向 AI-SRE / 人工排障流程,不适用于交互式 UI。\n- 请求级错误(`target_unavailable`、`ambiguous_target_kind`、`unknown_toolset_hash`、`forward_failed`)以 HTTP 200 返回,`data.error` 不为空,`data.results = []`。\n- 单工具失败以 HTTP 200 返回,`data.error = null`,`results[i].error` 被填充——务必同时检查**三层**(外层信封 `error`、`data.error`、再到每个 `results[i].error`)。\n- 每条结果带两个耗时字段:`agent_elapsed_ms`(Agent 自报,不含网络)与 `e2e_elapsed_ms`(webapi 观测的端到端)。两者差距较大表示网络 / 边缘侧慢,而非工具执行慢。\n- 按 `/monit/tools/catalog` 返回的 `input_schema` 构造 `tools[].params`。对于无参工具,务必显式传 `params: {}`。",
          "href": "/zh/api-reference/monitors/diagnostics/monit-read-tools-invoke",
          "metadata": {
            "sidebarTitle": "调用监控对象工具"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ToolInvokeRequest"
              },
              "example": {
                "account_id": 10001,
                "target_locator": "web-01",
                "tools": [
                  {
                    "tool": "os.overview",
                    "params": {}
                  },
                  {
                    "tool": "net.tcp_ping",
                    "params": {
                      "host": "10.0.0.10",
                      "port": 3306
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ToolInvokeResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "target": {
                      "kind": "host",
                      "locator": "web-01"
                    },
                    "results": [
                      {
                        "tool": "os.overview",
                        "tool_version": "0.5.0",
                        "data": {
                          "data": {
                            "sample_interval_sec": 3,
                            "degraded": false,
                            "degradation_reasons": []
                          },
                          "summary": "os.overview ...",
                          "truncated": {
                            "truncated": false
                          }
                        },
                        "error": null,
                        "agent_elapsed_ms": 3120,
                        "e2e_elapsed_ms": 3188
                      },
                      {
                        "tool": "net.tcp_ping",
                        "tool_version": "0.5.0",
                        "data": null,
                        "error": {
                          "code": "target_unreachable",
                          "message": "dial tcp 10.0.0.10:3306: i/o timeout"
                        },
                        "agent_elapsed_ms": 0,
                        "e2e_elapsed_ms": 2008
                      }
                    ],
                    "error": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/monit/targets": {
      "post": {
        "operationId": "monit-read-targets-list",
        "summary": "监控对象列表",
        "description": "列出当前租户下被 monit-agent 路由投影所观测到的监控对象。支持 `target_locator` 前缀搜索与游标分页。用于为 `/monit/tools/catalog` 与 `/monit/tools/invoke` 选择 `target_locator`。",
        "tags": [
          "Monitors/诊断分析"
        ],
        "x-mint": {
          "content": "## 调用限制\n\n| 项 | 值 |\n| ------ | ----- |\n| 速率限制 | **600 次/分钟**;**10 次/秒** 每账户 |\n| 权限 | 任意有效的 `app_key`(只读;不受特定权限分类约束) |\n\n## 使用说明\n\n- 这是一个 **UI 投影视图**,不是 `/monit/tools/invoke` 所依赖的实时数据源。列表中存在不代表对应监控对象当前可被调用。\n- `keyword` 是对 `target_locator` 的**前缀匹配**(仅 ASCII,不含空白,不含 `|`,最长 256 字节)。v1 不支持子串搜索。\n- `limit` 默认 50,最大 200。分页基于游标:将上次响应中的 `next_cursor` 传入即可拉取下一页;`next_cursor` 为空或缺失表示已到末页。\n- 重置 `keyword`、`limit` 或租户上下文时必须重置 `cursor`;切勿在不同筛选条件之间复用游标。\n- `total` 是当前 `(account_id, keyword)` 组合下未受游标影响的匹配总数,跨页保持稳定。\n- 字段中暴露 `cluster_name` / `edge_ipport` 供排障使用;`updated_at` 表示\"最近一次被观测到\",而非实时在线指标。",
          "href": "/zh/api-reference/monitors/diagnostics/monit-read-targets-list",
          "metadata": {
            "sidebarTitle": "监控对象列表"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TargetsListRequest"
              },
              "example": {
                "keyword": "db-prod",
                "limit": 50
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TargetsListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "target_kind": "host",
                        "target_locator": "db-prod-01",
                        "agent_version": "2.0.0",
                        "cluster_name": "edge-a",
                        "edge_ipport": "10.0.0.1:19090",
                        "updated_at": 1710000000
                      }
                    ],
                    "total": 120,
                    "next_cursor": "eyJ0YXJnZXRfbG9jYXRvciI6ImRiLXByb2QtMDEiLCJpZCI6MTIzNDV9"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/change/list": {
      "post": {
        "operationId": "change-read-list",
        "summary": "查询变更列表",
        "description": "在指定时间窗口内查询变更记录，支持过滤、搜索与分页。",
        "tags": [
          "On-call/变更管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n",
          "href": "/zh/api-reference/on-call/changes/change-read-list",
          "metadata": {
            "sidebarTitle": "查询变更列表"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListChangeResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 1,
                    "has_next_page": false,
                    "items": [
                      {
                        "change_id": "664a1b2c3d4e5f6a7b8c9d0e",
                        "account_id": 10001,
                        "channel_id": 5001,
                        "channel_name": "Production",
                        "channel_status": "active",
                        "integration_id": 362,
                        "integration_name": "GitHub Deploy",
                        "title": "Deploy api-server v2.3.1",
                        "description": "Rolling deploy to production cluster",
                        "change_key": "deploy-api-server-2311",
                        "change_status": "Done",
                        "start_time": 1716962400,
                        "last_time": 1716962700,
                        "end_time": 1716963000,
                        "labels": {
                          "service": "api-server",
                          "env": "prod"
                        },
                        "link": "https://github.com/acme/api-server/actions/runs/123"
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/ListChangeRequest"
              },
              "example": {
                "start_time": 1716960000,
                "end_time": 1717046400,
                "p": 1,
                "limit": 10,
                "integration_ids": [
                  362
                ],
                "orderby": "start_time",
                "asc": false,
                "include_events": false
              }
            }
          }
        }
      }
    },
    "/incident/war-room/default-observers": {
      "post": {
        "operationId": "incident-read-get-war-room-default-observers",
        "summary": "查看作战室默认观察者",
        "description": "返回开启作战室时建议作为默认观察者的历史响应人。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n",
          "href": "/zh/api-reference/on-call/incidents/incident-read-get-war-room-default-observers",
          "metadata": {
            "sidebarTitle": "查看作战室默认观察者"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/GetWarRoomDefaultObserversResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "observers": [
                      {
                        "account_id": 10001,
                        "person_id": 20001,
                        "person_name": "Alice Chen",
                        "avatar": "https://cdn.flashcat.cloud/avatar/20001.png",
                        "email": "alice@acme.com",
                        "phone": "+8613800000000",
                        "locale": "zh-CN",
                        "time_zone": "Asia/Shanghai",
                        "as": "responder",
                        "status": "active"
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/GetWarRoomDefaultObserversRequest"
              },
              "example": {
                "incident_id": "664a1b2c3d4e5f6a7b8c9d0e"
              }
            }
          }
        }
      }
    },
    "/incident/war-room/add-member": {
      "post": {
        "operationId": "incident-write-add-war-room-member",
        "summary": "添加作战室成员",
        "description": "向与故障集成绑定的 IM 作战室添加一名或多名成员。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n",
          "href": "/zh/api-reference/on-call/incidents/incident-write-add-war-room-member",
          "metadata": {
            "sidebarTitle": "添加作战室成员"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "string",
                          "description": "成功时返回字面量 \"ok\"。"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": "ok"
                }
              }
            }
          },
          "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/AddWarRoomMemberRequest"
              },
              "example": {
                "integration_id": 362,
                "chat_id": "oc_5ce6d572455d361153b7cb51da133945",
                "member_ids": [
                  20001,
                  20002
                ]
              }
            }
          }
        }
      }
    },
    "/template/preview": {
      "post": {
        "operationId": "template-read-preview",
        "summary": "预览模板",
        "description": "使用故障数据或模拟数据渲染通知模板并返回结果。",
        "tags": [
          "On-call/通知模板"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **60 次/分钟**；**10 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n",
          "href": "/zh/api-reference/on-call/notification-templates/template-read-preview",
          "metadata": {
            "sidebarTitle": "预览模板"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PreviewTemplateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "success": true,
                    "content": "Incident Database latency spike is Critical",
                    "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/PreviewTemplateRequest"
              },
              "example": {
                "content": "Incident {{.Title}} is {{.Status}}",
                "type": "feishu_app",
                "incident_id": "664a1b2c3d4e5f6a7b8c9d0e"
              }
            }
          }
        }
      }
    },
    "/datasource/im/war-room-enabled/list": {
      "post": {
        "operationId": "im-war-room-enabled-list",
        "summary": "查看开启作战室功能的集成",
        "description": "查询账户下已开启作战室功能的 IM 集成。",
        "tags": [
          "On-call/IM 集成"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n",
          "href": "/zh/api-reference/on-call/integrations/im-war-room-enabled-list",
          "metadata": {
            "sidebarTitle": "查看开启作战室功能的集成"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListWarRoomEnabledResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "data_source_id": 362,
                        "account_id": 10001,
                        "team_id": 0,
                        "plugin_id": 101,
                        "name": "Feishu Ops",
                        "status": "enabled",
                        "category": "im",
                        "plugin_type": "feishu",
                        "plugin_type_name": "Feishu",
                        "description": "Feishu war-room integration",
                        "integration_key": "ik_8f3a2b1c9d0e",
                        "ref_id": "",
                        "settings": {
                          "war_room_enabled": true
                        },
                        "no_editable": false,
                        "creator_id": 20001,
                        "updated_by": 20001,
                        "created_at": 1716962400,
                        "updated_at": 1716962700,
                        "last_time": 1716963000,
                        "exclusive_data_source_id": 0,
                        "integration_id": 362
                      }
                    ]
                  }
                }
              }
            }
          },
          "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": {
                "type": "object"
              },
              "example": {}
            }
          }
        }
      }
    },
    "/status-page/list": {
      "get": {
        "operationId": "status-page-read-page-list",
        "summary": "查询状态页列表",
        "description": "查询账户下所有状态页，包含其组件与分组。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n",
          "href": "/zh/api-reference/on-call/status-pages/status-page-read-page-list",
          "metadata": {
            "sidebarTitle": "查询状态页列表"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListStatusPageResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "page_id": 7001,
                        "name": "Acme Status",
                        "url_name": "acme",
                        "type": "public",
                        "custom_domain": "status.acme.com",
                        "logo_url": "https://acme.com",
                        "page_header": "Acme System Status",
                        "date_view": "calendar",
                        "display_uptime_mode": "chart_and_percentage",
                        "custom_links": [
                          {
                            "name": "Home",
                            "url": "https://acme.com"
                          }
                        ],
                        "contact_info": "mailto:support@acme.com",
                        "components": [
                          {
                            "component_id": "cmp_001",
                            "section_id": "sec_001",
                            "name": "API",
                            "description": "Core API service",
                            "available_since_seconds": 1716962400,
                            "order_id": 1,
                            "hide_uptime": false,
                            "hide_all": false
                          }
                        ],
                        "sections": [
                          {
                            "section_id": "sec_001",
                            "name": "Core Services",
                            "order_id": 1,
                            "hide_uptime": false,
                            "hide_all": false
                          }
                        ],
                        "subscription": {
                          "email": true,
                          "im": false
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/account/info": {
      "post": {
        "summary": "查看主体信息",
        "description": "返回当前主体（账户）的基本信息与设置。",
        "operationId": "account-read-info",
        "tags": [
          "平台/账户设置"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AccountInfo"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "error_code": 0,
                  "data": {
                    "account_id": 1001,
                    "account_name": "acme",
                    "domain": "acme",
                    "extra_domains": [
                      "acme-corp"
                    ],
                    "phone": "138****8000",
                    "country_code": "86",
                    "email": "ops@acme.example",
                    "avatar": "https://cdn.flashcat.cloud/avatar/acme.png",
                    "locale": "zh-CN",
                    "time_zone": "Asia/Shanghai",
                    "created_at": 1716960000,
                    "restrictions": {
                      "ips": [
                        "203.0.113.0/24"
                      ],
                      "email_domains": [
                        "acme.example"
                      ],
                      "allow_subdomain": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-mint": {
          "metadata": {
            "sidebarTitle": "查看主体信息"
          },
          "content": "| 权限 | 描述 |\n| --- | --- |\n| 无 | 无 — 任意有效的 app_key 均可调用此操作。 |\n\n在 [平台 API 参考](/zh/api-reference/platform/account/account-read-info) 中查看此操作。",
          "href": "/zh/api-reference/platform/account/account-read-info"
        }
      }
    },
    "/datasource/im/person/try-link": {
      "post": {
        "operationId": "datasourceImPersonTryLink",
        "summary": "尝试关联 IM 人员",
        "description": "为指定集成尝试将未绑定成员自动关联到对应的 IM 账号。",
        "tags": [
          "On-call/集成中心"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **集成中心管理**（`on-call`） |\n\n## 使用说明\n\n- 服务端使用成员邮箱和手机号在钉钉、飞书或企业微信中查找匹配用户。\n- 如果没有成员可关联，响应中的 `new_linked_person_ids` 为空数组。",
          "href": "/zh/api-reference/on-call/integrations/datasource-im-person-try-link",
          "metadata": {
            "sidebarTitle": "尝试关联 IM 人员"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TryLinkPersonResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "new_linked_person_ids": [
                      5348648172131
                    ]
                  }
                }
              }
            }
          },
          "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/TryLinkPersonRequest"
              },
              "example": {
                "integration_id": 6113996590131
              }
            }
          }
        }
      }
    },
    "/incident/post-mortem/init": {
      "post": {
        "operationId": "postmortem-write-init",
        "summary": "初始化故障复盘",
        "description": "根据一个或多个故障和模板创建复盘草稿。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |\n\n## 使用说明\n\n- 最多可将 10 个故障关联到同一份复盘报告。\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/on-call/incidents/postmortem-write-init",
          "metadata": {
            "sidebarTitle": "初始化故障复盘"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PostMortemItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "meta": {
                      "account_id": 2451002751131,
                      "title": "Postmortem1",
                      "status": "published",
                      "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e",
                      "template_id": "post_mortem_default_tmpl_en-us",
                      "incident_ids": [
                        "69bb9233331067560c718ecd"
                      ],
                      "media_count": 0,
                      "author_ids": [
                        2477273692131
                      ],
                      "team_id": 2477033058131,
                      "channel_id": 3047621227131,
                      "is_private": false,
                      "channel_name": "Ops Channel",
                      "created_at_seconds": 1773900354,
                      "updated_at_seconds": 1773909012
                    },
                    "basics": {
                      "incidents_highest_severity": "Warning",
                      "incidents_earliest_start_seconds": 1761133512,
                      "incidents_latest_close_seconds": 1761133632,
                      "incidents_total_duration_seconds": 120,
                      "responders": [
                        {
                          "person_id": 3790925372131,
                          "assigned_at": 1761133515,
                          "acknowledged_at": 0
                        }
                      ]
                    },
                    "content": {
                      "content": "{\"type\":\"doc\",\"content\":[]}"
                    },
                    "follow_ups": ""
                  }
                }
              }
            }
          },
          "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/InitPostMortemRequest"
              },
              "example": {
                "incident_ids": [
                  "69bb9233331067560c718ecd"
                ],
                "template_id": "post_mortem_default_tmpl_en-us"
              }
            }
          }
        }
      }
    },
    "/incident/post-mortem/basics/reset": {
      "post": {
        "operationId": "postmortem-write-reset-basics",
        "summary": "更新故障复盘基础信息",
        "description": "替换复盘报告中记录的故障基础信息。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/on-call/incidents/postmortem-write-reset-basics",
          "metadata": {
            "sidebarTitle": "更新故障复盘基础信息"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ResetPostMortemBasicsRequest"
              },
              "example": {
                "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e",
                "incidents_highest_severity": "Warning",
                "incidents_earliest_start_seconds": 1761133512,
                "incidents_latest_close_seconds": 1761133632,
                "incidents_total_duration_seconds": 120,
                "responder_ids": [
                  3790925372131
                ]
              }
            }
          }
        }
      }
    },
    "/incident/post-mortem/status/reset": {
      "post": {
        "operationId": "postmortem-write-reset-status",
        "summary": "更新故障复盘状态",
        "description": "将复盘报告设置为草稿或已发布。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/on-call/incidents/postmortem-write-reset-status",
          "metadata": {
            "sidebarTitle": "更新故障复盘状态"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ResetPostMortemStatusRequest"
              },
              "example": {
                "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e",
                "status": "published"
              }
            }
          }
        }
      }
    },
    "/incident/post-mortem/title/reset": {
      "post": {
        "operationId": "postmortem-write-reset-title",
        "summary": "更新故障复盘标题",
        "description": "替换复盘报告标题。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/on-call/incidents/postmortem-write-reset-title",
          "metadata": {
            "sidebarTitle": "更新故障复盘标题"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ResetPostMortemTitleRequest"
              },
              "example": {
                "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e",
                "title": "Production API latency incident"
              }
            }
          }
        }
      }
    },
    "/incident/post-mortem/follow-ups/reset": {
      "post": {
        "operationId": "postmortem-write-reset-follow-ups",
        "summary": "更新故障复盘后续行动",
        "description": "替换复盘报告中的后续行动项。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/on-call/incidents/postmortem-write-reset-follow-ups",
          "metadata": {
            "sidebarTitle": "更新故障复盘后续行动"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/ResetPostMortemFollowUpsRequest"
              },
              "example": {
                "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e",
                "follow_ups": "- Add database saturation alert\n- Review cache TTL rollout"
              }
            }
          }
        }
      }
    },
    "/incident/post-mortem/template/upsert": {
      "post": {
        "operationId": "postmortem-write-upsert-template",
        "summary": "创建或更新故障复盘模板",
        "description": "创建自定义复盘模板，或更新已有模板。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/on-call/incidents/postmortem-write-upsert-template",
          "metadata": {
            "sidebarTitle": "创建或更新故障复盘模板"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PostMortemTemplate"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "account_id": 2451002751131,
                    "template_id": "post_mortem_default_tmpl_en-us",
                    "name": "Default post-mortem report",
                    "description": "Default sections for post-mortem reports.",
                    "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]",
                    "content_markdown": "## Summary\nDescribe what happened.",
                    "team_id": 2477033058131,
                    "created_at_seconds": 1773900000,
                    "updated_at_seconds": 1773903600
                  }
                }
              }
            }
          },
          "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/UpsertPostMortemTemplateRequest"
              },
              "example": {
                "team_id": 2477033058131,
                "name": "Production incident template",
                "description": "Template for production incident reviews.",
                "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]",
                "content_markdown": "## Summary\nDescribe what happened."
              }
            }
          }
        }
      }
    },
    "/incident/post-mortem/template/delete": {
      "post": {
        "operationId": "postmortem-write-delete-template",
        "summary": "删除故障复盘模板",
        "description": "删除自定义复盘模板。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障管理**（`on-call`） |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志，请不要把敏感信息放在请求字段中。",
          "href": "/zh/api-reference/on-call/incidents/postmortem-write-delete-template",
          "metadata": {
            "sidebarTitle": "删除故障复盘模板"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/DeletePostMortemTemplateRequest"
              },
              "example": {
                "template_id": "post_mortem_custom_tmpl_01"
              }
            }
          }
        }
      }
    },
    "/incident/post-mortem/template/list": {
      "post": {
        "operationId": "postmortem-read-list-templates",
        "summary": "查询故障复盘模板列表",
        "description": "返回账号下的内置和自定义故障复盘模板。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/postmortem-read-list-templates",
          "metadata": {
            "sidebarTitle": "查询故障复盘模板列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListPostMortemTemplatesResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 2,
                    "has_next_page": false,
                    "items": [
                      {
                        "account_id": 2451002751131,
                        "template_id": "post_mortem_default_tmpl_en-us",
                        "name": "Default post-mortem report",
                        "description": "Default sections for post-mortem reports.",
                        "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]",
                        "content_markdown": "## Summary\nDescribe what happened.",
                        "team_id": 2477033058131,
                        "created_at_seconds": 1773900000,
                        "updated_at_seconds": 1773903600
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/ListPostMortemTemplatesRequest"
              },
              "example": {
                "p": 1,
                "limit": 20,
                "order_by": "created_at_seconds",
                "asc": false
              }
            }
          }
        }
      }
    },
    "/incident/post-mortem/template/info": {
      "get": {
        "operationId": "postmortem-read-template-info",
        "summary": "查看故障复盘模板详情",
        "description": "按 ID 返回单个故障复盘模板。",
        "tags": [
          "On-call/故障管理"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **故障查看**（`on-call`） |",
          "href": "/zh/api-reference/on-call/incidents/postmortem-read-template-info",
          "metadata": {
            "sidebarTitle": "查看故障复盘模板详情"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PostMortemTemplate"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "account_id": 2451002751131,
                    "template_id": "post_mortem_default_tmpl_en-us",
                    "name": "Default post-mortem report",
                    "description": "Default sections for post-mortem reports.",
                    "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]",
                    "content_markdown": "## Summary\nDescribe what happened.",
                    "team_id": 2477033058131,
                    "created_at_seconds": 1773900000,
                    "updated_at_seconds": 1773903600
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "parameters": [
          {
            "name": "template_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Template ID."
          }
        ]
      }
    },
    "/monit/preview/sync": {
      "post": {
        "operationId": "monit-preview-sync",
        "summary": "同步预览数据源查询",
        "description": "同步执行数据源查询并返回原始结果，用于在保存前预览告警规则表达式的效果。",
        "tags": [
          "Monitors/通用工具"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **60 次/分钟**；**10 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- `ds_type` 须与数据源类型匹配，如 `prometheus`、`loki`。\n- `ds_name` 为账户中配置的数据源显示名称。\n- `delay_seconds` 将查询窗口向前偏移指定秒数，用于补偿数据摄入延迟。\n- 响应体为数据源返回的原始 JSON，其结构随数据源类型而异。",
          "href": "/zh/api-reference/monitors/monitor-utilities/monit-preview-sync",
          "metadata": {
            "sidebarTitle": "同步预览数据源查询"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PreviewSyncResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "status": "success",
                    "data": {
                      "resultType": "vector",
                      "result": []
                    }
                  }
                }
              }
            }
          },
          "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/PreviewSyncRequest"
              },
              "example": {
                "ds_type": "prometheus",
                "ds_name": "生产 Prometheus",
                "expr": "rate(http_requests_total[5m])",
                "delay_seconds": 0
              }
            }
          }
        }
      }
    },
    "/status-page/info": {
      "get": {
        "operationId": "statusPageInfo",
        "summary": "获取状态页详情",
        "description": "获取指定状态页的详细配置信息。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-info",
          "metadata": {
            "sidebarTitle": "获取状态页详情"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "page_id": 5750613685214,
                    "name": "Flashduty Status Page",
                    "url_name": "flashduty-statuspage",
                    "type": "public",
                    "custom_domain": "status.example.com",
                    "logo": "https://cdn.example.com/logo.png",
                    "favicon": "https://cdn.example.com/favicon.png",
                    "page_header": "Welcome to our status page",
                    "page_footer": "2025 Example Corp",
                    "date_view": "list",
                    "display_uptime_mode": "chart_and_percentage",
                    "custom_links": [
                      {
                        "key": "Documentation",
                        "value": "https://docs.example.com"
                      }
                    ],
                    "contact_info": "mailto:support@example.com",
                    "components": [
                      {
                        "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
                        "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2",
                        "name": "Web Console",
                        "available_since_seconds": 1765349358,
                        "order_id": 1
                      }
                    ],
                    "sections": [
                      {
                        "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2",
                        "name": "Core Services",
                        "description": "Our core services",
                        "order_id": 1,
                        "hide_uptime": false,
                        "hide_all": false
                      }
                    ],
                    "subscription": {
                      "email": true,
                      "im": false
                    },
                    "template_preference": "message"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "parameters": [
          {
            "name": "page_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Status page ID"
          }
        ]
      }
    },
    "/status-page/create": {
      "post": {
        "operationId": "statusPageCreate",
        "summary": "创建状态页",
        "description": "创建一个新的状态页。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **状态页面管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-create",
          "metadata": {
            "sidebarTitle": "创建状态页"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CreateStatusPageResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "page_id": 6294565612043,
                    "page_name": "My Status Page",
                    "page_url_name": "my-status-page"
                  }
                }
              }
            }
          },
          "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/CreateStatusPageRequest"
              },
              "example": {
                "name": "My Status Page",
                "url_name": "my-status-page",
                "type": "public",
                "page_header": "Welcome to our status page",
                "contact_info": "mailto:support@example.com"
              }
            }
          }
        }
      }
    },
    "/status-page/update": {
      "post": {
        "operationId": "statusPageUpdate",
        "summary": "更新状态页",
        "description": "更新已有状态页的配置。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **状态页面管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-update",
          "metadata": {
            "sidebarTitle": "更新状态页"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/EmptyRequest"
              },
              "example": {
                "page_id": 5750613685214,
                "name": "Flashduty Status Page (Updated)",
                "page_header": "Updated status page header",
                "contact_info": "mailto:support@example.com"
              }
            }
          }
        }
      }
    },
    "/status-page/delete": {
      "post": {
        "operationId": "statusPageDelete",
        "summary": "删除状态页",
        "description": "删除指定的状态页。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **状态页面管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-delete",
          "metadata": {
            "sidebarTitle": "删除状态页"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/EmptyRequest"
              },
              "example": {
                "page_id": 5750613685214
              }
            }
          }
        }
      }
    },
    "/status-page/component/upsert": {
      "post": {
        "operationId": "statusPageComponentUpsert",
        "summary": "创建或更新状态页组件",
        "description": "在状态页上创建或更新服务组件。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **状态页面管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-component-upsert",
          "metadata": {
            "sidebarTitle": "创建或更新状态页组件"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/UpsertStatusPageComponentResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "component_ids": [
                      "01KP032KMN9YFBMPWANJMFZFG1"
                    ]
                  }
                }
              }
            }
          },
          "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/UpsertStatusPageComponentRequest"
              },
              "example": {
                "page_id": 5750613685214,
                "components": [
                  {
                    "name": "Web Console",
                    "description": "Main web interface",
                    "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2",
                    "order_id": 1
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/status-page/component/delete": {
      "post": {
        "operationId": "statusPageComponentDelete",
        "summary": "删除状态页组件",
        "description": "从状态页删除服务组件。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **状态页面管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-component-delete",
          "metadata": {
            "sidebarTitle": "删除状态页组件"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/DeleteStatusPageComponentRequest"
              },
              "example": {
                "page_id": 5750613685214,
                "component_ids": [
                  "01KP032KMN9YFBMPWANJMFZFG1"
                ]
              }
            }
          }
        }
      }
    },
    "/status-page/section/upsert": {
      "post": {
        "operationId": "statusPageSectionUpsert",
        "summary": "创建或更新状态页区域",
        "description": "在状态页上创建或更新区域。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **状态页面管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-section-upsert",
          "metadata": {
            "sidebarTitle": "创建或更新状态页区域"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/UpsertStatusPageSectionResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "section_ids": [
                      "01KP032J1FV2H8DDGN0QSJ1CAR"
                    ]
                  }
                }
              }
            }
          },
          "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/UpsertStatusPageSectionRequest"
              },
              "example": {
                "page_id": 5750613685214,
                "sections": [
                  {
                    "name": "Core Services",
                    "description": "Our core services",
                    "order_id": 1
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/status-page/section/delete": {
      "post": {
        "operationId": "statusPageSectionDelete",
        "summary": "删除状态页区域",
        "description": "从状态页删除区域。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **状态页面管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-section-delete",
          "metadata": {
            "sidebarTitle": "删除状态页区域"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/DeleteStatusPageSectionRequest"
              },
              "example": {
                "page_id": 5750613685214,
                "section_ids": [
                  "01KP032J1FV2H8DDGN0QSJ1CAR"
                ]
              }
            }
          }
        }
      }
    },
    "/status-page/template/upsert": {
      "post": {
        "operationId": "statusPageTemplateUpsert",
        "summary": "创建或更新状态页模板",
        "description": "创建或更新状态页的事件模板。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **状态页面管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-template-upsert",
          "metadata": {
            "sidebarTitle": "创建或更新状态页模板"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/UpsertStatusPageTemplateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "template_id": "01KP0339G5XDEPM4R86T2B23EP"
                  }
                }
              }
            }
          },
          "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/UpsertStatusPageTemplateRequest"
              },
              "example": {
                "page_id": 5720156736380,
                "type": "pre_defined",
                "template": {
                  "title": "Service Disruption",
                  "event_type": "incident",
                  "status": "investigating",
                  "description": "We are investigating a service disruption affecting some users."
                }
              }
            }
          }
        }
      }
    },
    "/status-page/template/delete": {
      "post": {
        "operationId": "statusPageTemplateDelete",
        "summary": "删除状态页模板",
        "description": "删除状态页的事件模板。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **状态页面管理**（`on-call`） |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-template-delete",
          "metadata": {
            "sidebarTitle": "删除状态页模板"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "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/DeleteStatusPageTemplateRequest"
              },
              "example": {
                "page_id": 5720156736380,
                "type": "pre_defined",
                "template_id": "01KP0339G5XDEPM4R86T2B23EP"
              }
            }
          }
        }
      }
    },
    "/status-page/template/list": {
      "get": {
        "operationId": "statusPageTemplateList",
        "summary": "查询状态页模板列表",
        "description": "查询状态页的所有事件模板。",
        "tags": [
          "On-call/状态页"
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |",
          "href": "/zh/api-reference/on-call/status-pages/status-page-template-list",
          "metadata": {
            "sidebarTitle": "查询状态页模板列表"
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "template_id": "01KC8KP6PHVPSCAB0BTKZBN2HR",
                        "title": "Service Disruption",
                        "type": "incident",
                        "status": "identified",
                        "description": "We have identified the root cause."
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "parameters": [
          {
            "name": "page_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Status page ID."
          },
          {
            "name": "type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "pre_defined",
                "message"
              ]
            },
            "description": "Template category. `pre_defined` returns predefined event templates; `message` returns message notification templates."
          }
        ]
      }
    },
    "/safari/a2a-agent/create": {
      "post": {
        "operationId": "remote-agent-write-create",
        "summary": "创建 A2A 智能体",
        "description": "通过智能体卡片 URL 注册新的 A2A 远程智能体。",
        "tags": [
          "zh"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **300 次/分钟**；**20 次/秒** |\n| 权限要求 | **Agent 管理**（`ai-sre`） |\n\n## 使用说明\n\n- `instructions` 为必填项；已弃用的 `description` 字段仍保留以兼容旧客户端，若两者同时传入则必须与 `instructions` 完全一致。\n- `card_url` 必须是 host 非空的绝对 `http`/`https` URL（可达性由执行环境验证，此处不检查）；`auth_type` 仅接受 `none`、`api_key` 或 `bearer`。\n- `environment_kind` 仅接受空字符串（自动）或 `byoc`；`cloud` 将被拒绝。`byoc` 需要 `environment_id`，且该 Runner 对调用者可见。\n- 创建到某个团队（`team_id > 0`）需要调用者真实属于该团队；只有账户 owner/admin 可以在账户级（`team_id=0`）创建。\n- 每次调用都会记录到账户审计日志。\n",
          "href": "/zh/api-reference/ai-sre/a2a-agents/remote-agent-write-create",
          "metadata": {
            "sidebarTitle": "创建 A2A 智能体"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/A2AAgentCreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/A2AAgentCreateRequest"
              },
              "example": {
                "agent_name": "deploy-bot",
                "instructions": "Inspect deployment pipelines and propose rollbacks when a canary fails health checks.",
                "card_url": "https://agents.example.com/deploy-bot/card",
                "auth_type": "bearer",
                "streaming": true,
                "team_id": 0,
                "environment_kind": "byoc",
                "environment_id": "env_8s7Hn2kLpQ3xYbVc4Wd2m"
              }
            }
          }
        }
      }
    },
    "/safari/a2a-agent/delete": {
      "post": {
        "operationId": "remote-agent-write-delete",
        "summary": "删除 A2A 智能体",
        "description": "按 ID 软删除 A2A 智能体。",
        "tags": [
          "zh"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **300 次/分钟**；**20 次/秒** |\n| 权限要求 | **Agent 管理**（`ai-sre`） |\n\n## 使用说明\n\n- 删除为软删除；删除后该智能体不再出现在列表/详情中，也无法再被调度。\n- 需要对智能体所属团队具备编辑权限（`access.CanEdit`）。\n- 每次调用都会记录到账户审计日志。\n",
          "href": "/zh/api-reference/ai-sre/a2a-agents/remote-agent-write-delete",
          "metadata": {
            "sidebarTitle": "删除 A2A 智能体"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "null",
                          "description": "Always null on success."
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/A2AAgentIDRequest"
              },
              "example": {
                "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D"
              }
            }
          }
        }
      }
    },
    "/safari/a2a-agent/disable": {
      "post": {
        "operationId": "remote-agent-write-disable",
        "summary": "禁用 A2A 智能体",
        "description": "禁用已启用的 A2A 智能体。",
        "tags": [
          "zh"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **300 次/分钟**；**20 次/秒** |\n| 权限要求 | **Agent 管理**（`ai-sre`） |\n\n## 使用说明\n\n- 需要对智能体所属团队具备编辑权限（`access.CanEdit`）。\n- 若智能体已处于禁用状态，返回 `InvalidParameter`。\n- 每次调用都会记录到账户审计日志。\n",
          "href": "/zh/api-reference/ai-sre/a2a-agents/remote-agent-write-disable",
          "metadata": {
            "sidebarTitle": "禁用 A2A 智能体"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "null",
                          "description": "Always null on success."
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/A2AAgentIDRequest"
              },
              "example": {
                "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D"
              }
            }
          }
        }
      }
    },
    "/safari/a2a-agent/enable": {
      "post": {
        "operationId": "remote-agent-write-enable",
        "summary": "启用 A2A 智能体",
        "description": "启用已禁用的 A2A 智能体。",
        "tags": [
          "zh"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **300 次/分钟**；**20 次/秒** |\n| 权限要求 | **Agent 管理**（`ai-sre`） |\n\n## 使用说明\n\n- 需要对智能体所属团队具备编辑权限（`access.CanEdit`），仅可见不足以调用。\n- 若智能体已处于启用状态，返回 `InvalidParameter`。\n- 每次调用都会记录到账户审计日志。\n",
          "href": "/zh/api-reference/ai-sre/a2a-agents/remote-agent-write-enable",
          "metadata": {
            "sidebarTitle": "启用 A2A 智能体"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "null",
                          "description": "Always null on success."
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/A2AAgentIDRequest"
              },
              "example": {
                "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D"
              }
            }
          }
        }
      }
    },
    "/safari/a2a-agent/get": {
      "post": {
        "operationId": "remote-agent-read-get",
        "summary": "查看 A2A 智能体详情",
        "description": "按 ID 查看单个 A2A 智能体。",
        "tags": [
          "zh"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- `card_resolve_timeout` 与 `task_timeout` 目前恒为 `0` —— API 尚未提供设置方式。\n",
          "href": "/zh/api-reference/ai-sre/a2a-agents/remote-agent-read-get",
          "metadata": {
            "sidebarTitle": "查看 A2A 智能体详情"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/A2AAgentItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D",
                    "account_id": 10023,
                    "team_id": 0,
                    "can_edit": true,
                    "environment_kind": "",
                    "environment_id": "",
                    "agent_name": "deploy-bot",
                    "instructions": "Inspect deployment pipelines and propose rollbacks when a canary fails health checks.",
                    "card_url": "https://agents.example.com/deploy-bot/card",
                    "auth_type": "bearer",
                    "streaming": true,
                    "status": "enabled",
                    "agent_card_name": "Deploy Bot",
                    "agent_card_skills": [
                      "rollback",
                      "diff"
                    ],
                    "card_resolve_timeout": 0,
                    "task_timeout": 0,
                    "auth_mode": "shared",
                    "created_by": 80011,
                    "created_at": 1716960000000,
                    "updated_at": 1717046400000
                  }
                }
              }
            }
          },
          "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/A2AAgentIDRequest"
              },
              "example": {
                "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D"
              }
            }
          }
        }
      }
    },
    "/safari/a2a-agent/list": {
      "post": {
        "operationId": "remote-agent-read-list",
        "summary": "查询 A2A 智能体列表",
        "description": "分页查询调用者在账户与团队范围内可见的 A2A 智能体。",
        "tags": [
          "zh"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 分页使用 `offset`/`limit`（而非 `p`/`limit`）。\n- `scope=account` 仅返回账户级智能体；`scope=team` 仅返回调用者可见团队中的智能体；默认 `all` 两者兼含，受 `include_account` 影响。\n- `query` 会在智能体名称、指令、卡片 URL、智能体 ID 以及解析得到的卡片名称中执行不区分大小写的子串搜索。\n- `card_resolve_timeout` 与 `task_timeout` 目前恒为 `0` —— API 尚未提供设置方式。\n",
          "href": "/zh/api-reference/ai-sre/a2a-agents/remote-agent-read-list",
          "metadata": {
            "sidebarTitle": "查询 A2A 智能体列表"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/A2AAgentListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D",
                        "account_id": 10023,
                        "team_id": 0,
                        "can_edit": true,
                        "environment_kind": "",
                        "environment_id": "",
                        "agent_name": "deploy-bot",
                        "instructions": "Inspect deployment pipelines and propose rollbacks when a canary fails health checks.",
                        "card_url": "https://agents.example.com/deploy-bot/card",
                        "auth_type": "bearer",
                        "streaming": true,
                        "status": "enabled",
                        "agent_card_name": "Deploy Bot",
                        "agent_card_skills": [
                          "rollback",
                          "diff"
                        ],
                        "card_resolve_timeout": 0,
                        "task_timeout": 0,
                        "auth_mode": "shared",
                        "created_by": 80011,
                        "created_at": 1716960000000,
                        "updated_at": 1717046400000
                      }
                    ],
                    "total": 1
                  }
                }
              }
            }
          },
          "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/A2AAgentListRequest"
              },
              "example": {
                "offset": 0,
                "limit": 20,
                "include_account": true
              }
            }
          }
        }
      }
    },
    "/safari/a2a-agent/update": {
      "post": {
        "operationId": "remote-agent-write-update",
        "summary": "更新 A2A 智能体",
        "description": "对 A2A 智能体执行部分更新；省略字段表示不变。",
        "tags": [
          "zh"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **300 次/分钟**；**20 次/秒** |\n| 权限要求 | **Agent 管理**（`ai-sre`） |\n\n## 使用说明\n\n- 任何字段变更前都需要对智能体*当前*所属团队具备编辑权限（`access.CanEdit`）。\n- 重新分配 `team_id` 需要对目标团队的权限；若团队变更且未同时传入新的环境绑定，则现有 Runner 绑定必须对调用者仍可选，否则更新将被拒绝。\n- 变更 `auth_mode` 时会始终一并重写 `secret_schema`；若变更 `auth_mode` 时未传入 `oauth_metadata`，则将其清空。\n- 对敏感的 `auth_config` 键（`api_key`、`token`、`client_secret`）回传挖码值或空字符串将保留已存储的密钥，而不会覆盖。\n- 每次调用都会记录到账户审计日志。\n",
          "href": "/zh/api-reference/ai-sre/a2a-agents/remote-agent-write-update",
          "metadata": {
            "sidebarTitle": "更新 A2A 智能体"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "null",
                          "description": "Always null on success."
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/A2AAgentUpdateRequest"
              },
              "example": {
                "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D",
                "instructions": "Inspect deployment pipelines and propose rollbacks."
              }
            }
          }
        }
      }
    },
    "/safari/automation/rule/create": {
      "post": {
        "operationId": "automation-rule-write-create",
        "summary": "创建自动化规则",
        "description": "创建自动化规则，支持 schedule、HTTP POST 和 On-call 故障触发器。",
        "tags": [
          "AI SRE/自动化"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**；**20 次/秒** |\n| 权限要求 | 有效 `app_key`；管理操作要求调用者可管理目标规则 |\n\n## 使用说明\n\n- 可以创建个人规则，也可以创建当前账户下任意团队的规则；`team_id` 创建后不可修改。\n- `cron_expr` 按 `timezone`（如提供）计算；未提供时依次回退到调用者的成员时区、账户时区，最后是 UTC。\n- `http_post_trigger_enabled=true` 会创建并启用 HTTP POST 触发器；响应中的 `http_post_token` 是仅在创建时返回的一次性值，请立即保存。\n- `oncall_incident_trigger_enabled=true` 时，`oncall_incident_channel_ids` 和 `oncall_incident_severities` 至少各需一项；匹配的故障会以 `trigger_kind=oncall_incident` 运行。\n- 每次调用都会记录到账户审计日志。\n",
          "href": "/zh/api-reference/ai-sre/automations/automation-rule-write-create",
          "metadata": {
            "sidebarTitle": "创建自动化规则"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AutomationRuleItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b",
                    "account_id": 10023,
                    "team_id": 123,
                    "owner_id": 80011,
                    "name": "Weekly on-call review",
                    "enabled": true,
                    "run_scope": "team",
                    "cron_expr": "0 9 * * 1",
                    "timezone": "Asia/Shanghai",
                    "prompt": "Summarize last week's alert noise and escalation load.",
                    "environment_kind": "",
                    "environment_id": "",
                    "schedule_trigger_id": "atrig_6aKp3wT9mQ2xVc8bR1nY7z",
                    "schedule_trigger_enabled": true,
                    "http_post_trigger_id": "atrig_2bLq4xT8mP1sWd9cN3rF6y",
                    "http_post_trigger_url": "/safari/automation/triggers/atrig_2bLq4xT8mP1sWd9cN3rF6y/fire",
                    "http_post_trigger_enabled": true,
                    "can_edit": true,
                    "created_at": 1780367971228,
                    "updated_at": 1780367971228,
                    "http_post_token": "sat_yQ9p8V7n6M5k4J3h2G1f0E9d8C7b6A5z4Y3x2W1v0U",
                    "schedule_next_fire_at_ms": 1780630800000,
                    "oncall_incident_trigger_id": "atrig_9cVb2mN7qKs4dEa8T1rY5p",
                    "oncall_incident_trigger_enabled": true,
                    "oncall_incident_channel_ids": [
                      456
                    ],
                    "oncall_incident_severities": [
                      "Critical",
                      "Warning"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationRuleCreateRequest"
              },
              "example": {
                "name": "Weekly on-call review",
                "team_id": 123,
                "enabled": true,
                "cron_expr": "0 9 * * 1",
                "timezone": "Asia/Shanghai",
                "schedule_trigger_enabled": true,
                "prompt": "Summarize last week's alert noise and escalation load.",
                "http_post_trigger_enabled": true,
                "oncall_incident_trigger_enabled": true,
                "oncall_incident_channel_ids": [
                  456
                ],
                "oncall_incident_severities": [
                  "Critical",
                  "Warning"
                ]
              }
            }
          }
        }
      }
    },
    "/safari/automation/rule/delete": {
      "post": {
        "operationId": "automation-rule-write-delete",
        "summary": "删除自动化规则",
        "description": "删除一条自动化规则。",
        "tags": [
          "AI SRE/自动化"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**；**20 次/秒** |\n| 权限要求 | 有效 `app_key`；管理操作要求调用者可管理目标规则 |\n\n## 使用说明\n\n- 删除规则会同时移除其 schedule、HTTP POST 和 On-call 故障触发器；被删除的 HTTP POST 触发器 token 会立即失效。\n- 每次调用都会记录到账户审计日志。\n",
          "href": "/zh/api-reference/ai-sre/automations/automation-rule-write-delete",
          "metadata": {
            "sidebarTitle": "删除自动化规则"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "null",
                          "description": "成功时固定为 null。"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationRuleIDRequest"
              },
              "example": {
                "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b"
              }
            }
          }
        }
      }
    },
    "/safari/automation/rule/get": {
      "post": {
        "operationId": "automation-rule-read-get",
        "summary": "查看自动化规则",
        "description": "按 ID 查看一条自动化规则。",
        "tags": [
          "AI SRE/自动化"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 有效 `app_key`；调用者必须可管理目标规则 |\n\n## 使用说明\n\n- 管理权限指：个人规则仅限创建者；团队规则限账户管理员或规则所属团队成员。\n",
          "href": "/zh/api-reference/ai-sre/automations/automation-rule-read-get",
          "metadata": {
            "sidebarTitle": "查看自动化规则"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AutomationRuleItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b",
                    "account_id": 10023,
                    "team_id": 123,
                    "owner_id": 80011,
                    "name": "Weekly on-call review",
                    "enabled": true,
                    "run_scope": "team",
                    "cron_expr": "0 9 * * 1",
                    "timezone": "Asia/Shanghai",
                    "prompt": "Summarize last week's alert noise and escalation load.",
                    "environment_kind": "",
                    "environment_id": "",
                    "schedule_trigger_id": "atrig_6aKp3wT9mQ2xVc8bR1nY7z",
                    "schedule_trigger_enabled": true,
                    "http_post_trigger_id": "atrig_2bLq4xT8mP1sWd9cN3rF6y",
                    "http_post_trigger_url": "/safari/automation/triggers/atrig_2bLq4xT8mP1sWd9cN3rF6y/fire",
                    "http_post_trigger_enabled": true,
                    "can_edit": true,
                    "created_at": 1780367971228,
                    "updated_at": 1780367971228,
                    "http_post_token": "sat_yQ9p8V7n6M5k4J3h2G1f0E9d8C7b6A5z4Y3x2W1v0U",
                    "schedule_next_fire_at_ms": 1780630800000,
                    "oncall_incident_trigger_id": "atrig_9cVb2mN7qKs4dEa8T1rY5p",
                    "oncall_incident_trigger_enabled": true,
                    "oncall_incident_channel_ids": [
                      456
                    ],
                    "oncall_incident_severities": [
                      "Critical",
                      "Warning"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationRuleIDRequest"
              },
              "example": {
                "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b"
              }
            }
          }
        }
      }
    },
    "/safari/automation/rule/list": {
      "post": {
        "operationId": "automation-rule-read-list",
        "summary": "列出自动化规则",
        "description": "列出当前调用者可见的自动化规则。",
        "tags": [
          "AI SRE/自动化"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 有效 `app_key`；结果按调用者可见范围过滤 |\n\n## 使用说明\n\n- `all` 返回调用者自己的个人规则，以及调用者可访问团队的团队规则。\n- 账户管理员在列表中可见所有团队规则，但不可见他人的个人规则。\n- `team_ids` 只会收窄可见集合，不会扩大访问范围。\n",
          "href": "/zh/api-reference/ai-sre/automations/automation-rule-read-list",
          "metadata": {
            "sidebarTitle": "列出自动化规则"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AutomationRuleListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 1,
                    "rules": [
                      {
                        "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b",
                        "account_id": 10023,
                        "team_id": 123,
                        "owner_id": 80011,
                        "name": "Weekly on-call review",
                        "enabled": true,
                        "run_scope": "team",
                        "cron_expr": "0 9 * * 1",
                        "timezone": "Asia/Shanghai",
                        "prompt": "Summarize last week's alert noise and escalation load.",
                        "environment_kind": "",
                        "environment_id": "",
                        "schedule_trigger_id": "atrig_6aKp3wT9mQ2xVc8bR1nY7z",
                        "schedule_trigger_enabled": true,
                        "http_post_trigger_id": "atrig_2bLq4xT8mP1sWd9cN3rF6y",
                        "http_post_trigger_url": "/safari/automation/triggers/atrig_2bLq4xT8mP1sWd9cN3rF6y/fire",
                        "http_post_trigger_enabled": true,
                        "can_edit": true,
                        "created_at": 1780367971228,
                        "updated_at": 1780367971228,
                        "http_post_token": "sat_yQ9p8V7n6M5k4J3h2G1f0E9d8C7b6A5z4Y3x2W1v0U",
                        "schedule_next_fire_at_ms": 1780630800000,
                        "oncall_incident_trigger_id": "atrig_9cVb2mN7qKs4dEa8T1rY5p",
                        "oncall_incident_trigger_enabled": true,
                        "oncall_incident_channel_ids": [
                          456
                        ],
                        "oncall_incident_severities": [
                          "Critical",
                          "Warning"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationRuleListRequest"
              },
              "example": {
                "scope": "all",
                "limit": 20
              }
            }
          }
        }
      }
    },
    "/safari/automation/rule/run": {
      "post": {
        "operationId": "automation-rule-write-run",
        "summary": "运行自动化规则",
        "description": "立即手动运行一次自动化规则，不受其计划触发时间限制。",
        "tags": [
          "AI SRE/自动化"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **100 次/分钟**；**5 次/秒** |\n| 权限要求 | 有效 `app_key`；调用者必须可管理目标规则 |\n\n## 使用说明\n\n- 同一规则的手动运行限速为每分钟最多一次；在此窗口内的第二次调用会返回 `429`，`code` 为 `\"RequestTooFrequently\"`。\n- 只有已启用的规则才能手动运行；已禁用或配置无效的规则会在创建运行前以 `400` 错误未通过预检。\n- 调用在底层 Agent 会话启动后即返回，而非等待运行结束；运行会继续异步执行——可使用列出自动化运行历史查询完成状态。\n- 以此方式发起的运行，`trigger_kind` 固定为 `manual`，在运行历史中与 `schedule`、`http_post`、`oncall_incident` 区分开来。\n- 每次调用都会记录到账户审计日志。\n",
          "href": "/zh/api-reference/ai-sre/automations/automation-rule-write-run",
          "metadata": {
            "sidebarTitle": "运行自动化规则"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ManualRunRuleResult"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b",
                    "trigger_kind": "manual",
                    "preflight": {
                      "ok": true,
                      "checks": [
                        "rule_loaded",
                        "actor_authorized",
                        "app_allowed",
                        "runtime_scope_resolved",
                        "rule_config_valid"
                      ],
                      "scope": "team",
                      "owner_id": 80011,
                      "team_id": 123,
                      "app_name": "ai-sre"
                    },
                    "run": {
                      "run_id": "trun_5oDvqiG64uur6sBNsTc4u",
                      "session_id": "sess_f8oDvqiG64uur6sBNsTc4u"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationRuleIDRequest"
              },
              "example": {
                "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b"
              }
            }
          }
        }
      }
    },
    "/safari/automation/rule/update": {
      "post": {
        "operationId": "automation-rule-write-update",
        "summary": "更新自动化规则",
        "description": "更新自动化规则的可变字段，包括 HTTP POST 与 On-call 故障触发器配置。",
        "tags": [
          "AI SRE/自动化"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**；**20 次/秒** |\n| 权限要求 | 有效 `app_key`；管理操作要求调用者可管理目标规则 |\n\n## 使用说明\n\n- 省略或传 `null` 的字段保持不变；`team_id` 不能修改为与当前值不同的值。\n- `cron_expr` 与 `timezone` 可以分别更新——只传其中一个时，另一个保持当前已存储的值。\n- `rotate_http_post_trigger_token=true` 会签发新的 webhook token，且仅在本次响应中返回。\n- 如需由 On-call 故障触发，传入 `oncall_incident_trigger_enabled`、`oncall_incident_channel_ids` 与 `oncall_incident_severities`；匹配事件会以 `trigger_kind=oncall_incident` 运行。\n- 每次调用都会记录到账户审计日志。\n",
          "href": "/zh/api-reference/ai-sre/automations/automation-rule-write-update",
          "metadata": {
            "sidebarTitle": "更新自动化规则"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AutomationRuleItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b",
                    "account_id": 10023,
                    "team_id": 123,
                    "owner_id": 80011,
                    "name": "Weekly on-call review",
                    "enabled": true,
                    "run_scope": "team",
                    "cron_expr": "0 9 * * 1",
                    "timezone": "Asia/Shanghai",
                    "prompt": "Summarize last week's alert noise and escalation load.",
                    "environment_kind": "",
                    "environment_id": "",
                    "schedule_trigger_id": "atrig_6aKp3wT9mQ2xVc8bR1nY7z",
                    "schedule_trigger_enabled": true,
                    "http_post_trigger_id": "atrig_2bLq4xT8mP1sWd9cN3rF6y",
                    "http_post_trigger_url": "/safari/automation/triggers/atrig_2bLq4xT8mP1sWd9cN3rF6y/fire",
                    "http_post_trigger_enabled": true,
                    "can_edit": true,
                    "created_at": 1780367971228,
                    "updated_at": 1780367971228,
                    "http_post_token": "sat_yQ9p8V7n6M5k4J3h2G1f0E9d8C7b6A5z4Y3x2W1v0U",
                    "schedule_next_fire_at_ms": 1780630800000,
                    "oncall_incident_trigger_id": "atrig_9cVb2mN7qKs4dEa8T1rY5p",
                    "oncall_incident_trigger_enabled": true,
                    "oncall_incident_channel_ids": [
                      456
                    ],
                    "oncall_incident_severities": [
                      "Critical",
                      "Warning"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationRuleUpdateRequest"
              },
              "example": {
                "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b",
                "enabled": true,
                "cron_expr": "15 9 * * 1",
                "rotate_http_post_trigger_token": true,
                "oncall_incident_trigger_enabled": true,
                "oncall_incident_severities": [
                  "Critical",
                  "Warning"
                ],
                "oncall_incident_channel_ids": [
                  456
                ]
              }
            }
          }
        }
      }
    },
    "/safari/automation/run/list": {
      "post": {
        "operationId": "automation-run-read-list",
        "summary": "列出自动化运行历史",
        "description": "列出调用者可管理规则的运行历史。",
        "tags": [
          "AI SRE/自动化"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 有效 `app_key`；调用者必须可管理目标规则 |\n\n## 使用说明\n\n- 仅当调用者可管理规则时才可查看运行历史：个人规则仅限创建者；团队规则限账户管理员或规则所属团队成员。\n",
          "href": "/zh/api-reference/ai-sre/automations/automation-run-read-list",
          "metadata": {
            "sidebarTitle": "列出自动化运行历史"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AutomationRunListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 1,
                    "runs": [
                      {
                        "run_id": "trun_5oDvqiG64uur6sBNsTc4u",
                        "kind": "automation_rule",
                        "account_id": 10023,
                        "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b",
                        "trigger_kind": "schedule",
                        "occurrence_key": "atrig_6aKp3wT9mQ2xVc8bR1nY7z:1780630800000",
                        "status": "succeeded",
                        "attempts": 1,
                        "started_at": 1780630800000,
                        "completed_at": 1780630923456,
                        "duration_ms": 123456,
                        "error_code": "",
                        "error_message": "",
                        "stats_json": {},
                        "result_json": {
                          "session_id": "sess_f8oDvqiG64uur6sBNsTc4u"
                        },
                        "created_at": 1780630800000,
                        "updated_at": 1780630923456
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationRunListRequest"
              },
              "example": {
                "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b",
                "limit": 20,
                "trigger_kind": "schedule"
              }
            }
          }
        }
      }
    },
    "/safari/automation/template/list": {
      "post": {
        "operationId": "automation-template-read-list",
        "summary": "列出自动化模板",
        "description": "按语言列出自动化预设模板。",
        "tags": [
          "AI SRE/自动化"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 有效 `app_key`；结果按调用者可见范围过滤 |\n",
          "href": "/zh/api-reference/ai-sre/automations/automation-template-read-list",
          "metadata": {
            "sidebarTitle": "列出自动化模板"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AutomationTemplateListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "templates": [
                      {
                        "name": "Weekly Insights",
                        "description": "Analyze incidents, alerts, response activity, notification load, and related changes from the past week.",
                        "icon": "chart-no-axes-combined",
                        "enabled": false,
                        "prompt": "Generate a weekly insights report. Analyze incidents, alerts, response activity, notification load, and related changes from the past week. Focus on what happened this week, which signals deserve attention, and which improvement actions are most valuable. Do not modify any Flashduty business state.\n"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationTemplateListRequest"
              },
              "example": {
                "locale": "en-US"
              }
            }
          }
        }
      }
    },
    "/safari/mcp/server/create": {
      "post": {
        "operationId": "mcp-write-server-create",
        "summary": "创建 MCP 服务器",
        "description": "在账户下注册新的 MCP 服务器（连接器）。",
        "tags": [
          "AI SRE/MCP 服务器"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **MCP 管理**（`ai-sre`） |\n\n## 使用说明\n\n- `command`/`args`/`env` 用于 `stdio`；`url`/`headers` 用于 `sse`/`streamable-http`。\n- 服务器名称必须以字母开头，且只能包含字母、数字、`-` 或 `_`，在账户内不区分大小写唯一；不满足则返回 InvalidParameter。\n- `environment_kind` 仅支持 `byoc`（需同时提供 `environment_id`）或留空表示自动选择——MCP 服务器不支持直接绑定 `cloud`。\n- `per_user_secret` 认证模式要求 `secret_schema` 为合法 JSON 且包含非空的 `header_name`。\n- 每次调用都会记录到账户审计日志。\n",
          "href": "/zh/api-reference/ai-sre/mcp-servers/mcp-write-server-create",
          "metadata": {
            "sidebarTitle": "创建 MCP 服务器"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MCPServerItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1",
                    "account_id": 10023,
                    "team_id": 0,
                    "can_edit": true,
                    "environment_kind": "",
                    "environment_id": "",
                    "server_name": "prometheus",
                    "description": "Query Prometheus metrics and alerts.",
                    "transport": "streamable-http",
                    "url": "https://mcp.example.com/prometheus",
                    "status": "enabled",
                    "connect_timeout": 10,
                    "call_timeout": 60,
                    "tool_count": 2,
                    "tools": [
                      {
                        "name": "query",
                        "description": "Run a PromQL instant query."
                      },
                      {
                        "name": "query_range",
                        "description": "Run a PromQL range query."
                      }
                    ],
                    "auth_mode": "shared",
                    "created_by": 80011,
                    "created_at": 1716960000000,
                    "updated_at": 1717046400000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MCPServerCreateRequest"
              },
              "example": {
                "server_name": "prometheus",
                "description": "Query Prometheus metrics and alerts.",
                "transport": "streamable-http",
                "url": "https://mcp.example.com/prometheus",
                "status": "enabled"
              }
            }
          }
        }
      }
    },
    "/safari/mcp/server/delete": {
      "post": {
        "operationId": "mcp-write-server-delete",
        "summary": "删除 MCP 服务器",
        "description": "按 ID 删除 MCP 服务器。",
        "tags": [
          "AI SRE/MCP 服务器"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **MCP 管理**（`ai-sre`） |\n\n## 使用说明\n\n- 每次调用都会记录到账户审计日志。\n",
          "href": "/zh/api-reference/ai-sre/mcp-servers/mcp-write-server-delete",
          "metadata": {
            "sidebarTitle": "删除 MCP 服务器"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "null",
                          "description": "成功时恒为 null。"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MCPServerDeleteRequest"
              },
              "example": {
                "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1"
              }
            }
          }
        }
      }
    },
    "/safari/mcp/server/disable": {
      "post": {
        "operationId": "mcp-write-server-disable",
        "summary": "禁用 MCP 服务器",
        "description": "禁用已启用的 MCP 服务器。",
        "tags": [
          "AI SRE/MCP 服务器"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **MCP 管理**（`ai-sre`） |\n\n## 使用说明\n\n- 对已禁用的服务器再次禁用会返回 InvalidParameter，而不是静默忽略。\n- 需要对服务器当前所属团队具有编辑权限：账户级服务器仅限所有者/管理员；团队级服务器要求调用者属于该团队（或为所有者/管理员）。\n- 每次调用都会记录到账户审计日志。\n",
          "href": "/zh/api-reference/ai-sre/mcp-servers/mcp-write-server-disable",
          "metadata": {
            "sidebarTitle": "禁用 MCP 服务器"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "null",
                          "description": "成功时恒为 null。"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MCPServerStatusRequest"
              },
              "example": {
                "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1"
              }
            }
          }
        }
      }
    },
    "/safari/mcp/server/enable": {
      "post": {
        "operationId": "mcp-write-server-enable",
        "summary": "启用 MCP 服务器",
        "description": "启用已禁用的 MCP 服务器。",
        "tags": [
          "AI SRE/MCP 服务器"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **MCP 管理**（`ai-sre`） |\n\n## 使用说明\n\n- 对已启用的服务器再次启用会返回 InvalidParameter，而不是静默忽略。\n- 需要对服务器当前所属团队具有编辑权限：账户级服务器仅限所有者/管理员；团队级服务器要求调用者属于该团队（或为所有者/管理员）。\n- 每次调用都会记录到账户审计日志。\n",
          "href": "/zh/api-reference/ai-sre/mcp-servers/mcp-write-server-enable",
          "metadata": {
            "sidebarTitle": "启用 MCP 服务器"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "null",
                          "description": "成功时恒为 null。"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MCPServerStatusRequest"
              },
              "example": {
                "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1"
              }
            }
          }
        }
      }
    },
    "/safari/mcp/server/get": {
      "post": {
        "operationId": "mcp-read-server-get",
        "summary": "查看 MCP 服务器详情",
        "description": "查看单个 MCP 服务器并实时探测其工具列表。",
        "tags": [
          "AI SRE/MCP 服务器"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 详情接口会实时探测工具；探测失败时设置 `list_error`，请求本身仍成功。\n",
          "href": "/zh/api-reference/ai-sre/mcp-servers/mcp-read-server-get",
          "metadata": {
            "sidebarTitle": "查看 MCP 服务器详情"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MCPServerItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1",
                    "account_id": 10023,
                    "team_id": 0,
                    "can_edit": true,
                    "environment_kind": "",
                    "environment_id": "",
                    "server_name": "prometheus",
                    "description": "Query Prometheus metrics and alerts.",
                    "transport": "streamable-http",
                    "url": "https://mcp.example.com/prometheus",
                    "status": "enabled",
                    "connect_timeout": 10,
                    "call_timeout": 60,
                    "tool_count": 2,
                    "tools": [
                      {
                        "name": "query",
                        "description": "Run a PromQL instant query."
                      },
                      {
                        "name": "query_range",
                        "description": "Run a PromQL range query."
                      }
                    ],
                    "auth_mode": "shared",
                    "created_by": 80011,
                    "created_at": 1716960000000,
                    "updated_at": 1717046400000
                  }
                }
              }
            }
          },
          "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/MCPServerGetRequest"
              },
              "example": {
                "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1"
              }
            }
          }
        }
      }
    },
    "/safari/mcp/server/list": {
      "post": {
        "operationId": "mcp-read-server-list",
        "summary": "查询 MCP 服务器列表",
        "description": "分页查询调用者在账户与团队范围内可见的 MCP 服务器。",
        "tags": [
          "AI SRE/MCP 服务器"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 列表不含实时工具列表；如需探测工具请单独查询某个服务器。\n- `query` 会对名称、描述、AI 生成描述、服务器 ID、传输协议、URL、命令及市场模板名称进行不区分大小写的子串匹配。\n",
          "href": "/zh/api-reference/ai-sre/mcp-servers/mcp-read-server-list",
          "metadata": {
            "sidebarTitle": "查询 MCP 服务器列表"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MCPServerListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 1,
                    "servers": [
                      {
                        "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1",
                        "account_id": 10023,
                        "team_id": 0,
                        "can_edit": true,
                        "environment_kind": "",
                        "environment_id": "",
                        "server_name": "prometheus",
                        "description": "Query Prometheus metrics and alerts.",
                        "transport": "streamable-http",
                        "url": "https://mcp.example.com/prometheus",
                        "status": "enabled",
                        "connect_timeout": 10,
                        "call_timeout": 60,
                        "tool_count": 2,
                        "tools": [
                          {
                            "name": "query",
                            "description": "Run a PromQL instant query."
                          },
                          {
                            "name": "query_range",
                            "description": "Run a PromQL range query."
                          }
                        ],
                        "auth_mode": "shared",
                        "created_by": 80011,
                        "created_at": 1716960000000,
                        "updated_at": 1717046400000
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/MCPServerListRequest"
              },
              "example": {
                "p": 1,
                "limit": 20,
                "include_account": true
              }
            }
          }
        }
      }
    },
    "/safari/mcp/server/update": {
      "post": {
        "operationId": "mcp-write-server-update",
        "summary": "更新 MCP 服务器",
        "description": "更新 MCP 服务器配置；省略字段表示不变。",
        "tags": [
          "AI SRE/MCP 服务器"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | **MCP 管理**（`ai-sre`） |\n\n## 使用说明\n\n- `env`/`headers` 中的脱敏密钥会被保留——回传脱敏值不会覆盖已存储的真实密钥。\n- `environment_kind`/`environment_id` 是相互独立的部分更新字段：两者都省略表示运行器绑定不变；设置任一字段即可修改绑定，约束与创建时相同（byoc 或留空）。\n- 变更 `team_id` 需要对目标团队具有重新分配权限；若运行器绑定未随之修改，则该绑定在新团队下仍须对调用者可选，否则更新会被拒绝。\n- 每次调用都会记录到账户审计日志。\n",
          "href": "/zh/api-reference/ai-sre/mcp-servers/mcp-write-server-update",
          "metadata": {
            "sidebarTitle": "更新 MCP 服务器"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MCPServerItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1",
                    "account_id": 10023,
                    "team_id": 0,
                    "can_edit": true,
                    "environment_kind": "",
                    "environment_id": "",
                    "server_name": "prometheus",
                    "description": "Query Prometheus metrics, alerts, and rules.",
                    "transport": "streamable-http",
                    "url": "https://mcp.example.com/prometheus",
                    "status": "enabled",
                    "connect_timeout": 10,
                    "call_timeout": 60,
                    "tool_count": 2,
                    "tools": [
                      {
                        "name": "query",
                        "description": "Run a PromQL instant query."
                      },
                      {
                        "name": "query_range",
                        "description": "Run a PromQL range query."
                      }
                    ],
                    "auth_mode": "shared",
                    "created_by": 80011,
                    "created_at": 1716960000000,
                    "updated_at": 1717046400000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MCPServerUpdateRequest"
              },
              "example": {
                "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1",
                "description": "Query Prometheus metrics, alerts, and rules."
              }
            }
          }
        }
      }
    },
    "/safari/session/delete": {
      "post": {
        "operationId": "session-write-delete",
        "summary": "删除会话",
        "description": "按 ID 删除会话。",
        "tags": [
          "AI SRE/会话"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **300 次/分钟**；**20 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 个人会话仅创建者可删除；团队会话可由创建者、账户管理员或所属团队成员删除。\n- 这是软删除：会级联删除子智能体会话及其已展示的文件；底层 S3/MinIO 对象在事务提交后尽力清理，部分失败时可能残留孤立对象。\n",
          "href": "/zh/api-reference/ai-sre/sessions/session-write-delete",
          "metadata": {
            "sidebarTitle": "删除会话"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "null",
                          "description": "成功时恒为 null。"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionDeleteRequest"
              },
              "example": {
                "session_id": "sess_f8oDvqiG64uur6sBNsTc4u"
              }
            }
          }
        }
      }
    },
    "/safari/session/export": {
      "post": {
        "operationId": "session-read-export",
        "summary": "导出会话记录",
        "description": "以换行分隔的 JSON（NDJSON）流式导出会话的完整事件记录。",
        "tags": [
          "AI SRE/会话"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **20 次/分钟**；**1 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 个人会话仅创建者可导出；团队会话允许同一账户内持有 `session_id` 的调用者导出。\n- 响应为 `application/x-ndjson`——请逐行解析并写入文件，切勿将整段记录读入内存。\n- 第一行始终为 `session_meta` 信封；`include_subagents=true` 会在派发行后内联各子会话的事件流。\n- 请求存在 60 秒的执行超时上限；非常大的会话可能无法在该时间内导出完成。\n- 若流在中途失败，响应会以一行 JSON 错误行结束，而非规范的错误信封（响应头已发出）——可通过检测该结尾行判断记录是否被截断。\n",
          "href": "/zh/api-reference/ai-sre/sessions/session-read-export",
          "metadata": {
            "sidebarTitle": "导出会话记录"
          }
        },
        "responses": {
          "200": {
            "description": "流式 NDJSON（application/x-ndjson）。每行一个 JSON 对象，以换行结束。第一行始终为 `session_meta` 信封，其后为会话事件。",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string",
                  "description": "换行分隔的 JSON 流。请逐行解析，切勿缓冲整个响应体。"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionExportRequest"
              },
              "example": {
                "session_id": "sess_f8oDvqiG64uur6sBNsTc4u",
                "include_subagents": false
              }
            }
          }
        }
      }
    },
    "/safari/session/get": {
      "post": {
        "operationId": "session-read-info",
        "summary": "查看会话详情",
        "description": "查看单个会话，并返回其最近事件的一页（向更早方向分页）。",
        "tags": [
          "AI SRE/会话"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 个人会话仅创建者可读；团队会话允许同一账户内持有 `session_id` 的调用者读取。\n- 使用上一次响应的 `search_after_ctx` 翻阅更早的历史。\n- `limit`（或旧版 `num_recent_events`）限制事件页大小；默认 100，最大 1000。\n- 格式错误的 `search_after_ctx` 会在触发任何数据库查询前立即返回 400。\n- `current_turn_*` 字段仅在会话 `is_running` 时才会填充；`suggest_init` 与 `session/list` 使用同一个账户级引导提示。\n",
          "href": "/zh/api-reference/ai-sre/sessions/session-read-info",
          "metadata": {
            "sidebarTitle": "查看会话详情"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SessionGetResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "session": {
                      "session_id": "sess_f8oDvqiG64uur6sBNsTc4u",
                      "session_name": "Investigate cloud-assistant first heartbeat",
                      "app_name": "ai-sre",
                      "entry_kind": "web",
                      "person_id": "3790925372131",
                      "team_id": 0,
                      "is_mine": false,
                      "can_manage": true,
                      "status": "enabled",
                      "incognito": false,
                      "created_at": 1780367971228,
                      "updated_at": 1780367993457,
                      "token_usage": {
                        "input_tokens": 14948,
                        "cached_tokens": 11520,
                        "output_tokens": 888,
                        "reasoning_tokens": 351
                      },
                      "current_context_tokens": 14948,
                      "context_window": 0,
                      "archived_at": 0,
                      "pinned_at": 0,
                      "last_event_at": 1780367992649,
                      "is_running": false,
                      "has_unread": true,
                      "current_turn_started_at": 0,
                      "current_turn_active_ms": 0,
                      "current_turn_wait_ms": 0,
                      "current_turn_tokens": 0
                    },
                    "events": [
                      {
                        "event_id": "evt_3aZQ9p",
                        "session_id": "sess_f8oDvqiG64uur6sBNsTc4u",
                        "author": "user",
                        "partial": false,
                        "turn_complete": false,
                        "status": "normal",
                        "created_at": 1780367971241
                      },
                      {
                        "event_id": "evt_7bWk2r",
                        "session_id": "sess_f8oDvqiG64uur6sBNsTc4u",
                        "author": "ai-sre",
                        "content": {
                          "role": "model",
                          "parts": [
                            {
                              "text": "..."
                            }
                          ]
                        },
                        "partial": false,
                        "turn_complete": true,
                        "status": "normal",
                        "created_at": 1780367992649
                      }
                    ],
                    "has_more_older": false,
                    "suggest_init": false
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionGetRequest"
              },
              "example": {
                "session_id": "sess_f8oDvqiG64uur6sBNsTc4u",
                "num_recent_events": 50
              }
            }
          }
        }
      }
    },
    "/safari/session/list": {
      "post": {
        "operationId": "session-read-list",
        "summary": "查询会话列表",
        "description": "分页查询调用者可见的智能体会话，可按应用、入口、归档状态与团队过滤。",
        "tags": [
          "AI SRE/会话"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 分页使用 `p`/`limit`（最大 100）；`scope` 默认 `all`。\n- `all` 返回调用者自己的个人会话，以及调用者可访问团队的团队会话；账户管理员可见所有团队会话，但不可见他人的个人会话。\n- `team_ids` 只会收窄可见集合，不会扩大访问范围。\n- `is_running` 反映实时运行集合；`has_unread` 按调用者各自计算；`current_turn_*` 字段在此接口恒为 0 —— 仅 `session/get` 会在会话运行时计算它们。\n- `suggest_init` 是账户级的引导提示（仅当账户在任何范围内都没有知识包时为 true），与列表过滤条件无关。\n",
          "href": "/zh/api-reference/ai-sre/sessions/session-read-list",
          "metadata": {
            "sidebarTitle": "查询会话列表"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SessionListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 988,
                    "sessions": [
                      {
                        "session_id": "sess_f8oDvqiG64uur6sBNsTc4u",
                        "session_name": "Investigate cloud-assistant first heartbeat",
                        "app_name": "ai-sre",
                        "entry_kind": "web",
                        "person_id": "3790925372131",
                        "team_id": 0,
                        "is_mine": false,
                        "can_manage": true,
                        "status": "enabled",
                        "incognito": false,
                        "created_at": 1780367971228,
                        "updated_at": 1780367993457,
                        "token_usage": {
                          "input_tokens": 14948,
                          "cached_tokens": 11520,
                          "output_tokens": 888,
                          "reasoning_tokens": 351
                        },
                        "current_context_tokens": 14948,
                        "context_window": 0,
                        "archived_at": 0,
                        "pinned_at": 0,
                        "last_event_at": 1780367992649,
                        "is_running": false,
                        "has_unread": true,
                        "current_turn_started_at": 0,
                        "current_turn_active_ms": 0,
                        "current_turn_wait_ms": 0,
                        "current_turn_tokens": 0
                      }
                    ],
                    "suggest_init": false
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionListRequest"
              },
              "example": {
                "app_name": "ai-sre",
                "limit": 2,
                "orderby": "updated_at",
                "scope": "all"
              }
            }
          }
        }
      }
    },
    "/safari/skill/delete": {
      "post": {
        "operationId": "skill-write-delete",
        "summary": "删除技能",
        "description": "按 ID 删除技能。",
        "tags": [
          "AI SRE/技能"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**；**20 次/秒** |\n| 权限要求 | **Skill 管理**（`ai-sre`） |\n\n## 使用说明\n\n- 仅为软删除：将 `status` 置为 `deleted` 并重命名该行以释放原名称供复用；技能的压缩包不会从对象存储中删除。\n- 对已删除或不存在的 `skill_id` 再次删除会返回 `ResourceNotFound`，因为查找逻辑在执行删除前就已排除已删除的行。\n- 每次调用都会记录到账户审计日志。\n",
          "href": "/zh/api-reference/ai-sre/skills/skill-write-delete",
          "metadata": {
            "sidebarTitle": "删除技能"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "null",
                          "description": "成功时恒为 null。"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillDeleteRequest"
              },
              "example": {
                "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m"
              }
            }
          }
        }
      }
    },
    "/safari/skill/disable": {
      "post": {
        "operationId": "skill-write-disable",
        "summary": "禁用技能",
        "description": "禁用已启用的技能，使智能体不再加载。",
        "tags": [
          "AI SRE/技能"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**；**20 次/秒** |\n| 权限要求 | **Skill 管理**（`ai-sre`） |\n\n## 使用说明\n\n- 仅可禁用 `enabled` 状态的技能；已禁用的技能会返回 `InvalidParameter`。\n- 每次调用都会记录到账户审计日志。\n",
          "href": "/zh/api-reference/ai-sre/skills/skill-write-disable",
          "metadata": {
            "sidebarTitle": "禁用技能"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "null",
                          "description": "成功时恒为 null。"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillStatusRequest"
              },
              "example": {
                "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m"
              }
            }
          }
        }
      }
    },
    "/safari/skill/enable": {
      "post": {
        "operationId": "skill-read-enable",
        "summary": "启用技能",
        "description": "启用已禁用的技能，使智能体可加载。",
        "tags": [
          "AI SRE/技能"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**；**20 次/秒** |\n| 权限要求 | **Skill 管理**（`ai-sre`） |\n\n## 使用说明\n\n- 仅可启用 `disabled` 状态的技能；已启用的技能会返回 `InvalidParameter`。\n- 每次调用都会记录到账户审计日志。\n",
          "href": "/zh/api-reference/ai-sre/skills/skill-read-enable",
          "metadata": {
            "sidebarTitle": "启用技能"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "null",
                          "description": "成功时恒为 null。"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillStatusRequest"
              },
              "example": {
                "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m"
              }
            }
          }
        }
      }
    },
    "/safari/skill/get": {
      "post": {
        "operationId": "skill-read-get",
        "summary": "查看技能详情",
        "description": "查看单个技能，包含完整的 SKILL.md 内容。",
        "tags": [
          "AI SRE/技能"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 若技能不存在或已被删除，返回 `ResourceNotFound`。\n- `can_edit` 反映团队成员关系，但读取本身不受团队限制，任意调用者均可访问。\n",
          "href": "/zh/api-reference/ai-sre/skills/skill-read-get",
          "metadata": {
            "sidebarTitle": "查看技能详情"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SkillItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m",
                    "account_id": 10023,
                    "team_id": 0,
                    "skill_name": "k8s-triage",
                    "description": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.",
                    "version": "1.2.0",
                    "tags": [
                      "kubernetes",
                      "triage"
                    ],
                    "author": "sre-team",
                    "tools": [
                      "bash",
                      "mcp:prometheus/query"
                    ],
                    "status": "enabled",
                    "created_by": 80011,
                    "created_at": 1716960000000,
                    "updated_at": 1717046400000,
                    "can_edit": true,
                    "update_available": false,
                    "is_modified": false,
                    "description_en": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.",
                    "content": "---\nname: k8s-triage\ndescription: ...\n---\n# Triage steps"
                  }
                }
              }
            }
          },
          "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/SkillGetRequest"
              },
              "example": {
                "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m"
              }
            }
          }
        }
      }
    },
    "/safari/skill/list": {
      "post": {
        "operationId": "skill-read-list",
        "summary": "查询技能列表",
        "description": "分页查询调用者在账户与团队范围内可见的 AI SRE 技能。",
        "tags": [
          "AI SRE/技能"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个 `app_key` **1,000 次/分钟**；**50 次/秒** |\n| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |\n\n## 使用说明\n\n- 列表行中省略 `content` 字段；如需正文请单独查询某个技能。\n- `scope` 用于选择 `all`（默认）、仅 `account`、或仅 `team`，会覆盖 `include_account`；非管理员请求特定 `team_ids` 时会被静默过滤为其所属的团队。\n- `update_available` 每次调用会与市场目录比对一次；若目录加载失败，仅会隐藏该徽标，不会导致请求失败。\n",
          "href": "/zh/api-reference/ai-sre/skills/skill-read-list",
          "metadata": {
            "sidebarTitle": "查询技能列表"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SkillListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 1,
                    "skills": [
                      {
                        "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m",
                        "account_id": 10023,
                        "team_id": 0,
                        "skill_name": "k8s-triage",
                        "description": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.",
                        "version": "1.2.0",
                        "tags": [
                          "kubernetes",
                          "triage"
                        ],
                        "author": "sre-team",
                        "tools": [
                          "bash",
                          "mcp:prometheus/query"
                        ],
                        "status": "enabled",
                        "created_by": 80011,
                        "created_at": 1716960000000,
                        "updated_at": 1717046400000,
                        "can_edit": true,
                        "update_available": false,
                        "is_modified": false
                      }
                    ]
                  }
                }
              }
            }
          },
          "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/SkillListRequest"
              },
              "example": {
                "p": 1,
                "limit": 20,
                "include_account": true
              }
            }
          }
        }
      }
    },
    "/safari/skill/update": {
      "post": {
        "operationId": "skill-write-update",
        "summary": "更新技能",
        "description": "更新技能的描述信息或重新分配团队范围。",
        "tags": [
          "AI SRE/技能"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **300 次/分钟**；**20 次/秒** |\n| 权限要求 | **Skill 管理**（`ai-sre`） |\n\n## 使用说明\n\n- 仅 `description`、`description_en` 与 `team_id` 可编辑；技能正文需通过重新上传修改。\n- `description` 仅在非空时更新 —— 无法通过该字段清空；`description_en` 可为 null，传入空字符串即可显式清空。\n- 将 `team_id` 重新分配到不同团队时，除编辑权限外还会触发第二重授权检查，验证调用者是否可将资源指派到目标团队。\n- 每次调用都会记录到账户审计日志。\n",
          "href": "/zh/api-reference/ai-sre/skills/skill-write-update",
          "metadata": {
            "sidebarTitle": "更新技能"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SkillItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m",
                    "account_id": 10023,
                    "team_id": 0,
                    "skill_name": "k8s-triage",
                    "description": "Updated triage runbook.",
                    "version": "1.2.0",
                    "tags": [
                      "kubernetes",
                      "triage"
                    ],
                    "author": "sre-team",
                    "tools": [
                      "bash",
                      "mcp:prometheus/query"
                    ],
                    "status": "enabled",
                    "created_by": 80011,
                    "created_at": 1716960000000,
                    "updated_at": 1717046400000,
                    "can_edit": true,
                    "update_available": false,
                    "is_modified": false
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillUpdateRequest"
              },
              "example": {
                "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m",
                "description": "Updated triage runbook."
              }
            }
          }
        }
      }
    },
    "/safari/skill/upload": {
      "post": {
        "operationId": "skill-write-upload",
        "summary": "上传技能",
        "description": "上传技能压缩包（.skill/.zip/.tar.gz/.tgz）以创建或覆盖技能。",
        "tags": [
          "AI SRE/技能"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **30 次/分钟**；**3 次/秒** |\n| 权限要求 | **Skill 管理**（`ai-sre`） |\n\n## 使用说明\n\n- 以 `multipart/form-data` 提交，包含 `file` 部分；支持的压缩包类型为 `.skill`、`.zip`、`.tar.gz`、`.tgz`，最大 100MB（超限文件会在读取正文前即被拒绝）。\n- `skill_id` + `replace=true` 会定向覆盖该指定技能，且跳过团队归属校验，因为调用者本就拥有该行。\n- 仅 `replace=true`（不带 `skill_id`）会按技能名称做 upsert；不设置 `replace` 则始终创建新技能 —— 这两条路径都要求调用者被允许向目标 `team_id` 创建资源。\n- 响应始终将 `can_edit` 标记为 `true`。\n- 每次调用都会记录到账户审计日志。\n",
          "href": "/zh/api-reference/ai-sre/skills/skill-write-upload",
          "metadata": {
            "sidebarTitle": "上传技能"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SkillItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m",
                    "account_id": 10023,
                    "team_id": 0,
                    "skill_name": "k8s-triage",
                    "description": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.",
                    "version": "1.2.0",
                    "tags": [
                      "kubernetes",
                      "triage"
                    ],
                    "author": "sre-team",
                    "tools": [
                      "bash",
                      "mcp:prometheus/query"
                    ],
                    "status": "enabled",
                    "created_by": 80011,
                    "created_at": 1716960000000,
                    "updated_at": 1717046400000,
                    "can_edit": true,
                    "update_available": false,
                    "is_modified": false,
                    "created": true
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SkillUploadRequest"
              },
              "example": {
                "team_id": 0,
                "replace": false
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "AppKeyAuth": {
        "type": "apiKey",
        "in": "query",
        "name": "app_key",
        "description": "在 Flashduty 控制台 账户 → APP Key 中签发的 app_key。调用任何公开 API 时都必须携带。它等同于所属账户的身份凭证，请妥善保管。"
      },
      "AutomationTriggerBearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "自动化 HTTP POST 触发器生成的一次性 Bearer Token。不要把它当作 app_key 使用。"
      }
    },
    "responses": {
      "BadRequest": {
        "description": "请求非法 — 通常是参数缺失或格式不正确。",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "missingParameter": {
                "value": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "error": {
                    "code": "InvalidParameter",
                    "message": "The specified parameter is not valid."
                  }
                }
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "app_key 缺失或无效。",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "missingAppKey": {
                "value": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "error": {
                    "code": "Unauthorized",
                    "message": "You are unauthorized."
                  }
                }
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "app_key 有效但没有执行该操作的权限。",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "noEditPermission": {
                "value": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "error": {
                    "code": "AccessDenied",
                    "message": "Access Denied."
                  }
                }
              }
            }
          }
        }
      },
      "NotFound": {
        "description": "目标资源不存在或已被删除。注意：Flashduty 对业务实体的缺失通常返回 HTTP 400 + code=`ResourceNotFound`，真正的 404 只用于未知路由。",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "resourceMissing": {
                "value": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "error": {
                    "code": "ResourceNotFound",
                    "message": "The resource you request is not found"
                  }
                }
              }
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "命中限流。可能是全局 API 限流、账户级限流或集成级限流。限流按账户聚合。",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "rateLimited": {
                "value": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "error": {
                    "code": "RequestTooFrequently",
                    "message": "Request too frequently."
                  }
                }
              }
            }
          }
        }
      },
      "ServerError": {
        "description": "服务端未预期错误。反馈问题时请携带 request_id。",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "internal": {
                "value": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "error": {
                    "code": "InternalError",
                    "message": "We encountered an internal error, and it has been reported. Please try again later."
                  }
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "ErrorCode": {
        "type": "string",
        "description": "Flashduty error code enum. Every failed API response sets `error.code` to one of these values. The value is a stable wire string — not a localized message and not a numeric status. HTTP status is informational.",
        "enum": [
          "OK",
          "InvalidParameter",
          "BadRequest",
          "InvalidContentType",
          "ResourceNotFound",
          "NoLicense",
          "ReferenceExist",
          "Unauthorized",
          "BalanceNotEnough",
          "AccessDenied",
          "RouteNotFound",
          "MethodNotAllowed",
          "UndonedOrderExist",
          "RequestLocked",
          "EntityTooLarge",
          "RequestTooFrequently",
          "RequestVerifyRequired",
          "DangerousOperation",
          "InternalError",
          "ServiceUnavailable"
        ]
      },
      "DutyError": {
        "type": "object",
        "description": "Error payload inside the response envelope. Present only on non-2xx responses.",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/ErrorCode"
          },
          "message": {
            "type": "string",
            "description": "Human-readable error message, localized by the caller's Accept-Language. May contain field names, IDs, or other context from the failing request."
          }
        },
        "required": [
          "code",
          "message"
        ]
      },
      "SuccessEnvelope": {
        "type": "object",
        "description": "成功响应结构。2xx 响应中 `request_id` 标识本次调用（同时出现在 `Flashcat-Request-Id` 响应头中），`data` 为接口业务 payload。失败响应使用不同结构，参见 `ErrorResponse`。",
        "properties": {
          "request_id": {
            "type": "string",
            "description": "本次请求的唯一 ID，也会在 Flashcat-Request-Id 响应头中返回。反馈问题时请一并附上。",
            "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
          },
          "data": {
            "description": "每个接口自己的业务 payload，详见各接口的 200 响应 schema。"
          }
        },
        "required": [
          "request_id",
          "data"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "description": "Response envelope for errors. `error` is required; `data` is absent.",
        "properties": {
          "request_id": {
            "type": "string",
            "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
          },
          "error": {
            "$ref": "#/components/schemas/DutyError"
          }
        },
        "required": [
          "request_id",
          "error"
        ]
      },
      "EmptyObject": {
        "type": "object",
        "description": "空对象。当操作的成功信号就是不报错时，作为 `data` 返回。",
        "additionalProperties": false
      },
      "EmptyResponse": {
        "type": "object",
        "description": "空响应体。成功时服务端返回 `data: null`。",
        "properties": {}
      },
      "EmptyRequest": {
        "type": "object",
        "description": "无参数。",
        "additionalProperties": false
      },
      "CreateIncidentRequest": {
        "type": "object",
        "description": "手动创建故障所需的参数。",
        "required": [
          "incident_severity"
        ],
        "properties": {
          "incident_severity": {
            "type": "string",
            "enum": [
              "Info",
              "Warning",
              "Critical"
            ],
            "description": "故障严重程度。"
          },
          "title": {
            "type": "string",
            "maxLength": 512,
            "description": "故障标题,最多 512 个字符。"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "故障描述,最多 1024 个字符。"
          },
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "归属的协作空间 ID,留空表示独立故障。"
          },
          "assigned_to": {
            "type": "object",
            "description": "故障处理人员指派目标。`person_ids` 与 `escalate_rule_id` 至少设置一项。",
            "properties": {
              "person_ids": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int64"
                },
                "minItems": 1,
                "maxItems": 100,
                "description": "直接指派的成员 ID 列表。"
              },
              "escalate_rule_id": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{24}$",
                "description": "按分派策略指派时使用的策略 ID(MongoDB ObjectID)。"
              },
              "layer_idx": {
                "type": "integer",
                "description": "使用分派策略时的起始环节索引。"
              },
              "type": {
                "type": "string",
                "description": "指派类型。"
              },
              "emails": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "email"
                },
                "minItems": 1,
                "maxItems": 100,
                "description": "邮箱接收人列表,用于 ServiceNow 等外部系统。"
              },
              "notify": {
                "type": "object",
                "description": "为本次指派覆盖的通知渠道。",
                "properties": {
                  "follow_preference": {
                    "type": "boolean",
                    "description": "为 true 时跟随处理人员的个人偏好。"
                  },
                  "personal_channels": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "使用的通知渠道(如 `voice`、`sms`、`email`)。"
                  },
                  "template_id": {
                    "type": "string",
                    "pattern": "^[0-9a-fA-F]{24}$",
                    "description": "通知模板 ID(MongoDB ObjectID)。"
                  }
                }
              }
            }
          }
        }
      },
      "CreateWarRoomRequest": {
        "type": "object",
        "description": "为故障开启 IM 作战室所需的参数。",
        "required": [
          "incident_id",
          "integration_id"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "故障 ID(MongoDB ObjectID)。"
          },
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "IM 集成 ID。需开启作战室能力;当前支持飞书、钉钉、企业自建企业微信、Slack 与 Teams。"
          },
          "member_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "额外加入作战室的成员 ID 列表。"
          },
          "add_observers": {
            "type": "boolean",
            "description": "为 true 时同时将历史处理人员加入作战室作为观察员。"
          }
        }
      },
      "AssignedTo": {
        "type": "object",
        "description": "故障分派目标。`person_ids` 与 `escalate_rule_id` 至少设置一项。",
        "properties": {
          "person_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "minItems": 1,
            "maxItems": 100,
            "description": "直接指派的成员 ID 列表。"
          },
          "escalate_rule_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "按分派策略指派时使用的策略 ID（MongoDB ObjectID）。"
          },
          "layer_idx": {
            "type": "integer",
            "description": "当前环节索引。"
          },
          "type": {
            "type": "string",
            "description": "指派类型：`assign` 直接指派、`reassign` 重新指派、`escalate` 分派策略驱动、`reopen` 重新打开时自动指派。",
            "enum": [
              "assign",
              "reassign",
              "escalate",
              "reopen"
            ]
          },
          "emails": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "email"
            },
            "minItems": 1,
            "maxItems": 100,
            "description": "邮箱接收人列表，用于 ServiceNow 等外部系统。"
          },
          "escalate_rule_name": {
            "type": "string",
            "description": "分派策略名称，由服务端填充。"
          },
          "assigned_at": {
            "type": "integer",
            "format": "int64",
            "description": "指派发生的 Unix 时间戳（秒）。"
          },
          "id": {
            "type": "string",
            "description": "服务端生成的指派 ID。"
          }
        }
      },
      "PersonShort": {
        "type": "object",
        "description": "Flashduty 成员信息。",
        "properties": {
          "person_id": {
            "type": "integer",
            "format": "int64",
            "description": "成员 ID。"
          },
          "person_name": {
            "type": "string",
            "description": "成员显示名称。"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "成员邮箱。"
          },
          "as": {
            "type": "string",
            "description": "成员在当前上下文中的角色标签。"
          }
        }
      },
      "Responder": {
        "type": "object",
        "description": "故障处理人员，包含指派与认领时间戳。",
        "required": [
          "person_id",
          "assigned_at",
          "acknowledged_at"
        ],
        "properties": {
          "person_id": {
            "type": "integer",
            "format": "int64",
            "description": "处理人员成员 ID。"
          },
          "assigned_at": {
            "type": "integer",
            "format": "int64",
            "description": "被指派时的 Unix 时间戳（秒）。"
          },
          "acknowledged_at": {
            "type": "integer",
            "format": "int64",
            "description": "认领故障的 Unix 时间戳（秒），未认领时为 0。"
          },
          "person_name": {
            "type": "string",
            "description": "成员名称，由服务端填充。"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "成员邮箱，由服务端填充。"
          },
          "as": {
            "type": "string",
            "description": "处理人员角色标签。"
          }
        }
      },
      "LinkItem": {
        "type": "object",
        "description": "协作空间级别的链接集成，通过模板渲染生成。",
        "required": [
          "name",
          "endpoint",
          "open_type"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "链接显示名称。"
          },
          "endpoint": {
            "type": "string",
            "description": "渲染后的链接 URL。"
          },
          "open_type": {
            "type": "string",
            "enum": [
              "popup",
              "tab"
            ],
            "description": "链接打开方式。"
          }
        }
      },
      "Image": {
        "type": "object",
        "description": "图片或附件引用。",
        "required": [
          "src"
        ],
        "properties": {
          "src": {
            "type": "string",
            "description": "图片来源，可以是 `img_` 上传 token 或 `http(s)` URL。"
          },
          "href": {
            "type": "string",
            "description": "可选的图片跳转链接。"
          },
          "alt": {
            "type": "string",
            "description": "替代文本。"
          }
        }
      },
      "IncidentShort": {
        "type": "object",
        "description": "嵌入告警中的故障简要信息。",
        "properties": {
          "incident_id": {
            "type": "string",
            "description": "故障 ID（ObjectID 十六进制字符串）。"
          },
          "title": {
            "type": "string",
            "description": "故障标题。"
          },
          "progress": {
            "type": "string",
            "description": "故障处理进度——`Triggered`、`Processing`、`Closed` 之一。"
          }
        }
      },
      "AlertEventItem": {
        "type": "object",
        "description": "单条原始告警事件。",
        "properties": {
          "event_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "事件 ID（MongoDB ObjectID）。"
          },
          "alert_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "父告警 ID（MongoDB ObjectID）。"
          },
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "账户 ID。"
          },
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "事件路由到的协作空间 ID。"
          },
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "产生该事件的集成 ID。"
          },
          "integration_type": {
            "type": "string",
            "description": "产生该事件的集成类型/插件键。"
          },
          "data_source_id": {
            "type": "integer",
            "format": "int64",
            "description": "已废弃，请使用 `integration_id`。"
          },
          "title": {
            "type": "string",
            "description": "事件标题。"
          },
          "title_rule": {
            "type": "string",
            "description": "用于从标签派生 `title` 的标题模板。"
          },
          "description": {
            "type": "string",
            "description": "事件描述。"
          },
          "alert_key": {
            "type": "string",
            "description": "用于将事件合并到告警的去重键。"
          },
          "event_severity": {
            "type": "string",
            "enum": [
              "Critical",
              "Warning",
              "Info",
              "Ok"
            ],
            "description": "事件严重程度。"
          },
          "event_status": {
            "type": "string",
            "enum": [
              "Critical",
              "Warning",
              "Info",
              "Ok"
            ],
            "description": "事件状态。"
          },
          "event_time": {
            "type": "integer",
            "format": "int64",
            "description": "事件时间戳，Unix 时间戳（秒）。"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "标签键值对。"
          },
          "images": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertImage"
            },
            "description": "事件附加的图片。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "记录创建时间，Unix 时间戳（秒）。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "记录更新时间，Unix 时间戳（秒）。"
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64",
            "description": "软删除时间戳（秒），未删除时为 0。"
          }
        }
      },
      "AlertInfo": {
        "type": "object",
        "description": "告警详情。",
        "required": [
          "alert_id",
          "integration_id",
          "data_source_id",
          "channel_id",
          "account_id",
          "description",
          "title",
          "title_rule",
          "alert_key",
          "alert_severity",
          "alert_status",
          "start_time",
          "last_time",
          "end_time",
          "labels",
          "ever_muted",
          "created_at",
          "updated_at",
          "integration_name",
          "integration_type",
          "integration_ref_id",
          "channel_name",
          "channel_status",
          "responder_name",
          "responder_email",
          "event_cnt",
          "images",
          "data_source_name",
          "data_source_ref_id"
        ],
        "properties": {
          "alert_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "告警 ID（MongoDB ObjectID）。"
          },
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "产生告警的集成 ID。"
          },
          "data_source_id": {
            "type": "integer",
            "format": "int64",
            "description": "已废弃，请使用 `integration_id`。"
          },
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "协作空间 ID。"
          },
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "账号 ID。"
          },
          "description": {
            "type": "string",
            "description": "告警描述。"
          },
          "title": {
            "type": "string",
            "description": "告警标题。"
          },
          "title_rule": {
            "type": "string",
            "description": "标题生成规则。"
          },
          "alert_key": {
            "type": "string",
            "description": "用于合并事件的去重键。"
          },
          "alert_severity": {
            "type": "string",
            "enum": [
              "Critical",
              "Warning",
              "Info",
              "Ok"
            ],
            "description": "当前严重程度。"
          },
          "alert_status": {
            "type": "string",
            "enum": [
              "Critical",
              "Warning",
              "Info",
              "Ok"
            ],
            "description": "当前状态。"
          },
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "告警首次触发的 Unix 时间戳（秒）。"
          },
          "last_time": {
            "type": "integer",
            "format": "int64",
            "description": "最近一次事件的 Unix 时间戳（秒）。"
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "告警恢复的 Unix 时间戳（秒），仍活跃时为 0。"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "告警标签。"
          },
          "ever_muted": {
            "type": "boolean",
            "description": "该告警是否曾被静默。"
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64",
            "description": "软删除时间戳（秒），未删除时为 0。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间戳（秒）。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最后更新时间戳（秒）。"
          },
          "integration_name": {
            "type": "string",
            "description": "集成显示名称。"
          },
          "integration_type": {
            "type": "string",
            "description": "集成类型。"
          },
          "integration_ref_id": {
            "type": "string",
            "description": "集成引用 ID。"
          },
          "channel_name": {
            "type": "string",
            "description": "协作空间名称。"
          },
          "channel_status": {
            "type": "string",
            "description": "协作空间状态。"
          },
          "responder_name": {
            "type": "string",
            "description": "主处理人员名称。"
          },
          "responder_email": {
            "type": "string",
            "description": "主处理人员邮箱。"
          },
          "incident": {
            "$ref": "#/components/schemas/IncidentShort",
            "description": "所属故障引用，若告警已被合并。"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertEventItem"
            },
            "description": "原始告警事件预览，仅在调用方请求时返回；每条告警最多返回最新 20 条。"
          },
          "event_cnt": {
            "type": "integer",
            "format": "int64",
            "description": "合并到该告警的原始事件总数。"
          },
          "images": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Image"
            },
            "description": "附加图片。"
          },
          "data_source_name": {
            "type": "string",
            "description": "已废弃，请使用 `integration_name`。"
          },
          "data_source_type": {
            "type": "string",
            "description": "已废弃，请使用 `integration_type`。"
          },
          "data_source_ref_id": {
            "type": "string",
            "description": "已废弃，请使用 `integration_ref_id`。"
          }
        }
      },
      "IncidentInfo": {
        "type": "object",
        "description": "故障详细信息。",
        "required": [
          "incident_id",
          "account_id",
          "channel_id",
          "integration_id",
          "integration_ids",
          "integration_types",
          "dedup_key",
          "equals_md5",
          "start_time",
          "end_time",
          "last_time",
          "ack_time",
          "close_time",
          "creator_id",
          "closer_id",
          "owner_id",
          "incident_status",
          "incident_severity",
          "progress",
          "title",
          "description",
          "ai_summary",
          "impact",
          "root_cause",
          "resolution",
          "num",
          "created_at",
          "updated_at",
          "snoozed_before",
          "group_method",
          "ever_muted",
          "labels",
          "fields",
          "assigned_to",
          "alert_cnt",
          "active_alert_cnt",
          "alert_event_cnt",
          "responders",
          "account_name",
          "account_locale",
          "account_time_zone",
          "channel_name",
          "channel_status",
          "detail_url",
          "silence_url",
          "post_mortem_id",
          "images",
          "manual_overrides"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "故障 ID（MongoDB ObjectID）。"
          },
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属账号 ID。"
          },
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "协作空间 ID，独立故障为 0。"
          },
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "故障关联的首个集成 ID。"
          },
          "integration_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "所有为此故障贡献告警的集成 ID。"
          },
          "integration_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "所有相关集成的类型。"
          },
          "dedup_key": {
            "type": "string",
            "description": "合并告警时使用的去重键。"
          },
          "equals_md5": {
            "type": "string",
            "description": "用于内容比对的 MD5 哈希。"
          },
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "故障开始的 Unix 时间戳（秒）。"
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "故障结束的 Unix 时间戳（秒），仍活跃时为 0。"
          },
          "last_time": {
            "type": "integer",
            "format": "int64",
            "description": "最近一次更新的 Unix 时间戳（秒）。"
          },
          "ack_time": {
            "type": "integer",
            "format": "int64",
            "description": "首次认领的 Unix 时间戳（秒），未认领时为 0。"
          },
          "close_time": {
            "type": "integer",
            "format": "int64",
            "description": "关闭时间的 Unix 时间戳（秒），仍开启时为 0。"
          },
          "creator_id": {
            "type": "integer",
            "format": "int64",
            "description": "创建者成员 ID，系统自动创建时为 0。"
          },
          "closer_id": {
            "type": "integer",
            "format": "int64",
            "description": "关闭者成员 ID，自动关闭时为 0。"
          },
          "owner_id": {
            "type": "integer",
            "format": "int64",
            "description": "主负责人成员 ID，无则为 0。"
          },
          "incident_status": {
            "type": "string",
            "enum": [
              "Critical",
              "Warning",
              "Info",
              "Ok"
            ],
            "description": "当前故障状态，由告警状态推导。"
          },
          "incident_severity": {
            "type": "string",
            "enum": [
              "Critical",
              "Warning",
              "Info",
              "Ok"
            ],
            "description": "配置的故障严重程度。"
          },
          "progress": {
            "type": "string",
            "enum": [
              "Triggered",
              "Processing",
              "Closed"
            ],
            "description": "故障进展状态。"
          },
          "title": {
            "type": "string",
            "description": "故障标题。"
          },
          "description": {
            "type": "string",
            "description": "故障描述。"
          },
          "ai_summary": {
            "type": "string",
            "description": "AI 生成的故障摘要。"
          },
          "impact": {
            "type": "string",
            "description": "影响范围描述。"
          },
          "root_cause": {
            "type": "string",
            "description": "根因分析。"
          },
          "resolution": {
            "type": "string",
            "description": "解决方案说明。"
          },
          "num": {
            "type": "string",
            "description": "短标识，可能重复。"
          },
          "frequency": {
            "type": "string",
            "description": "频率分布桶，用于分析故障发生模式：`frequent`（频繁）或 `rare`（偶发）。",
            "enum": [
              "frequent",
              "rare"
            ]
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64",
            "description": "软删除时间戳（秒），未删除时为 0。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间戳（秒）。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最后更新时间戳（秒）。"
          },
          "snoozed_before": {
            "type": "integer",
            "format": "int64",
            "description": "通知暂停截止时间（Unix 秒），0 表示未暂停。"
          },
          "group_method": {
            "type": "string",
            "description": "构建故障时使用的告警聚合方法：`i` 智能聚合、`p` 规则聚合、`n` 不聚合。",
            "enum": [
              "i",
              "p",
              "n"
            ]
          },
          "ever_muted": {
            "type": "boolean",
            "description": "该故障是否曾被静默。"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "从告警继承的标签。"
          },
          "fields": {
            "type": "object",
            "additionalProperties": true,
            "description": "自定义字段取值，按字段名索引。"
          },
          "assigned_to": {
            "$ref": "#/components/schemas/AssignedTo"
          },
          "reporter_email": {
            "type": "string",
            "description": "手工创建故障时的上报者邮箱。"
          },
          "alert_cnt": {
            "type": "integer",
            "format": "int64",
            "description": "合并到此故障的告警总数。"
          },
          "active_alert_cnt": {
            "type": "integer",
            "format": "int64",
            "description": "当前处于 Critical/Warning/Info 状态的告警数量。"
          },
          "alert_event_cnt": {
            "type": "integer",
            "format": "int64",
            "description": "所有合并告警的原始事件总数。"
          },
          "alerts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertInfo"
            },
            "description": "关联告警列表，仅在通知模板与自定义动作中填充。"
          },
          "closer": {
            "$ref": "#/components/schemas/PersonShort",
            "description": "关闭人信息。"
          },
          "creator": {
            "$ref": "#/components/schemas/PersonShort",
            "description": "创建人信息。"
          },
          "owner": {
            "$ref": "#/components/schemas/PersonShort",
            "description": "负责人信息，可能已废弃。",
            "deprecated": true
          },
          "responders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Responder"
            },
            "description": "当前处理人员列表。"
          },
          "account_name": {
            "type": "string",
            "description": "账号名称。"
          },
          "account_locale": {
            "type": "string",
            "description": "账号语言。"
          },
          "account_time_zone": {
            "type": "string",
            "description": "账号时区。"
          },
          "channel_name": {
            "type": "string",
            "description": "协作空间名称。"
          },
          "channel_status": {
            "type": "string",
            "description": "协作空间状态。"
          },
          "detail_url": {
            "type": "string",
            "description": "前端详情页地址。"
          },
          "silence_url": {
            "type": "string",
            "description": "快速静默页面地址。"
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LinkItem"
            },
            "description": "协作空间配置的链接集成。"
          },
          "integration_type": {
            "type": "string",
            "description": "首个告警的集成类型，详情页用于标签映射。"
          },
          "post_mortem_id": {
            "type": "string",
            "description": "关联的复盘报告 ID，一条故障只能关联一份复盘报告。"
          },
          "images": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Image"
            },
            "description": "附加图片。"
          },
          "manual_overrides": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "被手工覆盖过的字段名列表。"
          },
          "data_source_id": {
            "type": "integer",
            "format": "int64",
            "description": "已废弃。请使用 `integration_id`。",
            "deprecated": true
          },
          "data_source_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "已废弃。请使用 `integration_ids`。",
            "deprecated": true
          },
          "data_source_type": {
            "type": "string",
            "description": "已废弃。请使用 `integration_type`。",
            "deprecated": true
          },
          "data_source_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "已废弃。请使用 `integration_types`。",
            "deprecated": true
          }
        }
      },
      "IncidentListResponse": {
        "type": "object",
        "description": "故障分页列表。",
        "required": [
          "items",
          "total",
          "has_next_page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IncidentInfo"
            },
            "description": "当前页故障列表。"
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "命中总数。"
          },
          "has_next_page": {
            "type": "boolean",
            "description": "是否还有更多页。"
          },
          "search_after_ctx": {
            "type": "string",
            "description": "下一页翻页游标。"
          }
        }
      },
      "ListIncidentsRequest": {
        "type": "object",
        "description": "查询故障列表的过滤条件。`start_time` 与 `end_time` 必填，时间窗口不超过 31 天。",
        "required": [
          "start_time",
          "end_time"
        ],
        "properties": {
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "时间窗口起点（Unix 秒）。"
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "时间窗口终点（Unix 秒），必须大于 `start_time` 且不超过 31 天。"
          },
          "asc": {
            "type": "boolean",
            "description": "true 为升序。"
          },
          "is_snoozed": {
            "type": "boolean",
            "description": "true 时仅返回已暂停通知的故障。"
          },
          "is_my_team": {
            "type": "boolean",
            "description": "true 时仅返回用户所属团队管理的协作空间中的故障。"
          },
          "is_my_channel": {
            "type": "boolean",
            "description": "true 时仅返回用户个人管理的协作空间中的故障。"
          },
          "ever_muted": {
            "type": "boolean",
            "description": "true 时仅返回曾被静默的故障。"
          },
          "is_rare": {
            "type": "boolean",
            "description": "true 时仅返回新奇故障。"
          },
          "progress": {
            "type": "string",
            "description": "进展状态过滤，逗号分隔（如 `Triggered,Processing`）。"
          },
          "query": {
            "type": "string",
            "description": "全文搜索关键词。"
          },
          "incident_severity": {
            "type": "string",
            "description": "严重程度过滤，逗号分隔（`Critical,Warning,Info`）。"
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "协作空间 ID 列表，0 表示独立故障。"
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "团队 ID 列表，通过协作空间所属团队进行解析。"
          },
          "responder_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "处理人员成员 ID。"
          },
          "acker_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "认领人员成员 ID。"
          },
          "creator_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "创建人员成员 ID，0 表示自动创建。"
          },
          "closer_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "关闭人员成员 ID，0 表示自动关闭。"
          },
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "指定故障 ID 列表进行过滤。"
          },
          "nums": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "按短标识过滤。"
          },
          "p": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "页码，从 1 开始。"
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 100,
            "default": 20,
            "description": "分页大小，最大 100。"
          },
          "search_after_ctx": {
            "type": "string",
            "description": "上一次响应返回的翻页游标。"
          }
        }
      },
      "IncidentInfoRequest": {
        "type": "object",
        "description": "单个故障查询参数。incident_id 与 num 二者择一传入。",
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "故障 ID（MongoDB ObjectID）。"
          },
          "num": {
            "type": "string",
            "description": "故障短 ID（界面上展示的 6 位大写 ID）。不唯一——命中多个时返回最近一个。incident_id 与 num 二者择一传入。"
          }
        }
      },
      "ListIncidentsByIdsRequest": {
        "type": "object",
        "description": "按 ID 批量查询故障的参数。",
        "required": [
          "incident_ids"
        ],
        "properties": {
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "description": "待查询的故障 ID 列表。"
          }
        }
      },
      "ListIncidentAlertsRequest": {
        "type": "object",
        "description": "查询故障关联告警的过滤条件。",
        "required": [
          "incident_id"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "故障 ID（MongoDB ObjectID）。"
          },
          "include_events": {
            "type": "boolean",
            "description": "为 true 时，在每条告警中最多返回最新 20 条原始事件作为预览。"
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "true 时只返回活跃告警（Critical/Warning/Info），false 时只返回已恢复告警（Ok），不传则返回全部。"
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 1000,
            "default": 1000,
            "description": "分页大小，最大 1000。"
          },
          "p": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "default": 1,
            "description": "页码，从 1 开始。"
          }
        }
      },
      "ListIncidentAlertsResponse": {
        "type": "object",
        "description": "故障下的告警分页列表。",
        "required": [
          "items",
          "total"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertInfo"
            },
            "description": "告警列表。"
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "命中总数。"
          }
        }
      },
      "IncidentFeedType": {
        "type": "string",
        "description": "故障时间线条目类型。每个值对应一个生命周期事件，其 `detail` 载荷结构由该字段决定。故障级事件前缀为 `i_`；向上冒泡到故障时间线的告警级事件前缀为 `a_`。\n\n| 类型 | 含义 |\n|---|---|\n| `i_new` | 故障创建：系统自动或人工创建了新故障。 |\n| `i_assign` | 分派响应人：故障被分派给指定人员处理。 |\n| `i_a_rspd` | 添加响应人：有新的响应人被加入处理。 |\n| `i_notify` | 通过某个渠道在指定环节发送通知。 |\n| `i_storm` | 故障触发告警风暴阈值。 |\n| `i_snooze` | 暂停通知指定时长。 |\n| `i_wake` | 取消暂停并恢复通知。 |\n| `i_ack` | 确认故障：响应人确认已开始处理故障。 |\n| `i_unack` | 取消认领。 |\n| `i_comm` | 添加评论：响应人记录了处理进展或关键信息。 |\n| `i_rslv` | 解决故障：故障被标记为已解决。 |\n| `i_reopen` | 重新打开：已解决的故障被重新打开，可能问题复发。 |\n| `i_merge` | 合并故障：多个相关故障被合并为一个。 |\n| `i_r_title` | 标题更新。 |\n| `i_r_desc` | 描述更新。 |\n| `i_r_impact` | 影响范围更新。 |\n| `i_r_rc` | 根因更新。 |\n| `i_r_rsltn` | 解决方案更新。 |\n| `i_r_severity` | 严重等级变更：故障的严重程度被调整。 |\n| `i_r_field` | 自定义字段值更新。 |\n| `i_m_flapping` | 因抖动检测被静默。 |\n| `i_m_reply` | 评论静音回复标记。 |\n| `i_custom` | 执行动作：触发了自动化操作或脚本。 |\n| `i_wr_create` | 创建作战室：建立了即时通讯群组用于协作处理。 |\n| `i_wr_delete` | 删除作战室群组。 |\n| `i_auto_refresh` | 卡片自动刷新事件。 |",
        "enum": [
          "i_new",
          "i_assign",
          "i_a_rspd",
          "i_notify",
          "i_storm",
          "i_snooze",
          "i_wake",
          "i_ack",
          "i_unack",
          "i_comm",
          "i_rslv",
          "i_reopen",
          "i_merge",
          "i_r_title",
          "i_r_desc",
          "i_r_impact",
          "i_r_rc",
          "i_r_rsltn",
          "i_r_severity",
          "i_r_field",
          "i_m_flapping",
          "i_m_reply",
          "i_custom",
          "i_wr_create",
          "i_wr_delete",
          "i_auto_refresh",
          "a_merge"
        ]
      },
      "FeedSeverity": {
        "type": "string",
        "enum": [
          "Ok",
          "Critical",
          "Warning",
          "Info"
        ],
        "description": "严重等级。"
      },
      "NotifyPerson": {
        "type": "object",
        "description": "个人通知投递记录。",
        "properties": {
          "person_id": {
            "type": "integer",
            "format": "int64",
            "description": "接收人成员 ID。"
          },
          "failed_reason": {
            "type": "string",
            "description": "投递失败原因。"
          }
        }
      },
      "NotifyChat": {
        "type": "object",
        "description": "群聊通知投递记录。",
        "properties": {
          "data_source_id": {
            "type": "integer",
            "format": "int64",
            "description": "发送通知所用的集成数据源 ID。"
          },
          "chat_id": {
            "type": "string",
            "description": "群聊 ID。"
          },
          "chat_name": {
            "type": "string",
            "description": "群聊显示名称。"
          },
          "failed_reason": {
            "type": "string",
            "description": "投递失败原因。"
          }
        }
      },
      "NotifyRobot": {
        "type": "object",
        "description": "机器人 webhook 通知投递记录。",
        "properties": {
          "token": {
            "type": "string",
            "description": "机器人 token 或标识。"
          },
          "alias": {
            "type": "string",
            "description": "机器人别名。"
          },
          "failed_reason": {
            "type": "string",
            "description": "投递失败原因。"
          }
        }
      },
      "FeedDetailIncidentNew": {
        "type": "object",
        "description": "`i_new` 的 detail 载荷。",
        "properties": {
          "severity": {
            "$ref": "#/components/schemas/FeedSeverity"
          },
          "title": {
            "type": "string",
            "description": "故障初始标题。"
          },
          "reporter_email": {
            "type": "string",
            "description": "外部创建故障时的上报人邮箱。"
          }
        },
        "title": "i_new"
      },
      "FeedDetailIncidentComment": {
        "type": "object",
        "description": "`i_comm` 的 detail 载荷。",
        "properties": {
          "comment": {
            "type": "string",
            "description": "评论正文。"
          },
          "mute_reply": {
            "type": "boolean",
            "description": "是否静音该评论的回复。"
          }
        },
        "title": "i_comm"
      },
      "FeedDetailIncidentAck": {
        "type": "object",
        "description": "`i_ack` 的 detail 载荷。",
        "properties": {
          "progress": {
            "type": "string",
            "description": "认领时记录的处理进展。"
          }
        },
        "title": "i_ack"
      },
      "FeedDetailIncidentUnack": {
        "type": "object",
        "description": "`i_unack` 的 detail 载荷。",
        "properties": {
          "progress": {
            "type": "string",
            "description": "取消认领时记录的处理进展。"
          }
        },
        "title": "i_unack"
      },
      "FeedDetailIncidentSnooze": {
        "type": "object",
        "description": "`i_snooze` 的 detail 载荷。",
        "properties": {
          "minutes": {
            "type": "integer",
            "format": "int64",
            "description": "暂停时长（分钟）。"
          }
        },
        "title": "i_snooze"
      },
      "FeedDetailIncidentWake": {
        "type": "object",
        "description": "`i_wake` 的 detail 载荷。",
        "properties": {
          "snoozedBefore": {
            "type": "integer",
            "format": "int64",
            "description": "原本计划结束暂停的 Unix 时间戳。"
          }
        },
        "title": "i_wake"
      },
      "FeedDetailIncidentResolve": {
        "type": "object",
        "description": "`i_rslv` 的 detail 载荷。",
        "required": [
          "from"
        ],
        "properties": {
          "from": {
            "type": "string",
            "enum": [
              "voice",
              "console",
              "card",
              "wcard",
              "event",
              "autorslv",
              "autorefresh",
              "escalation"
            ],
            "description": "触发恢复操作的来源。"
          }
        },
        "title": "i_rslv"
      },
      "FeedDetailIncidentReopen": {
        "type": "object",
        "description": "`i_reopen` 的 detail 载荷。",
        "properties": {
          "reason": {
            "type": "string",
            "description": "重新打开故障的原因。"
          }
        },
        "title": "i_reopen"
      },
      "FeedDetailIncidentMerge": {
        "type": "object",
        "description": "`i_merge` 的 detail 载荷。",
        "properties": {
          "comment": {
            "type": "string",
            "description": "合并时的评论。"
          },
          "source_incidents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IncidentShort"
            },
            "description": "被合并的源故障列表。"
          },
          "target_incident": {
            "$ref": "#/components/schemas/IncidentShort"
          },
          "owner_id": {
            "type": "integer",
            "format": "int64",
            "description": "执行合并操作的成员 ID。"
          },
          "title": {
            "type": "string",
            "description": "合并后的故障标题。"
          },
          "remove_source_incidents": {
            "type": "boolean",
            "description": "合并后是否移除源故障。"
          },
          "source_responders": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "从源故障继承的响应人成员 ID 列表。"
          }
        },
        "title": "i_merge"
      },
      "FeedDetailIncidentAssign": {
        "type": "object",
        "description": "`i_assign` 的 detail 载荷。在 `AssignedTo` 基础上附加目标成员 ID 列表。",
        "allOf": [
          {
            "$ref": "#/components/schemas/AssignedTo"
          },
          {
            "type": "object",
            "properties": {
              "to": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int64"
                },
                "description": "被分派的成员 ID 列表。"
              }
            }
          }
        ],
        "title": "i_assign"
      },
      "FeedDetailIncidentAddRspd": {
        "type": "object",
        "description": "`i_a_rspd` 的 detail 载荷。",
        "properties": {
          "to": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "新增为响应人的成员 ID 列表。"
          }
        },
        "title": "i_a_rspd"
      },
      "FeedDetailIncidentResetTitle": {
        "type": "object",
        "description": "`i_r_title` 的 detail 载荷。",
        "properties": {
          "from": {
            "type": "string",
            "description": "变更前的标题。"
          },
          "to": {
            "type": "string",
            "description": "变更后的标题。"
          }
        },
        "title": "i_r_title"
      },
      "FeedDetailIncidentResetDescription": {
        "type": "object",
        "description": "`i_r_desc` 的 detail 载荷，无字段。",
        "properties": {},
        "additionalProperties": false,
        "title": "i_r_desc"
      },
      "FeedDetailIncidentResetImpact": {
        "type": "object",
        "description": "`i_r_impact` 的 detail 载荷，无字段。",
        "properties": {},
        "additionalProperties": false,
        "title": "i_r_impact"
      },
      "FeedDetailIncidentResetRootCause": {
        "type": "object",
        "description": "`i_r_rc` 的 detail 载荷，无字段。",
        "properties": {},
        "additionalProperties": false,
        "title": "i_r_rc"
      },
      "FeedDetailIncidentResetResolution": {
        "type": "object",
        "description": "`i_r_rsltn` 的 detail 载荷，无字段。",
        "properties": {},
        "additionalProperties": false,
        "title": "i_r_rsltn"
      },
      "FeedDetailIncidentResetSeverity": {
        "type": "object",
        "description": "`i_r_severity` 的 detail 载荷。",
        "properties": {
          "from": {
            "$ref": "#/components/schemas/FeedSeverity"
          },
          "to": {
            "$ref": "#/components/schemas/FeedSeverity"
          }
        },
        "title": "i_r_severity"
      },
      "FeedDetailIncidentResetField": {
        "type": "object",
        "description": "`i_r_field` 的 detail 载荷。",
        "required": [
          "field_name"
        ],
        "properties": {
          "field_name": {
            "type": "string",
            "description": "被更新的自定义字段名称。"
          },
          "to": {
            "description": "自定义字段的新值，类型取决于字段定义。"
          }
        },
        "title": "i_r_field"
      },
      "FeedDetailIncidentNotify": {
        "type": "object",
        "description": "`i_notify` 的 detail 载荷。",
        "required": [
          "layer_idx"
        ],
        "properties": {
          "rid": {
            "type": "string",
            "description": "通知记录 ID。"
          },
          "msg_id": {
            "type": "string",
            "description": "投递渠道返回的上游消息 ID。"
          },
          "fire_type": {
            "type": "string",
            "enum": [
              "fire",
              "refire"
            ],
            "description": "首次触发或再次触发。"
          },
          "escalate_rule_name": {
            "type": "string",
            "description": "分派策略名称。"
          },
          "escalate_rule_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "分派策略 ID（MongoDB ObjectID）。"
          },
          "layer_idx": {
            "type": "integer",
            "description": "本次通知所处的环节索引。"
          },
          "by": {
            "type": "string",
            "description": "投递渠道或方式标签。"
          },
          "persons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotifyPerson"
            },
            "description": "个人投递记录。"
          },
          "chats": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotifyChat"
            },
            "description": "群聊投递记录。"
          },
          "robots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotifyRobot"
            },
            "description": "机器人投递记录。"
          }
        },
        "title": "i_notify"
      },
      "FeedDetailIncidentStorm": {
        "type": "object",
        "description": "`i_storm` 的 detail 载荷。",
        "properties": {
          "threshold": {
            "type": "integer",
            "description": "触发的风暴阈值。"
          }
        },
        "title": "i_storm"
      },
      "FeedDetailIncidentMuteByFlapping": {
        "type": "object",
        "description": "`i_m_flapping` 的 detail 载荷。",
        "properties": {
          "max_changes": {
            "type": "integer",
            "description": "窗口内允许的最大状态变化次数。"
          },
          "in_mins": {
            "type": "integer",
            "description": "统计窗口长度（分钟）。"
          },
          "mute_mins": {
            "type": "integer",
            "description": "触发抖动检测后的静音时长（分钟）。"
          }
        },
        "title": "i_m_flapping"
      },
      "FeedDetailIncidentMuteReply": {
        "type": "object",
        "description": "`i_m_reply` 的 detail 载荷，无字段。",
        "properties": {},
        "additionalProperties": false,
        "title": "i_m_reply"
      },
      "FeedDetailIncidentCustomAction": {
        "type": "object",
        "description": "`i_custom` 的 detail 载荷。",
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "执行动作的集成 ID。"
          },
          "integration_name": {
            "type": "string",
            "description": "集成显示名称。"
          }
        },
        "title": "i_custom"
      },
      "FeedDetailIncidentWarRoomCreate": {
        "type": "object",
        "description": "`i_wr_create` 的 detail 载荷。",
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "承载作战室群聊的集成 ID。"
          },
          "chat_id": {
            "type": "string",
            "description": "群聊 ID。"
          },
          "chat_name": {
            "type": "string",
            "description": "群聊显示名称。"
          },
          "plugin_type": {
            "type": "string",
            "description": "聊天集成插件类型。"
          },
          "integration_name": {
            "type": "string",
            "description": "集成显示名称。"
          },
          "share_link": {
            "type": "string",
            "description": "作战室的可分享加入链接。"
          }
        },
        "title": "i_wr_create"
      },
      "FeedDetailIncidentWarRoomDelete": {
        "type": "object",
        "description": "`i_wr_delete` 的 detail 载荷。",
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "承载作战室群聊的集成 ID。"
          },
          "chat_id": {
            "type": "string",
            "description": "群聊 ID。"
          },
          "chat_name": {
            "type": "string",
            "description": "群聊显示名称。"
          },
          "plugin_type": {
            "type": "string",
            "description": "聊天集成插件类型。"
          },
          "integration_name": {
            "type": "string",
            "description": "集成显示名称。"
          }
        },
        "title": "i_wr_delete"
      },
      "FeedDetailIncidentAutoRefreshCard": {
        "type": "object",
        "description": "`i_auto_refresh` 的 detail 载荷，无字段。",
        "properties": {},
        "additionalProperties": false,
        "title": "i_auto_refresh"
      },
      "IncidentFeedItem": {
        "type": "object",
        "description": "单条故障时间线条目。`detail` 字段由 `type` 决定具体结构，详见各 `FeedDetail*` 结构。",
        "required": [
          "ref_id",
          "type",
          "detail",
          "account_id",
          "creator_id",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "ref_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "引用对象 ObjectID，根据 type 不同可能指向故障或告警。"
          },
          "type": {
            "$ref": "#/components/schemas/IncidentFeedType"
          },
          "detail": {
            "description": "类型相关的负载，具体结构由 `type` 决定。",
            "oneOf": [
              {
                "$ref": "#/components/schemas/FeedDetailIncidentNew"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentAssign"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentAddRspd"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentNotify"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentStorm"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentSnooze"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentWake"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentAck"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentUnack"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentComment"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentResolve"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentReopen"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentMerge"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentResetTitle"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentResetDescription"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentResetImpact"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentResetRootCause"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentResetResolution"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentResetSeverity"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentResetField"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentMuteByFlapping"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentMuteReply"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentCustomAction"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentWarRoomCreate"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentWarRoomDelete"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentAutoRefreshCard"
              }
            ],
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "i_new": "#/components/schemas/FeedDetailIncidentNew",
                "i_assign": "#/components/schemas/FeedDetailIncidentAssign",
                "i_a_rspd": "#/components/schemas/FeedDetailIncidentAddRspd",
                "i_notify": "#/components/schemas/FeedDetailIncidentNotify",
                "i_storm": "#/components/schemas/FeedDetailIncidentStorm",
                "i_snooze": "#/components/schemas/FeedDetailIncidentSnooze",
                "i_wake": "#/components/schemas/FeedDetailIncidentWake",
                "i_ack": "#/components/schemas/FeedDetailIncidentAck",
                "i_unack": "#/components/schemas/FeedDetailIncidentUnack",
                "i_comm": "#/components/schemas/FeedDetailIncidentComment",
                "i_rslv": "#/components/schemas/FeedDetailIncidentResolve",
                "i_reopen": "#/components/schemas/FeedDetailIncidentReopen",
                "i_merge": "#/components/schemas/FeedDetailIncidentMerge",
                "i_r_title": "#/components/schemas/FeedDetailIncidentResetTitle",
                "i_r_desc": "#/components/schemas/FeedDetailIncidentResetDescription",
                "i_r_impact": "#/components/schemas/FeedDetailIncidentResetImpact",
                "i_r_rc": "#/components/schemas/FeedDetailIncidentResetRootCause",
                "i_r_rsltn": "#/components/schemas/FeedDetailIncidentResetResolution",
                "i_r_severity": "#/components/schemas/FeedDetailIncidentResetSeverity",
                "i_r_field": "#/components/schemas/FeedDetailIncidentResetField",
                "i_m_flapping": "#/components/schemas/FeedDetailIncidentMuteByFlapping",
                "i_m_reply": "#/components/schemas/FeedDetailIncidentMuteReply",
                "i_custom": "#/components/schemas/FeedDetailIncidentCustomAction",
                "i_wr_create": "#/components/schemas/FeedDetailIncidentWarRoomCreate",
                "i_wr_delete": "#/components/schemas/FeedDetailIncidentWarRoomDelete",
                "i_auto_refresh": "#/components/schemas/FeedDetailIncidentAutoRefreshCard"
              }
            }
          },
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "账号 ID。"
          },
          "creator_id": {
            "type": "integer",
            "format": "int64",
            "description": "操作人成员 ID，`0` 表示系统生成。"
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64",
            "description": "软删除时间戳（毫秒），未删除时为 0。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间戳（毫秒）。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最后更新时间戳（毫秒）。"
          }
        }
      },
      "ListIncidentFeedRequest": {
        "type": "object",
        "description": "获取故障时间线的参数。",
        "required": [
          "incident_id"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "故障 ID（MongoDB ObjectID）。"
          },
          "p": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "description": "页码，从 1 开始。"
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 100,
            "default": 20,
            "description": "分页大小，最大 100。"
          },
          "asc": {
            "type": "boolean",
            "description": "true 为按时间升序。"
          },
          "types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IncidentFeedType"
            },
            "description": "可选类型过滤，仅返回指定类型的时间线条目。"
          }
        }
      },
      "ListIncidentFeedResponse": {
        "type": "object",
        "description": "故障时间线分页结果。",
        "required": [
          "has_next_page",
          "items"
        ],
        "properties": {
          "has_next_page": {
            "type": "boolean",
            "description": "是否还有更多条目。"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IncidentFeedItem"
            },
            "description": "当前页的时间线条目。"
          }
        }
      },
      "ListPastIncidentsRequest": {
        "type": "object",
        "description": "查询历史相似故障的参数。",
        "required": [
          "incident_id"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "基准故障 ID（MongoDB ObjectID）。"
          },
          "limit": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0,
            "maximum": 100,
            "default": 5,
            "description": "返回的相似故障最大数量。"
          }
        }
      },
      "PastIncidentItem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/IncidentInfo"
          },
          {
            "type": "object",
            "required": [
              "score"
            ],
            "properties": {
              "score": {
                "type": "number",
                "format": "float",
                "description": "向量检索返回的相似度分值。"
              }
            }
          }
        ]
      },
      "ListPastIncidentsResponse": {
        "type": "object",
        "description": "历史相似故障列表，按相关性排序。",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PastIncidentItem"
            },
            "description": "相似故障及其评分。"
          }
        }
      },
      "AckIncidentRequest": {
        "type": "object",
        "description": "认领故障的参数。",
        "required": [
          "incident_ids"
        ],
        "properties": {
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "maxItems": 100,
            "description": "待认领的故障 ID 列表，单次最多 100 条。",
            "minItems": 1
          }
        }
      },
      "UnackIncidentRequest": {
        "type": "object",
        "description": "取消认领故障的参数。",
        "required": [
          "incident_ids"
        ],
        "properties": {
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "maxItems": 100,
            "description": "待取消认领的故障 ID 列表，单次最多 100 条。",
            "minItems": 1
          }
        }
      },
      "ResolveIncidentRequest": {
        "type": "object",
        "description": "恢复故障的参数。",
        "required": [
          "incident_ids"
        ],
        "properties": {
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "maxItems": 100,
            "description": "待恢复的故障 ID 列表，单次最多 100 条。",
            "minItems": 1
          },
          "root_cause": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1024,
            "description": "可选，应用到所有故障的根因说明。"
          },
          "resolution": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1024,
            "description": "可选，应用到所有故障的解决方案说明。"
          }
        }
      },
      "ReopenIncidentRequest": {
        "type": "object",
        "description": "重新打开故障的参数。",
        "required": [
          "incident_ids"
        ],
        "properties": {
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "maxItems": 100,
            "description": "待重开的故障 ID 列表，单次最多 100 条。",
            "minItems": 1
          },
          "reason": {
            "type": "string",
            "maxLength": 1024,
            "description": "可选，记录到时间线的重开原因。"
          }
        }
      },
      "SnoozeIncidentRequest": {
        "type": "object",
        "description": "暂停故障通知的参数。",
        "required": [
          "incident_ids",
          "minutes"
        ],
        "properties": {
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "maxItems": 100,
            "description": "待暂停的故障 ID 列表，单次最多 100 条。"
          },
          "minutes": {
            "type": "integer",
            "format": "int64",
            "exclusiveMinimum": 0,
            "maximum": 1440,
            "description": "暂停时长（分钟），必须大于 0 且不超过 1440（24 小时）。"
          }
        }
      },
      "WakeIncidentRequest": {
        "type": "object",
        "description": "恢复故障通知的参数。",
        "required": [
          "incident_ids"
        ],
        "properties": {
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "maxItems": 100,
            "description": "待恢复通知的故障 ID 列表，单次最多 100 条。",
            "minItems": 1
          }
        }
      },
      "MergeIncidentsRequest": {
        "type": "object",
        "description": "合并故障的参数。",
        "required": [
          "source_incident_ids",
          "target_incident_id"
        ],
        "properties": {
          "source_incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "minItems": 1,
            "maxItems": 100,
            "description": "待合并的源故障 ID 列表。若其中包含目标故障 ID，系统会自动去除。"
          },
          "target_incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "合并目标故障 ID。"
          },
          "title": {
            "type": "string",
            "maxLength": 512,
            "description": "可选，为目标故障设置新标题。"
          },
          "comment": {
            "type": "string",
            "maxLength": 1024,
            "description": "可选，合并时间线上的备注。"
          },
          "owner_id": {
            "type": "integer",
            "format": "int64",
            "description": "可选，为目标故障设置新负责人。"
          },
          "remove_source_incidents": {
            "type": "boolean",
            "description": "为 true 时合并后软删除源故障，否则将源故障关闭。"
          }
        }
      },
      "DisableIncidentMergeRequest": {
        "type": "object",
        "description": "禁用故障自动合并的参数。",
        "required": [
          "incident_ids"
        ],
        "properties": {
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "description": "需禁用自动合并的故障 ID 列表。"
          }
        }
      },
      "UpdateIncidentFieldsRequest": {
        "type": "object",
        "description": "更新故障可编辑字段的参数。至少需要提供一个字段；handler 只会更新显式传入的字段。",
        "required": [
          "incident_id"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "故障 ID（MongoDB ObjectID）。"
          },
          "title": {
            "type": "string",
            "minLength": 3,
            "maxLength": 200,
            "description": "新标题。"
          },
          "description": {
            "type": "string",
            "minLength": 3,
            "maxLength": 6144,
            "description": "新描述。"
          },
          "impact": {
            "type": "string",
            "minLength": 3,
            "maxLength": 6144,
            "description": "新影响描述。"
          },
          "root_cause": {
            "type": "string",
            "minLength": 3,
            "maxLength": 6144,
            "description": "新根因分析。"
          },
          "resolution": {
            "type": "string",
            "minLength": 3,
            "maxLength": 6144,
            "description": "新解决方案说明。"
          },
          "incident_severity": {
            "type": "string",
            "enum": [
              "Info",
              "Warning",
              "Critical"
            ],
            "description": "新严重程度。"
          }
        }
      },
      "RemoveIncidentRequest": {
        "type": "object",
        "description": "永久删除故障的参数。",
        "required": [
          "incident_ids"
        ],
        "properties": {
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "maxItems": 100,
            "description": "待删除的故障 ID 列表，单次最多 100 条。调用方必须拥有所有故障所在协作空间的访问权限。"
          }
        }
      },
      "CommentIncidentRequest": {
        "type": "object",
        "description": "为故障添加评论的参数。",
        "required": [
          "incident_ids"
        ],
        "properties": {
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "maxItems": 100,
            "description": "目标故障 ID 列表，单次最多 100 条。",
            "minItems": 1
          },
          "comment": {
            "type": "string",
            "maxLength": 1024,
            "description": "评论内容。"
          },
          "mute_reply": {
            "type": "boolean",
            "description": "为 true 时不触发 webhook 回复动作。"
          }
        }
      },
      "AssignIncidentRequest": {
        "type": "object",
        "description": "分派故障的参数。`incident_id` 与 `incident_ids` 二选一。",
        "required": [
          "assigned_to"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "单个故障 ID。当 `incident_ids` 也传入时将被忽略。"
          },
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "minItems": 1,
            "maxItems": 100,
            "description": "批量故障 ID 列表。"
          },
          "assigned_to": {
            "$ref": "#/components/schemas/AssignedTo"
          }
        }
      },
      "AddIncidentResponderRequest": {
        "type": "object",
        "description": "向已有故障添加处理人员的参数。",
        "required": [
          "incident_id",
          "person_ids"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "故障 ID（MongoDB ObjectID）。"
          },
          "person_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "要添加的处理人员成员 ID 列表。"
          },
          "notify": {
            "type": "object",
            "description": "通知配置，默认跟随每人的个人通知偏好。",
            "properties": {
              "follow_preference": {
                "type": "boolean",
                "description": "为 true 时跟随处理人员的个人偏好。"
              },
              "personal_channels": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "使用的通知渠道（如 `voice`、`sms`、`email`）。"
              },
              "template_id": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{24}$",
                "description": "通知模板 ID（MongoDB ObjectID）。"
              }
            }
          }
        }
      },
      "ResetIncidentFieldRequest": {
        "type": "object",
        "description": "更新故障自定义字段值的参数。",
        "required": [
          "incident_id",
          "field_name"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "故障 ID（MongoDB ObjectID）。"
          },
          "field_name": {
            "type": "string",
            "description": "自定义字段名称，必须与账号下定义的字段匹配。"
          },
          "field_value": {
            "description": "字段新值，类型需与字段定义一致。"
          }
        }
      },
      "DoIncidentCustomActionRequest": {
        "type": "object",
        "description": "对故障执行自定义操作集成的参数。",
        "required": [
          "incident_id",
          "integration_id"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "故障 ID（MongoDB ObjectID）。"
          },
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "自定义操作集成 ID，必须已启用且关联故障所在协作空间。"
          }
        }
      },
      "DoIncidentCustomActionResponse": {
        "type": "object",
        "description": "自定义操作的执行结果。",
        "properties": {
          "message": {
            "type": "string",
            "description": "HTTP 调用失败时的错误信息，成功时不返回。"
          }
        }
      },
      "GetWarRoomDetailRequest": {
        "type": "object",
        "description": "获取战情室实时详情的参数。",
        "required": [
          "integration_id",
          "chat_id"
        ],
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "托管该战情室的 IM 集成 ID。"
          },
          "chat_id": {
            "type": "string",
            "description": "IM 侧的群/会话 ID。"
          }
        }
      },
      "WarRoom": {
        "type": "object",
        "description": "从 IM 侧拉取的战情室实时详情。若群组已在 IM 侧被删除则返回空对象。",
        "required": [
          "chat_id",
          "chat_name",
          "share_link"
        ],
        "properties": {
          "chat_id": {
            "type": "string",
            "description": "IM 侧的群/会话 ID。"
          },
          "chat_name": {
            "type": "string",
            "description": "群组显示名称。"
          },
          "share_link": {
            "type": "string",
            "description": "加入链接，若 IM 提供。"
          }
        }
      },
      "ListWarRoomsRequest": {
        "type": "object",
        "description": "查询故障战情室列表的参数。",
        "required": [
          "incident_id"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "故障 ID（MongoDB ObjectID）。"
          },
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "可选过滤：仅返回指定 IM 集成下的战情室。"
          }
        }
      },
      "WarRoomItem": {
        "type": "object",
        "description": "战情室记录。",
        "required": [
          "account_id",
          "integration_id",
          "created_by",
          "chat_id",
          "incident_id",
          "status",
          "created_at",
          "plugin_type"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "账号 ID。"
          },
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "IM 集成 ID。"
          },
          "created_by": {
            "type": "integer",
            "format": "int64",
            "description": "创建成员 ID。"
          },
          "chat_id": {
            "type": "string",
            "description": "IM 侧的群/会话 ID。"
          },
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "关联的故障 ID（MongoDB ObjectID）。"
          },
          "status": {
            "type": "string",
            "description": "战情室状态。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间戳（秒）。"
          },
          "plugin_type": {
            "type": "string",
            "description": "IM 插件类型（如 `feishu`、`dingtalk`、`wecom`、`slack`）。"
          }
        }
      },
      "ListWarRoomsResponse": {
        "type": "object",
        "description": "故障关联战情室列表。",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WarRoomItem"
            },
            "description": "战情室记录列表。"
          }
        }
      },
      "DeleteWarRoomRequest": {
        "type": "object",
        "description": "删除故障战情室的参数。",
        "required": [
          "incident_id",
          "integration_id"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "故障 ID（MongoDB ObjectID）。"
          },
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "IM 集成 ID。"
          }
        }
      },
      "ListPostMortemsRequest": {
        "type": "object",
        "description": "查询复盘报告列表的过滤条件。",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "drafting",
              "published"
            ],
            "description": "复盘状态，缺省时服务端默认按 `published` 过滤。"
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "限定查询的团队 ID。"
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "限定查询的协作空间 ID。"
          },
          "created_at_start_seconds": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "创建时间下界（秒）。"
          },
          "created_at_end_seconds": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "创建时间上界（秒）。"
          },
          "order_by": {
            "type": "string",
            "enum": [
              "created_at_seconds",
              "updated_at_seconds"
            ],
            "description": "排序字段。"
          },
          "asc": {
            "type": "boolean",
            "description": "true 为升序。"
          },
          "p": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "页码，从 1 开始。"
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 100,
            "default": 20,
            "description": "分页大小，最大 100。"
          },
          "search_after_ctx": {
            "type": "string",
            "description": "上一次响应返回的翻页游标。"
          }
        }
      },
      "PostMortemMeta": {
        "type": "object",
        "description": "复盘报告元信息（列表中使用的精简结构）。",
        "required": [
          "account_id",
          "title",
          "status",
          "post_mortem_id",
          "template_id",
          "incident_ids",
          "media_count",
          "author_ids",
          "team_id",
          "channel_id",
          "is_private",
          "channel_name",
          "created_at_seconds",
          "updated_at_seconds"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "账号 ID。"
          },
          "title": {
            "type": "string",
            "description": "复盘标题。"
          },
          "status": {
            "type": "string",
            "enum": [
              "drafting",
              "published"
            ],
            "description": "复盘状态。"
          },
          "post_mortem_id": {
            "type": "string",
            "description": "按账号和故障 ID 确定性派生的复盘报告 ID。"
          },
          "template_id": {
            "type": "string",
            "description": "初始化时使用的模板 ID。"
          },
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "关联的故障 ID 列表。"
          },
          "media_count": {
            "type": "integer",
            "description": "已上传的媒体文件数量。"
          },
          "author_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "贡献过该复盘的成员 ID 列表。"
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属团队 ID，为 0 表示无。"
          },
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属协作空间 ID，为 0 表示无。"
          },
          "is_private": {
            "type": "boolean",
            "description": "为 true 时仅团队成员和管理员可查看。"
          },
          "channel_name": {
            "type": "string",
            "description": "协作空间名称，由服务端填充。"
          },
          "created_at_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间戳（秒）。"
          },
          "updated_at_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "最后更新时间戳（秒）。"
          }
        }
      },
      "ListPostMortemsResponse": {
        "type": "object",
        "description": "复盘报告分页列表。",
        "required": [
          "items",
          "total",
          "has_next_page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostMortemMeta"
            },
            "description": "当前页复盘元信息。"
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "命中总数。"
          },
          "has_next_page": {
            "type": "boolean",
            "description": "是否还有更多页。"
          },
          "search_after_ctx": {
            "type": "string",
            "description": "翻页游标。"
          }
        }
      },
      "PostMortemItem": {
        "type": "object",
        "description": "完整复盘报告，包含基础信息、正文与跟进项。",
        "required": [
          "meta",
          "basics",
          "content",
          "follow_ups"
        ],
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/PostMortemMeta"
          },
          "basics": {
            "type": "object",
            "required": [
              "incidents_highest_severity",
              "incidents_earliest_start_seconds",
              "incidents_latest_close_seconds",
              "incidents_total_duration_seconds",
              "responders"
            ],
            "properties": {
              "incidents_highest_severity": {
                "type": "string",
                "description": "关联故障的最高严重程度。"
              },
              "incidents_earliest_start_seconds": {
                "type": "integer",
                "format": "int64",
                "description": "关联故障中最早的开始时间（秒）。"
              },
              "incidents_latest_close_seconds": {
                "type": "integer",
                "format": "int64",
                "description": "关联故障中最晚的关闭时间（秒）。"
              },
              "incidents_total_duration_seconds": {
                "type": "integer",
                "format": "int64",
                "description": "累计持续时长（秒）。"
              },
              "responders": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Responder"
                },
                "description": "参与处理的成员。"
              }
            }
          },
          "content": {
            "type": "object",
            "required": [
              "content"
            ],
            "properties": {
              "content": {
                "type": "string",
                "description": "正文内容（BlockNote JSON）。"
              }
            }
          },
          "follow_ups": {
            "type": "string",
            "description": "跟进行动项，单字符串表示。"
          }
        }
      },
      "DeletePostMortemRequest": {
        "type": "object",
        "description": "删除复盘报告的参数。",
        "required": [
          "post_mortem_id"
        ],
        "properties": {
          "post_mortem_id": {
            "type": "string",
            "description": "复盘报告 ID。"
          }
        }
      },
      "CreateIncidentResponse": {
        "type": "object",
        "description": "手动创建故障的返回结果。",
        "required": [
          "incident_id",
          "title"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "新建故障的 ID（MongoDB ObjectID）。"
          },
          "title": {
            "type": "string",
            "description": "回显请求中传入的故障标题。"
          }
        }
      },
      "FilterCondition": {
        "type": "object",
        "required": [
          "key",
          "oper",
          "vals"
        ],
        "properties": {
          "key": {
            "type": "string",
            "description": "过滤字段名。内置告警字段使用字段名（如 `alert_severity`、`alert_key`、`check`、`resource`、`service`、`cluster`），自定义标签使用 `labels.<name>` 前缀（如 `labels.env`、`labels.region`）。"
          },
          "oper": {
            "type": "string",
            "enum": [
              "IN",
              "NOTIN"
            ],
            "description": "过滤操作符。`IN`：值必须匹配 `vals` 中的某一项；`NOTIN`：值不能匹配 `vals` 中任何一项。支持 `/pattern/` 格式的正则表达式。"
          },
          "vals": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "匹配值列表。每一项为普通字符串或 `/regex/` 正则模式。"
          }
        }
      },
      "OrFilterGroup": {
        "type": "array",
        "description": "OR-of-AND 过滤树。外层数组为 AND 组列表，任意一个 AND 组匹配即通过；AND 组内所有条件须同时满足。",
        "items": {
          "type": "array",
          "description": "AND 组——组内所有条件须同时满足。",
          "items": {
            "$ref": "#/components/schemas/FilterCondition"
          }
        }
      },
      "CreateChannelRequest": {
        "type": "object",
        "description": "创建协作空间所需的参数。",
        "required": [
          "team_id",
          "channel_name"
        ],
        "properties": {
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属团队 ID。"
          },
          "managing_team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "maxItems": 3,
            "description": "可管理该协作空间的其他团队 ID,最多 3 个。"
          },
          "channel_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 59,
            "description": "协作空间名称,1 到 59 个字符。"
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "描述信息,最多 500 个字符。"
          },
          "escalate_rule": {
            "type": "object",
            "description": "协作空间的默认分派策略,不需要时可省略。",
            "required": [
              "template_id",
              "target"
            ],
            "properties": {
              "aggr_window": {
                "type": "integer",
                "minimum": 0,
                "maximum": 3600,
                "description": "延迟窗口,单位秒,0 表示不延迟。"
              },
              "template_id": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{24}$",
                "description": "通知模板 ID(MongoDB ObjectID)。"
              },
              "target": {
                "type": "object",
                "description": "通知目标。`person_ids`、`team_ids`、`schedule_to_role_ids`、`emails` 至少设置一项,且 `by` 与 `webhooks` 至少设置一项。",
                "properties": {
                  "person_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "format": "int64"
                    },
                    "description": "直接通知的成员 ID 列表。"
                  },
                  "team_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "format": "int64"
                    },
                    "description": "通知的团队 ID 列表。"
                  },
                  "schedule_to_role_ids": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "format": "int64"
                      }
                    },
                    "description": "值班表 ID 到角色 ID 列表的映射,用于按值班角色通知。"
                  },
                  "emails": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "email"
                    },
                    "description": "邮箱地址列表(推送场景)。"
                  },
                  "by": {
                    "type": "object",
                    "description": "按告警等级配置的个人通知渠道。未提供 `webhooks` 时必填。",
                    "properties": {
                      "follow_preference": {
                        "type": "boolean",
                        "description": "为 true 时跟随处理人员的个人偏好,忽略下方列表。"
                      },
                      "critical": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Critical 级别使用的通知渠道(如 `voice`、`sms`、`email`、`feishu`)。"
                      },
                      "warning": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Warning 级别使用的通知渠道。"
                      },
                      "info": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Info 级别使用的通知渠道。"
                      }
                    }
                  },
                  "webhooks": {
                    "type": "array",
                    "description": "群聊/Webhook 通知目标。未提供 `by` 时必填。",
                    "items": {
                      "type": "object",
                      "required": [
                        "type",
                        "settings"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Webhook 类型(如 `feishu`、`dingtalk_app`、`wecom_app`、`slack`、`teams`、`custom`)。"
                        },
                        "settings": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "类型相关的配置参数(群聊 ID、URL 等)。"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "group": {
            "type": "object",
            "description": "告警聚合配置。",
            "required": [
              "method"
            ],
            "properties": {
              "method": {
                "type": "string",
                "enum": [
                  "i",
                  "p",
                  "n"
                ],
                "description": "聚合方式:`i` 智能、`p` 规则、`n` 不聚合。"
              },
              "equals": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "maxItems": 5,
                "description": "用于聚合判定的 label 键分组。"
              },
              "cases": {
                "type": "array",
                "maxItems": 100,
                "description": "按过滤条件的聚合策略覆盖。",
                "items": {
                  "type": "object"
                }
              },
              "all_equals_required": {
                "type": "boolean",
                "description": "为 true 时要求所有键同时存在才能参与聚合。"
              },
              "time_window": {
                "type": "integer",
                "minimum": 0,
                "description": "聚合时间窗口,单位秒。"
              },
              "window_type": {
                "type": "string",
                "enum": [
                  "tumbling",
                  "sliding"
                ],
                "description": "窗口类型,默认 `tumbling`。"
              },
              "storm_threshold": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10000,
                "description": "告警风暴阈值。"
              },
              "storm_thresholds": {
                "type": "array",
                "items": {
                  "type": "integer"
                },
                "maxItems": 5,
                "description": "多级告警风暴阈值。"
              },
              "i_keys": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 10,
                "description": "用于智能聚合向量化的 label 键。"
              },
              "i_score_threshold": {
                "type": "number",
                "format": "float",
                "minimum": 0.5,
                "maximum": 1,
                "description": "智能聚合相似度阈值。"
              }
            }
          },
          "flapping": {
            "type": "object",
            "description": "抖动检测配置。",
            "properties": {
              "is_disabled": {
                "type": "boolean",
                "description": "禁用抖动检测。"
              },
              "max_changes": {
                "type": "integer",
                "minimum": 2,
                "maximum": 100,
                "description": "`in_mins` 内允许的最大状态变更次数。"
              },
              "in_mins": {
                "type": "integer",
                "minimum": 1,
                "maximum": 1440,
                "description": "观察窗口,单位分钟。"
              },
              "mute_mins": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1440,
                "description": "检测到抖动后的静音时长,单位分钟。"
              }
            }
          },
          "auto_resolve_timeout": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 2592000,
            "description": "自动恢复超时,单位秒。0 表示不自动恢复,最长 30 天。"
          },
          "auto_resolve_mode": {
            "type": "string",
            "enum": [
              "trigger",
              "update"
            ],
            "description": "自动恢复计时重置方式。"
          },
          "plugin_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "订阅该协作空间的集成 ID 列表。"
          },
          "is_private": {
            "type": "boolean",
            "description": "为 true 时仅管理团队可见。"
          },
          "disable_outlier_detection": {
            "type": "boolean",
            "description": "禁用新奇故障检测。"
          },
          "disable_auto_close": {
            "type": "boolean",
            "description": "禁用故障自动关闭。"
          },
          "is_external_report_enabled": {
            "type": "boolean",
            "description": "允许外部上报人向该协作空间上报故障。"
          }
        }
      },
      "CreateEscalationRuleRequest": {
        "type": "object",
        "description": "创建分派策略所需的参数。",
        "required": [
          "channel_id",
          "template_id",
          "rule_name",
          "layers"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属协作空间 ID。"
          },
          "priority": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 200,
            "description": "匹配优先级,数值越小越优先。"
          },
          "aggr_window": {
            "type": "integer",
            "minimum": 0,
            "maximum": 3600,
            "description": "延迟窗口,单位秒,0 表示不延迟。"
          },
          "template_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "通知模板 ID(MongoDB ObjectID)。"
          },
          "rule_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39,
            "description": "策略名称,1 到 39 个字符。"
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "策略描述,最多 500 个字符。"
          },
          "layers": {
            "type": "array",
            "description": "分派环节列表,至少包含一个环节。",
            "items": {
              "type": "object",
              "required": [
                "target"
              ],
              "properties": {
                "max_times": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 6,
                  "description": "当前环节内的最大重复通知次数。"
                },
                "notify_step": {
                  "type": "number",
                  "format": "float",
                  "minimum": 0.5,
                  "maximum": 120,
                  "description": "重复通知间隔,单位分钟。"
                },
                "target": {
                  "type": "object",
                  "description": "通知目标。`person_ids`、`team_ids`、`schedule_to_role_ids`、`emails` 至少设置一项,且 `by` 与 `webhooks` 至少设置一项。",
                  "properties": {
                    "person_ids": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "format": "int64"
                      },
                      "description": "直接通知的成员 ID 列表。"
                    },
                    "team_ids": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "format": "int64"
                      },
                      "description": "通知的团队 ID 列表。"
                    },
                    "schedule_to_role_ids": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "integer",
                          "format": "int64"
                        }
                      },
                      "description": "值班表 ID 到角色 ID 列表的映射,用于按值班角色通知。"
                    },
                    "emails": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "email"
                      },
                      "description": "邮箱地址列表(推送场景)。"
                    },
                    "by": {
                      "type": "object",
                      "description": "按告警等级配置的个人通知渠道。未提供 `webhooks` 时必填。",
                      "properties": {
                        "follow_preference": {
                          "type": "boolean",
                          "description": "为 true 时跟随处理人员的个人偏好,忽略下方列表。"
                        },
                        "critical": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Critical 级别使用的通知渠道(如 `voice`、`sms`、`email`、`feishu`)。"
                        },
                        "warning": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Warning 级别使用的通知渠道。"
                        },
                        "info": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Info 级别使用的通知渠道。"
                        }
                      }
                    },
                    "webhooks": {
                      "type": "array",
                      "description": "群聊/Webhook 通知目标。未提供 `by` 时必填。",
                      "items": {
                        "type": "object",
                        "required": [
                          "type",
                          "settings"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "Webhook 类型(如 `feishu`、`dingtalk_app`、`wecom_app`、`slack`、`teams`、`custom`)。"
                          },
                          "settings": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "类型相关的配置参数(群聊 ID、URL 等)。"
                          }
                        }
                      }
                    }
                  }
                },
                "escalate_window": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 720,
                  "description": "升级到下一环节前的等待时长,单位分钟。"
                },
                "force_escalate": {
                  "type": "boolean",
                  "description": "为 true 时,即便未认领也强制升级。"
                }
              }
            }
          },
          "time_filters": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "周期性时间窗口。`start`/`end` 使用 24 小时制 `HH:MM` 格式;`repeat` 使用星期索引(0=周日 … 6=周六)。",
              "properties": {
                "start": {
                  "type": "string",
                  "description": "窗口起始时间,`HH:MM`。"
                },
                "end": {
                  "type": "string",
                  "description": "窗口结束时间,`HH:MM`。"
                },
                "repeat": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  },
                  "description": "生效的星期列表,留空表示每天。"
                },
                "cal_id": {
                  "type": "string",
                  "description": "可选日历 ID,限制窗口仅在日历匹配的日期生效。"
                },
                "is_off": {
                  "type": "boolean",
                  "description": "为 true 时匹配日历中的休息日。"
                }
              }
            },
            "description": "可选的周期性生效时间窗口。"
          },
          "filters": {
            "type": "array",
            "description": "或-与组合条件树。每个外层元素为一组 AND 条件,组内所有条件需同时满足。",
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "key",
                  "oper",
                  "vals"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "字段键(如 `alert_severity`、`labels.service`)。"
                  },
                  "oper": {
                    "type": "string",
                    "enum": [
                      "IN",
                      "NOTIN"
                    ],
                    "description": "过滤运算符。"
                  },
                  "vals": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "匹配值列表。"
                  }
                }
              }
            }
          }
        }
      },
      "CreateInhibitRuleRequest": {
        "type": "object",
        "description": "创建抑制策略所需的参数。",
        "required": [
          "channel_id",
          "rule_name",
          "equals"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属协作空间 ID。"
          },
          "priority": {
            "type": "integer",
            "description": "匹配优先级,数值越小越优先。"
          },
          "rule_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39,
            "description": "策略名称,1 到 39 个字符。"
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "策略描述,最多 500 个字符。"
          },
          "equals": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "用于匹配源告警与目标告警的 label 键列表。"
          },
          "source_filters": {
            "type": "array",
            "description": "或-与组合条件树。每个外层元素为一组 AND 条件,组内所有条件需同时满足。",
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "key",
                  "oper",
                  "vals"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "字段键(如 `alert_severity`、`labels.service`)。"
                  },
                  "oper": {
                    "type": "string",
                    "enum": [
                      "IN",
                      "NOTIN"
                    ],
                    "description": "过滤运算符。"
                  },
                  "vals": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "匹配值列表。"
                  }
                }
              }
            }
          },
          "target_filters": {
            "type": "array",
            "description": "或-与组合条件树。每个外层元素为一组 AND 条件,组内所有条件需同时满足。",
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "key",
                  "oper",
                  "vals"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "字段键(如 `alert_severity`、`labels.service`)。"
                  },
                  "oper": {
                    "type": "string",
                    "enum": [
                      "IN",
                      "NOTIN"
                    ],
                    "description": "过滤运算符。"
                  },
                  "vals": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "匹配值列表。"
                  }
                }
              }
            }
          },
          "is_directly_discard": {
            "type": "boolean",
            "description": "为 true 时被抑制的目标告警将直接丢弃而非合并。"
          }
        }
      },
      "CreateSilenceRuleRequest": {
        "type": "object",
        "description": "创建静默策略所需的参数。`time_filter` 与 `time_filters` 必须且只能设置其一,`filters` 不能为空。",
        "required": [
          "channel_id",
          "rule_name"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属协作空间 ID。"
          },
          "priority": {
            "type": "integer",
            "description": "匹配优先级,数值越小越优先。"
          },
          "rule_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39,
            "description": "策略名称,1 到 39 个字符。"
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "策略描述,最多 500 个字符。"
          },
          "from_incident_id": {
            "type": "string",
            "description": "当静默策略从故障创建时对应的源故障 ID。"
          },
          "time_filters": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "周期性时间窗口。`start`/`end` 使用 24 小时制 `HH:MM` 格式;`repeat` 使用星期索引(0=周日 … 6=周六)。",
              "properties": {
                "start": {
                  "type": "string",
                  "description": "窗口起始时间,`HH:MM`。"
                },
                "end": {
                  "type": "string",
                  "description": "窗口结束时间,`HH:MM`。"
                },
                "repeat": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  },
                  "description": "生效的星期列表,留空表示每天。"
                },
                "cal_id": {
                  "type": "string",
                  "description": "可选日历 ID,限制窗口仅在日历匹配的日期生效。"
                },
                "is_off": {
                  "type": "boolean",
                  "description": "为 true 时匹配日历中的休息日。"
                }
              }
            },
            "description": "生效的周期性时间窗口列表,与 `time_filter` 互斥。"
          },
          "time_filter": {
            "type": "object",
            "description": "一次性时间窗口,使用 Unix 秒定义。",
            "required": [
              "start_time",
              "end_time"
            ],
            "properties": {
              "start_time": {
                "type": "integer",
                "format": "int64",
                "description": "窗口起始时间戳(Unix 秒),需小于 `end_time`。"
              },
              "end_time": {
                "type": "integer",
                "format": "int64",
                "description": "窗口结束时间戳(Unix 秒)。"
              }
            }
          },
          "filters": {
            "type": "array",
            "description": "或-与组合条件树。每个外层元素为一组 AND 条件,组内所有条件需同时满足。",
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "key",
                  "oper",
                  "vals"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "字段键(如 `alert_severity`、`labels.service`)。"
                  },
                  "oper": {
                    "type": "string",
                    "enum": [
                      "IN",
                      "NOTIN"
                    ],
                    "description": "过滤运算符。"
                  },
                  "vals": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "匹配值列表。"
                  }
                }
              }
            }
          },
          "is_directly_discard": {
            "type": "boolean",
            "description": "为 true 时被静默的告警将直接丢弃而非并入故障。"
          },
          "is_auto_delete": {
            "type": "boolean",
            "description": "为 true 时，静默规则在时间窗结束后会被自动删除；默认为 false。"
          }
        }
      },
      "CreateDropRuleRequest": {
        "type": "object",
        "description": "创建排除规则所需的参数。",
        "required": [
          "channel_id",
          "rule_name"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属协作空间 ID。"
          },
          "priority": {
            "type": "integer",
            "description": "匹配优先级,数值越小越优先。"
          },
          "rule_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39,
            "description": "规则名称,1 到 39 个字符。"
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "规则描述,最多 500 个字符。"
          },
          "filters": {
            "type": "array",
            "description": "或-与组合条件树。每个外层元素为一组 AND 条件,组内所有条件需同时满足。",
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "key",
                  "oper",
                  "vals"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "字段键(如 `alert_severity`、`labels.service`)。"
                  },
                  "oper": {
                    "type": "string",
                    "enum": [
                      "IN",
                      "NOTIN"
                    ],
                    "description": "过滤运算符。"
                  },
                  "vals": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "匹配值列表。"
                  }
                }
              }
            }
          }
        }
      },
      "TimeFilter": {
        "type": "object",
        "description": "周期性时间窗口。`start`/`end` 采用 24 小时制 `HH:MM`；`repeat` 采用 ISO 风格的星期索引（0=周日 … 6=周六）。",
        "properties": {
          "start": {
            "type": "string",
            "description": "窗口开始时间（`HH:MM`）。"
          },
          "end": {
            "type": "string",
            "description": "窗口结束时间（`HH:MM`）。"
          },
          "repeat": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "窗口每周生效的日期，空表示每天。"
          },
          "cal_id": {
            "type": "string",
            "description": "可选日历 ID，将窗口限制为日历中的匹配日期。"
          },
          "is_off": {
            "type": "boolean",
            "description": "为 true 时匹配日历中标记为休息日的日期。"
          }
        }
      },
      "OnceTimeFilter": {
        "type": "object",
        "description": "以 Unix 秒定义的一次性时间窗口。",
        "required": [
          "start_time",
          "end_time"
        ],
        "properties": {
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "窗口起始时间（Unix 秒），必须大于 0 且小于 `end_time`。",
            "exclusiveMinimum": 0
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "窗口结束时间（Unix 秒），必须大于 0。",
            "exclusiveMinimum": 0
          }
        }
      },
      "FilterGroup": {
        "$ref": "#/components/schemas/OrFilterGroup"
      },
      "EscalateTarget": {
        "type": "object",
        "description": "通知目标。`person_ids`、`team_ids`、`schedule_to_role_ids`、`emails` 至少设置一项，且 `by` 与 `webhooks` 至少设置一项。",
        "properties": {
          "person_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "直接通知的成员 ID 列表。"
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "通知的团队 ID 列表。"
          },
          "schedule_to_role_ids": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            },
            "description": "值班表 ID 到角色 ID 列表的映射，用于按值班角色通知。"
          },
          "emails": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "email"
            },
            "description": "邮箱地址列表（推送场景）。"
          },
          "by": {
            "type": "object",
            "description": "按告警等级配置的个人通知渠道。未提供 `webhooks` 时必填。",
            "properties": {
              "follow_preference": {
                "type": "boolean",
                "description": "为 true 时跟随处理人员的个人偏好，忽略下方列表。"
              },
              "critical": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Critical 级别使用的通知渠道（如 `voice`、`sms`、`email`、`feishu`）。"
              },
              "warning": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Warning 级别使用的通知渠道。"
              },
              "info": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Info 级别使用的通知渠道。"
              }
            }
          },
          "webhooks": {
            "type": "array",
            "description": "群聊/Webhook 通知目标。未提供 `by` 时必填。",
            "items": {
              "type": "object",
              "required": [
                "type",
                "settings"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Webhook 类型（如 `feishu`、`dingtalk_app`、`wecom_app`、`slack`、`teams`、`custom`）。"
                },
                "settings": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "类型相关的配置参数（群聊 ID、URL 等）。"
                }
              }
            }
          }
        }
      },
      "EscalateLayer": {
        "type": "object",
        "required": [
          "target"
        ],
        "properties": {
          "max_times": {
            "type": "integer",
            "minimum": 0,
            "maximum": 6,
            "description": "当前环节内的最大重复通知次数。"
          },
          "notify_step": {
            "type": "number",
            "format": "float",
            "minimum": 0.5,
            "maximum": 120,
            "description": "重复通知间隔，单位分钟。"
          },
          "target": {
            "$ref": "#/components/schemas/EscalateTarget"
          },
          "escalate_window": {
            "type": "integer",
            "minimum": 0,
            "maximum": 720,
            "description": "进入下一环节前的等待时间，单位分钟。"
          },
          "force_escalate": {
            "type": "boolean",
            "description": "为 true 时无论是否认领都强制升级。"
          }
        }
      },
      "Group": {
        "type": "object",
        "description": "告警聚合配置。",
        "required": [
          "method"
        ],
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "i",
              "p",
              "n"
            ],
            "description": "聚合方式：`i` 智能、`p` 规则、`n` 不聚合。"
          },
          "equals": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "maxItems": 5,
            "description": "用于聚合判定的 label 键分组。"
          },
          "cases": {
            "type": "array",
            "maxItems": 100,
            "description": "按过滤条件的聚合策略覆盖。",
            "items": {
              "type": "object"
            }
          },
          "all_equals_required": {
            "type": "boolean",
            "description": "为 true 时要求所有键同时存在才能参与聚合。"
          },
          "time_window": {
            "type": "integer",
            "minimum": 0,
            "description": "聚合时间窗口，单位分钟。默认最大值为 1440 分钟（24 小时）；开启扩展功能的账号最大可设置 43200 分钟（30 天）。"
          },
          "window_type": {
            "type": "string",
            "enum": [
              "tumbling",
              "sliding"
            ],
            "description": "窗口类型，默认 `tumbling`。"
          },
          "storm_threshold": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000,
            "description": "告警风暴阈值。"
          },
          "storm_thresholds": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "maxItems": 5,
            "description": "多级告警风暴阈值。"
          },
          "i_keys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 10,
            "description": "用于智能聚合向量化的 label 键。"
          },
          "i_score_threshold": {
            "type": "number",
            "format": "float",
            "minimum": 0.5,
            "maximum": 1,
            "description": "智能聚合相似度阈值。"
          }
        }
      },
      "Flapping": {
        "type": "object",
        "description": "抖动检测配置。",
        "properties": {
          "is_disabled": {
            "type": "boolean",
            "description": "禁用抖动检测。"
          },
          "max_changes": {
            "type": "integer",
            "minimum": 2,
            "maximum": 100,
            "description": "`in_mins` 内允许的最大状态变更次数。"
          },
          "in_mins": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1440,
            "description": "观察窗口，单位分钟。"
          },
          "mute_mins": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1440,
            "description": "检测到抖动后的静音时长，单位分钟。"
          }
        }
      },
      "IncProgressCnts": {
        "type": "object",
        "required": [
          "Triggered",
          "Processing"
        ],
        "properties": {
          "Triggered": {
            "type": "integer",
            "format": "int64",
            "description": "近 30 天触发中的故障数量。"
          },
          "Processing": {
            "type": "integer",
            "format": "int64",
            "description": "近 30 天处理中的故障数量。"
          }
        }
      },
      "ChannelItem": {
        "type": "object",
        "description": "协作空间详情记录，所有字段可选，仅在有值时返回。",
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "协作空间 ID。"
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属团队 ID。"
          },
          "team_name": {
            "type": "string",
            "description": "所属团队名称（由团队目录解析；无法解析时为空）。"
          },
          "managing_team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "可管理该协作空间的其他团队 ID 列表。"
          },
          "creator_id": {
            "type": "integer",
            "format": "int64",
            "description": "创建者成员 ID。"
          },
          "creator_name": {
            "type": "string",
            "description": "创建者成员名称（由成员目录解析；无法解析时为空）。"
          },
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属账户 ID。"
          },
          "channel_name": {
            "type": "string",
            "description": "协作空间名称。"
          },
          "description": {
            "type": "string",
            "description": "描述信息。"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled",
              "deleted"
            ],
            "description": "协作空间状态。"
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64",
            "description": "删除时间（Unix 秒），仅软删除的协作空间非零。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间（Unix 秒）。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最近更新时间（Unix 秒）。"
          },
          "auto_resolve_timeout": {
            "type": "integer",
            "format": "int64",
            "description": "自动恢复超时，单位秒。0 表示不自动恢复。"
          },
          "auto_resolve_mode": {
            "type": "string",
            "enum": [
              "trigger",
              "update"
            ],
            "description": "自动恢复计时重置方式。"
          },
          "is_private": {
            "type": "boolean",
            "description": "为 true 时仅管理团队可见。"
          },
          "disable_outlier_detection": {
            "type": "boolean",
            "description": "为 true 时禁用新奇故障检测。"
          },
          "disable_auto_close": {
            "type": "boolean",
            "description": "为 true 时禁用故障自动关闭。"
          },
          "group": {
            "$ref": "#/components/schemas/Group"
          },
          "flapping": {
            "$ref": "#/components/schemas/Flapping"
          },
          "progress_to_incident_cnts": {
            "$ref": "#/components/schemas/IncProgressCnts"
          },
          "is_starred": {
            "type": "boolean",
            "description": "当前用户是否已收藏该协作空间。"
          },
          "active_incident_highest_severity": {
            "type": "string",
            "description": "协作空间内活跃故障的最高严重程度。"
          },
          "last_incident_at": {
            "type": "integer",
            "format": "int64",
            "description": "最近一次故障时间（Unix 秒）。"
          },
          "is_external_report_enabled": {
            "type": "boolean",
            "description": "是否允许外部上报人向该协作空间上报故障。"
          },
          "external_report_token": {
            "type": "string",
            "description": "启用外部上报时授予外部上报人的 token。"
          }
        }
      },
      "ChannelShort": {
        "type": "object",
        "required": [
          "channel_id",
          "channel_name"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "协作空间 ID。"
          },
          "channel_name": {
            "type": "string",
            "description": "协作空间名称。"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ],
            "description": "协作空间状态。"
          }
        }
      },
      "EscalateRuleItem": {
        "type": "object",
        "required": [
          "account_id",
          "channel_id",
          "priority",
          "aggr_window",
          "rule_name",
          "description",
          "layers",
          "time_filters",
          "filters",
          "status",
          "template_id",
          "rule_id",
          "updated_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属账户 ID。"
          },
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属协作空间 ID。"
          },
          "priority": {
            "type": "integer",
            "description": "匹配优先级，数值越小越优先。"
          },
          "aggr_window": {
            "type": "integer",
            "description": "延迟窗口，单位秒。"
          },
          "rule_name": {
            "type": "string",
            "description": "策略名称。"
          },
          "description": {
            "type": "string",
            "description": "策略描述。"
          },
          "layers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EscalateLayer"
            },
            "description": "分派环节列表。"
          },
          "time_filters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeFilter"
            },
            "description": "策略生效的周期性时间窗口。"
          },
          "filters": {
            "$ref": "#/components/schemas/FilterGroup"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ],
            "description": "策略状态。"
          },
          "template_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "通知模板 ID（MongoDB ObjectID）。"
          },
          "rule_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "分派策略 ID（MongoDB ObjectID）。"
          },
          "updated_by": {
            "type": "integer",
            "format": "int64",
            "description": "最近更新该策略的成员 ID。"
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64",
            "description": "删除时间（Unix 秒），仅软删除时返回。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间（Unix 秒）。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最近更新时间（Unix 秒）。"
          },
          "channel_name": {
            "type": "string",
            "description": "协作空间名称，跨空间列表响应会填充该字段。"
          }
        }
      },
      "SilenceRuleItem": {
        "type": "object",
        "required": [
          "account_id",
          "channel_id",
          "priority",
          "rule_name",
          "description",
          "time_filters",
          "time_filter",
          "filters",
          "is_directly_discard",
          "status",
          "rule_id",
          "updated_by",
          "created_at",
          "updated_at",
          "is_effective"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64"
          },
          "channel_id": {
            "type": "integer",
            "format": "int64"
          },
          "priority": {
            "type": "integer",
            "description": "匹配优先级，数值越小越优先。"
          },
          "rule_name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "from_incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "从故障创建静默时的源故障 ID。"
          },
          "time_filters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeFilter"
            },
            "description": "周期性时间窗口。"
          },
          "time_filter": {
            "$ref": "#/components/schemas/OnceTimeFilter"
          },
          "filters": {
            "$ref": "#/components/schemas/FilterGroup"
          },
          "is_directly_discard": {
            "type": "boolean",
            "description": "为 true 时静默的告警直接丢弃，不会生成故障。"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ]
          },
          "rule_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "updated_by": {
            "type": "integer",
            "format": "int64"
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "is_effective": {
            "type": "boolean",
            "description": "当前是否正在生效。"
          },
          "is_auto_delete": {
            "type": "boolean",
            "description": "为 true 时，静默规则在时间窗结束后会被自动删除；默认为 false。"
          }
        }
      },
      "InhibitRuleItem": {
        "type": "object",
        "required": [
          "account_id",
          "channel_id",
          "priority",
          "rule_name",
          "description",
          "source_filters",
          "target_filters",
          "equals",
          "is_directly_discard",
          "status",
          "rule_id",
          "updated_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64"
          },
          "channel_id": {
            "type": "integer",
            "format": "int64"
          },
          "priority": {
            "type": "integer"
          },
          "rule_name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "source_filters": {
            "$ref": "#/components/schemas/FilterGroup"
          },
          "target_filters": {
            "$ref": "#/components/schemas/FilterGroup"
          },
          "equals": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "用于配对源告警与目标告警的 label 键列表。"
          },
          "is_directly_discard": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ]
          },
          "rule_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "updated_by": {
            "type": "integer",
            "format": "int64"
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "UnsubscribeRuleItem": {
        "type": "object",
        "description": "排除规则记录。",
        "required": [
          "account_id",
          "channel_id",
          "priority",
          "rule_name",
          "description",
          "filters",
          "status",
          "rule_id",
          "updated_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64"
          },
          "channel_id": {
            "type": "integer",
            "format": "int64"
          },
          "priority": {
            "type": "integer"
          },
          "rule_name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "filters": {
            "$ref": "#/components/schemas/FilterGroup"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ]
          },
          "rule_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "updated_by": {
            "type": "integer",
            "format": "int64"
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ChannelInfoRequest": {
        "type": "object",
        "required": [
          "channel_id"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "要查询的协作空间 ID。"
          }
        }
      },
      "ListChannelsRequest": {
        "type": "object",
        "properties": {
          "p": {
            "type": "integer",
            "minimum": 1,
            "description": "页码，从 1 开始。"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 100,
            "description": "每页大小，未传时默认为 100。"
          },
          "orderby": {
            "type": "string",
            "enum": [
              "ranking",
              "created_at",
              "updated_at",
              "channel_name",
              "last_incident_at"
            ],
            "description": "排序字段。"
          },
          "asc": {
            "type": "boolean",
            "description": "为 true 时升序排序。"
          },
          "is_my_managed": {
            "type": "boolean",
            "description": "为 true 时仅返回当前用户可管理的协作空间。"
          },
          "is_my_starred": {
            "type": "boolean",
            "description": "为 true 时仅返回当前用户收藏的协作空间，与 `is_my_team` 互斥。"
          },
          "is_brief": {
            "type": "boolean",
            "description": "为 true 时仅返回简要字段（`channel_id`、`channel_name`、`description`、`status`）。"
          },
          "is_my_team": {
            "type": "boolean",
            "description": "为 true 时仅返回当前用户所在团队持有的协作空间，与 `is_my_starred` 互斥。"
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "按团队 ID 过滤。"
          },
          "query": {
            "type": "string",
            "description": "按名称/描述的全文查询串。"
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "按指定协作空间 ID 过滤。"
          },
          "channel_name": {
            "type": "string",
            "description": "协作空间名称精确匹配，优先级高于 `query` 的名称过滤。"
          }
        }
      },
      "ChannelInfosRequest": {
        "type": "object",
        "required": [
          "channel_ids"
        ],
        "properties": {
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "maxItems": 1000,
            "description": "要查询的协作空间 ID 列表，最多 1000 个。"
          }
        }
      },
      "UpdateChannelRequest": {
        "type": "object",
        "required": [
          "channel_id"
        ],
        "description": "更新协作空间所需参数，仅传入的字段会被更新。",
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "要更新的协作空间 ID。"
          },
          "team_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "新的所属团队 ID。"
          },
          "managing_team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "maxItems": 3,
            "description": "可管理该协作空间的其他团队 ID，最多 3 个。"
          },
          "channel_name": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 59,
            "description": "新的协作空间名称，1 到 59 个字符。"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500,
            "description": "新的描述信息，最多 500 个字符。"
          },
          "auto_resolve_timeout": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0,
            "maximum": 2592000,
            "description": "自动恢复超时，单位秒。0 表示不自动恢复，最长 30 天。"
          },
          "auto_resolve_mode": {
            "type": "string",
            "enum": [
              "trigger",
              "update"
            ],
            "description": "自动恢复计时重置方式。"
          },
          "is_private": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "为 true 时仅管理团队可见。"
          },
          "group": {
            "$ref": "#/components/schemas/Group"
          },
          "flapping": {
            "$ref": "#/components/schemas/Flapping"
          },
          "disable_outlier_detection": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "禁用新奇故障检测。"
          },
          "disable_auto_close": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "禁用故障自动关闭。"
          },
          "is_external_report_enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "允许外部上报人向该协作空间上报故障。"
          }
        }
      },
      "UpdateChannelResponse": {
        "type": "object",
        "description": "更新协作空间的响应。仅在请求中将 `is_external_report_enabled` 设为 `true` 时返回有效字段，否则所有字段为空。",
        "properties": {
          "external_report_token": {
            "type": "string",
            "description": "新生成的外部上报令牌。仅在请求中将 `is_external_report_enabled` 设为 `true` 时返回。调用方应保存此值，之后无法再次获取。"
          }
        }
      },
      "ChannelIDRequest": {
        "type": "object",
        "required": [
          "channel_id"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "协作空间 ID。"
          }
        }
      },
      "ChannelScopedListRequest": {
        "type": "object",
        "required": [
          "channel_id"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "要列出规则的协作空间 ID。"
          }
        }
      },
      "UpdateSilenceRuleRequest": {
        "type": "object",
        "description": "更新静默策略所需参数。`time_filter` 与 `time_filters` 必须且只能传一个，`filters` 不能为空。",
        "required": [
          "channel_id",
          "rule_id",
          "rule_name"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属协作空间 ID。"
          },
          "rule_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "静默策略 ID（MongoDB ObjectID）。"
          },
          "priority": {
            "type": "integer",
            "description": "匹配优先级，数值越小越优先。"
          },
          "rule_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39,
            "description": "策略名称，1 到 39 个字符。"
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "策略描述，最多 500 个字符。"
          },
          "time_filters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeFilter"
            },
            "description": "周期性时间窗口，与 `time_filter` 互斥。"
          },
          "time_filter": {
            "$ref": "#/components/schemas/OnceTimeFilter"
          },
          "filters": {
            "$ref": "#/components/schemas/FilterGroup"
          },
          "is_directly_discard": {
            "type": "boolean",
            "description": "为 true 时静默的告警直接丢弃，而非抑制为故障。"
          },
          "is_auto_delete": {
            "type": "boolean",
            "description": "为 true 时，静默规则在时间窗结束后会被自动删除；默认为 false。"
          }
        }
      },
      "ChannelRuleIDRequest": {
        "type": "object",
        "required": [
          "channel_id",
          "rule_id"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属协作空间 ID。"
          },
          "rule_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "规则 ID（MongoDB ObjectID）。"
          }
        }
      },
      "UpdateInhibitRuleRequest": {
        "type": "object",
        "description": "更新抑制策略所需参数。",
        "required": [
          "channel_id",
          "rule_id",
          "rule_name",
          "equals"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属协作空间 ID。"
          },
          "rule_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "抑制策略 ID（MongoDB ObjectID）。"
          },
          "priority": {
            "type": "integer",
            "description": "匹配优先级，数值越小越优先。"
          },
          "rule_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39,
            "description": "策略名称，1 到 39 个字符。"
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "策略描述，最多 500 个字符。"
          },
          "equals": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "用于配对源告警与目标告警的 label 键列表。"
          },
          "source_filters": {
            "$ref": "#/components/schemas/FilterGroup"
          },
          "target_filters": {
            "$ref": "#/components/schemas/FilterGroup"
          },
          "is_directly_discard": {
            "type": "boolean",
            "description": "为 true 时被抑制的目标告警直接丢弃，而非合并。"
          }
        }
      },
      "UpdateDropRuleRequest": {
        "type": "object",
        "description": "更新排除规则所需参数。",
        "required": [
          "channel_id",
          "rule_id",
          "rule_name"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属协作空间 ID。"
          },
          "rule_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "排除规则 ID（MongoDB ObjectID）。"
          },
          "priority": {
            "type": "integer",
            "description": "匹配优先级，数值越小越优先。"
          },
          "rule_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39,
            "description": "规则名称，1 到 39 个字符。"
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "规则描述，最多 500 个字符。"
          },
          "filters": {
            "$ref": "#/components/schemas/FilterGroup"
          }
        }
      },
      "UpdateEscalationRuleRequest": {
        "type": "object",
        "description": "更新分派策略所需参数。",
        "required": [
          "channel_id",
          "rule_id",
          "template_id",
          "rule_name",
          "layers"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属协作空间 ID。"
          },
          "rule_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "分派策略 ID（MongoDB ObjectID）。"
          },
          "priority": {
            "type": [
              "integer",
              "null"
            ],
            "description": "匹配优先级，数值越小越优先。"
          },
          "aggr_window": {
            "type": "integer",
            "description": "延迟窗口，单位秒，0 表示不延迟。"
          },
          "template_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "通知模板 ID（MongoDB ObjectID）。"
          },
          "rule_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39,
            "description": "策略名称，1 到 39 个字符。"
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "策略描述，最多 500 个字符。"
          },
          "layers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EscalateLayer"
            },
            "description": "分派环节列表，至少包含一个环节。"
          },
          "time_filters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeFilter"
            },
            "description": "可选的周期性生效时间窗口。"
          },
          "filters": {
            "$ref": "#/components/schemas/FilterGroup"
          }
        }
      },
      "ListChannelsResponse": {
        "type": "object",
        "required": [
          "items",
          "total",
          "has_next_page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChannelItem"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "匹配到的协作空间总数。"
          },
          "has_next_page": {
            "type": "boolean",
            "description": "是否还有下一页。"
          }
        }
      },
      "ChannelInfosResponse": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChannelShort"
            }
          }
        }
      },
      "ListSilenceRulesResponse": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SilenceRuleItem"
            }
          }
        }
      },
      "ListInhibitRulesResponse": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InhibitRuleItem"
            }
          }
        }
      },
      "ListDropRulesResponse": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UnsubscribeRuleItem"
            }
          }
        }
      },
      "ListEscalationRulesResponse": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EscalateRuleItem"
            }
          }
        }
      },
      "ChannelCreateResponse": {
        "type": "object",
        "required": [
          "channel_id",
          "channel_name"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "新建协作空间的 ID。"
          },
          "channel_name": {
            "type": "string",
            "description": "请求中回显的协作空间名称。"
          },
          "external_report_token": {
            "type": "string",
            "description": "外部上报 token，仅在启用外部上报时返回。"
          }
        }
      },
      "RuleCreateResponse": {
        "type": "object",
        "required": [
          "rule_id",
          "rule_name"
        ],
        "properties": {
          "rule_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "新建规则的 ID（MongoDB ObjectID）。"
          },
          "rule_name": {
            "type": "string",
            "description": "请求中回显的规则名称。"
          }
        }
      },
      "RouteMatchCondition": {
        "type": "object",
        "description": "单个匹配条件。同一 case 内的所有条件之间为 AND 关系。",
        "required": [
          "key",
          "oper",
          "vals"
        ],
        "properties": {
          "key": {
            "type": "string",
            "description": "用于与告警事件比对的字段键(如 `alert_severity`、`labels.service`)。"
          },
          "oper": {
            "type": "string",
            "enum": [
              "IN",
              "NOTIN"
            ],
            "description": "匹配运算符。`IN` 表示字段值命中 `vals` 中任一项;`NOTIN` 表示均不命中。"
          },
          "vals": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "用于比对的值列表。每项支持字面量、通配符（`*`、`?`）、以斜杠包裹的正则表达式（`/pattern/`）、CIDR（`cidr:10.0.0.0/8`）以及数值比较（`num:lt:100`）。"
          }
        }
      },
      "RouteCase": {
        "type": "object",
        "description": "路由规则中的单个 case 分支。当其全部条件命中后,告警将分发到所配置的协作空间。",
        "required": [
          "if",
          "channel_ids",
          "fallthrough"
        ],
        "properties": {
          "if": {
            "type": "array",
            "description": "匹配条件列表,条件之间为 AND 关系。",
            "items": {
              "$ref": "#/components/schemas/RouteMatchCondition"
            }
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "目标协作空间 ID。当 `routing_mode` 为 `standard`(或为空)时必填。"
          },
          "fallthrough": {
            "type": "boolean",
            "description": "为 `true` 时,本 case 命中后继续向下匹配;为 `false` 则在首次命中后停止。"
          },
          "routing_mode": {
            "type": "string",
            "enum": [
              "standard",
              "name_mapping"
            ],
            "description": "路由模式。`standard`（默认，留空时亦按此处理）按固定的协作空间 ID 路由；`name_mapping` 通过读取告警事件中某个标签的值来动态匹配协作空间名称。"
          },
          "name_mapping_label": {
            "type": "string",
            "description": "用作目标协作空间名的标签键。当 `routing_mode` 为 `name_mapping` 时必填。"
          }
        }
      },
      "RouteSection": {
        "type": "object",
        "description": "用于将连续的多个 case 在视觉上分组的逻辑分区。",
        "required": [
          "name",
          "position"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "分区名称,在同一规则内必须唯一。"
          },
          "position": {
            "type": "integer",
            "description": "分区在 `cases` 中的起始下标,取值范围为 0 到 `cases` 长度。"
          }
        }
      },
      "RouteDefault": {
        "type": "object",
        "description": "默认分支。当所有 case 均未命中(或命中的 case 没有有效协作空间)时使用。",
        "properties": {
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "兜底使用的协作空间 ID 列表。"
          }
        }
      },
      "RouteItem": {
        "type": "object",
        "description": "集成的路由规则。告警按 `cases` 顺序依次匹配，未命中的将进入 `default` 分支。当集成未配置规则时返回 `null`。",
        "required": [
          "version",
          "updated_by",
          "creator_id"
        ],
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属集成 ID。"
          },
          "cases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteCase"
            },
            "description": "有序的 case 分支列表。"
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteSection"
            },
            "description": "可选的分区,用于将多个 case 进行视觉分组。"
          },
          "default": {
            "$ref": "#/components/schemas/RouteDefault"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "deleted"
            ],
            "description": "规则状态。"
          },
          "version": {
            "type": "integer",
            "format": "int64",
            "description": "单调递增的版本号,每次更新加 1,可用于乐观并发控制。"
          },
          "updated_by": {
            "type": "integer",
            "format": "int64",
            "description": "最后一次修改人员 ID。"
          },
          "creator_id": {
            "type": "integer",
            "format": "int64",
            "description": "创建人员 ID。"
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64",
            "description": "软删除时间戳（Unix 秒）。规则有效时不返回此字段。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间,Unix 秒级时间戳。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最后更新时间,Unix 秒级时间戳。"
          }
        }
      },
      "RouteInfoRequest": {
        "type": "object",
        "description": "查询单个集成路由规则所需的参数。",
        "required": [
          "integration_id"
        ],
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "集成 ID,必须大于 0。"
          }
        }
      },
      "ListRoutesRequest": {
        "type": "object",
        "description": "批量查询多个集成路由规则所需的参数。",
        "required": [
          "integration_ids"
        ],
        "properties": {
          "integration_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "需要查询路由规则的集成 ID 列表。"
          }
        }
      },
      "ListRoutesResponse": {
        "type": "object",
        "description": "路由规则列表的响应包装。",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteItem"
            },
            "description": "已请求集成的路由规则列表。未配置规则的集成不会出现在结果中。"
          }
        }
      },
      "UpsertRouteRequest": {
        "type": "object",
        "description": "创建或更新集成路由规则的参数。当指定集成尚无规则时执行创建,否则覆盖原有规则。`cases` 与 `default` 至少需要提供其一。",
        "required": [
          "integration_id"
        ],
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属集成 ID。"
          },
          "cases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteCase"
            },
            "description": "有序的 case 分支列表,自上而下依次匹配。"
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteSection"
            },
            "description": "可选的分区,用于将连续的 case 进行视觉分组。"
          },
          "default": {
            "$ref": "#/components/schemas/RouteDefault"
          },
          "version": {
            "type": "integer",
            "format": "int64",
            "description": "用于乐观并发控制的当前版本号,传入最近一次读取时返回的值。"
          }
        }
      },
      "AlertListRequest": {
        "type": "object",
        "description": "告警列表查询的过滤和分页条件，时间范围必填。",
        "required": [
          "start_time",
          "end_time"
        ],
        "properties": {
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "检索窗口开始时间，Unix 时间戳（秒）。"
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "检索窗口结束时间，Unix 时间戳（秒）。最大跨度 31 天。"
          },
          "p": {
            "type": "integer",
            "format": "int64",
            "description": "页码，从 1 开始。未提供 `search_after_ctx` 时使用。"
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "description": "每页条数，最大 100，默认 20。"
          },
          "search_after_ctx": {
            "type": "string",
            "description": "上次响应返回的不透明游标，用于获取下一页。"
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "过滤活跃（true）或已恢复（false）状态告警。"
          },
          "ever_muted": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "按告警是否曾被静默过滤。"
          },
          "alert_severity": {
            "type": "string",
            "description": "逗号分隔的严重程度过滤，如 `Critical,Warning`。可选值：`Critical`、`Warning`、`Info`、`Ok`。"
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "按协作空间 ID 过滤。"
          },
          "integration_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "按集成 ID 过滤。"
          },
          "alert_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "按告警 ID（ObjectID 十六进制字符串）过滤。"
          },
          "alert_keys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "按告警去重键过滤。"
          },
          "orderby": {
            "type": "string",
            "enum": [
              "created_at",
              "updated_at"
            ],
            "description": "排序字段。"
          },
          "asc": {
            "type": "boolean",
            "description": "为 true 时升序排序，默认降序。"
          },
          "by_updated_at": {
            "type": "boolean",
            "description": "为 true 时，时间范围过滤作用于 `updated_at` 而非 `start_time`。"
          }
        }
      },
      "AlertItem": {
        "type": "object",
        "description": "包含完整详情的单条告警。",
        "properties": {
          "alert_id": {
            "type": "string",
            "description": "告警唯一 ID（ObjectID 十六进制字符串）。"
          },
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "产生该告警的集成 ID。"
          },
          "data_source_id": {
            "type": "integer",
            "format": "int64",
            "description": "已废弃，请使用 `integration_id`。 Deprecated: use `integration_id` instead.",
            "deprecated": true
          },
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "告警所属协作空间 ID。"
          },
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "账户 ID。"
          },
          "title": {
            "type": "string",
            "description": "告警标题。"
          },
          "title_rule": {
            "type": "string",
            "description": "用于从事件标签派生 `title` 的标题模板（如 `$service::$cluster`）。"
          },
          "description": {
            "type": "string",
            "description": "告警描述。"
          },
          "alert_severity": {
            "type": "string",
            "enum": [
              "Critical",
              "Warning",
              "Info",
              "Ok"
            ],
            "description": "当前严重程度。"
          },
          "alert_status": {
            "type": "string",
            "enum": [
              "Critical",
              "Warning",
              "Info",
              "Ok"
            ],
            "description": "当前状态。"
          },
          "alert_key": {
            "type": "string",
            "description": "去重键。"
          },
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "首次触发时间，Unix 时间戳（秒）。"
          },
          "last_time": {
            "type": "integer",
            "format": "int64",
            "description": "最后事件时间，Unix 时间戳（秒）。"
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "恢复时间，Unix 时间戳（秒）。活跃时为 0。"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "标签键值对。"
          },
          "ever_muted": {
            "type": "boolean",
            "description": "是否曾被静默。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间，Unix 时间戳（秒）。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最后更新时间，Unix 时间戳（秒）。"
          },
          "integration_name": {
            "type": "string",
            "description": "集成显示名称。"
          },
          "integration_type": {
            "type": "string",
            "description": "集成类型/插件键。"
          },
          "integration_ref_id": {
            "type": "string",
            "description": "集成外部参考 ID。"
          },
          "channel_name": {
            "type": "string",
            "description": "协作空间显示名称。"
          },
          "channel_status": {
            "type": "string",
            "description": "协作空间状态（如 `enabled`、`disabled`）。"
          },
          "responder_name": {
            "type": "string",
            "description": "当前处理人姓名（来自关联故障）。"
          },
          "responder_email": {
            "type": "string",
            "description": "当前处理人邮箱（来自关联故障）。"
          },
          "event_cnt": {
            "type": "integer",
            "format": "int64",
            "description": "该告警收到的原始事件总数。"
          },
          "incident": {
            "$ref": "#/components/schemas/IncidentShort",
            "description": "关联故障（如有）。"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertEventItem"
            },
            "description": "附加到该告警的最近原始事件，仅部分接口返回。"
          },
          "images": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertImage"
            },
            "description": "告警附加的图片。"
          },
          "data_source_name": {
            "type": "string",
            "description": "已废弃，请使用 `integration_name`。"
          },
          "data_source_type": {
            "type": "string",
            "description": "已废弃，请使用 `integration_type`。"
          },
          "data_source_ref_id": {
            "type": "string",
            "description": "已废弃，请使用 `integration_ref_id`。"
          }
        }
      },
      "AlertImage": {
        "type": "object",
        "description": "告警或事件的图片附件。",
        "required": [
          "src"
        ],
        "properties": {
          "href": {
            "type": "string",
            "description": "点击图片时的跳转链接（可选）。"
          },
          "src": {
            "type": "string",
            "description": "图片源地址或内部引用（以 `img_` 或 `http` 开头）。"
          },
          "alt": {
            "type": "string",
            "description": "替代文本。"
          }
        }
      },
      "AlertListResponse": {
        "type": "object",
        "description": "分页的告警列表。",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "符合条件的告警总数。"
          },
          "has_next_page": {
            "type": "boolean",
            "description": "是否有更多页。"
          },
          "search_after_ctx": {
            "type": "string",
            "description": "下一页的游标。"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertItem"
            }
          }
        }
      },
      "AlertInfoRequest": {
        "type": "object",
        "required": [
          "alert_id"
        ],
        "properties": {
          "alert_id": {
            "type": "string",
            "description": "告警 ID（ObjectID 十六进制字符串）。"
          }
        }
      },
      "AlertListByIDsRequest": {
        "type": "object",
        "required": [
          "alert_ids"
        ],
        "properties": {
          "alert_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "告警 ID 列表（十六进制字符串）。"
          }
        }
      },
      "AlertEventListRequest": {
        "type": "object",
        "required": [
          "alert_id"
        ],
        "properties": {
          "alert_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "告警 ID（MongoDB ObjectID）。"
          },
          "asc": {
            "type": "boolean",
            "default": false,
            "description": "为 true 时按最早事件优先返回；默认按最新事件优先返回。"
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 100,
            "default": 20,
            "description": "分页大小，默认 20，最大 100。"
          },
          "p": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "default": 1,
            "description": "页码，从 1 开始；未传 `search_after_ctx` 时生效。"
          },
          "search_after_ctx": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "上一页响应返回的游标；传入后使用游标分页而非页码分页。"
          }
        }
      },
      "AlertEventListResponse": {
        "type": "object",
        "required": [
          "items",
          "total",
          "has_next_page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertEventItem"
            },
            "description": "按请求顺序返回的原始告警事件。"
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "命中的事件总数。"
          },
          "has_next_page": {
            "type": "boolean",
            "description": "是否还有下一页。"
          },
          "search_after_ctx": {
            "type": "string",
            "description": "下一页请求可作为 `search_after_ctx` 传入的游标。"
          }
        }
      },
      "AlertFeedRequest": {
        "type": "object",
        "required": [
          "alert_id"
        ],
        "properties": {
          "alert_id": {
            "type": "string",
            "description": "告警 ID。"
          },
          "p": {
            "type": "integer",
            "format": "int64",
            "description": "页码，从 1 开始。",
            "default": 1
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "description": "每页条数，最大 100，默认 20。"
          },
          "asc": {
            "type": "boolean",
            "description": "升序排序。"
          },
          "types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "按动态类型过滤。"
          }
        }
      },
      "AlertFeedType": {
        "type": "string",
        "description": "告警动态记录类型。每个值标识一个告警生命周期事件；`detail` 的具体结构由该字段决定。\n\n| 类型 | 含义 |\n|---|---|\n| `a_new` | 告警触发。 |\n| `a_comm` | 在告警上添加了评论。 |\n| `a_close` | 告警关闭。 |",
        "enum": [
          "a_new",
          "a_comm",
          "a_close"
        ]
      },
      "FeedDetailAlertTrigger": {
        "type": "object",
        "description": "`a_new` 的详情数据。",
        "properties": {
          "severity": {
            "$ref": "#/components/schemas/FeedSeverity"
          },
          "status": {
            "$ref": "#/components/schemas/FeedSeverity"
          }
        },
        "title": "a_new"
      },
      "FeedDetailAlertComment": {
        "type": "object",
        "description": "`a_comm` 的详情数据。",
        "properties": {
          "comment": {
            "type": "string",
            "description": "评论内容。"
          }
        },
        "title": "a_comm"
      },
      "FeedDetailAlertClose": {
        "type": "object",
        "description": "`a_close` 的详情数据，无字段。",
        "properties": {},
        "additionalProperties": false,
        "title": "a_close"
      },
      "FeedItem": {
        "type": "object",
        "description": "单条告警动态记录。`detail` 字段依 `type` 判别；具体结构参见各 `FeedDetailAlert*` schema。",
        "required": [
          "ref_id",
          "type",
          "detail",
          "account_id",
          "creator_id",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "ref_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "本条记录引用的告警 ObjectID。"
          },
          "type": {
            "$ref": "#/components/schemas/AlertFeedType"
          },
          "detail": {
            "description": "类型特定的详情数据，结构依 `type` 而定。",
            "oneOf": [
              {
                "$ref": "#/components/schemas/FeedDetailAlertTrigger"
              },
              {
                "$ref": "#/components/schemas/FeedDetailAlertComment"
              },
              {
                "$ref": "#/components/schemas/FeedDetailAlertClose"
              }
            ],
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "a_new": "#/components/schemas/FeedDetailAlertTrigger",
                "a_comm": "#/components/schemas/FeedDetailAlertComment",
                "a_close": "#/components/schemas/FeedDetailAlertClose"
              }
            }
          },
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "账户 ID。"
          },
          "creator_id": {
            "type": "integer",
            "format": "int64",
            "description": "创建者成员 ID。系统生成的记录为 0。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间，Unix 毫秒时间戳。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最后更新时间，Unix 毫秒时间戳。"
          }
        }
      },
      "AlertFeedResponse": {
        "type": "object",
        "properties": {
          "has_next_page": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeedItem"
            }
          }
        }
      },
      "AlertMergeRequest": {
        "type": "object",
        "required": [
          "alert_ids",
          "incident_id"
        ],
        "properties": {
          "alert_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "要合并的告警 ID 列表。"
          },
          "incident_id": {
            "type": "string",
            "description": "目标故障 ID。"
          },
          "comment": {
            "type": "string",
            "description": "合并操作的可选评论。"
          },
          "title": {
            "type": "string",
            "description": "目标故障的可选新标题。"
          },
          "owner_id": {
            "type": "integer",
            "format": "int64",
            "description": "目标故障的可选新负责人。"
          }
        }
      },
      "AlertPipelineInfoRequest": {
        "type": "object",
        "required": [
          "integration_id"
        ],
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "集成 ID。"
          }
        }
      },
      "AlertPipeline": {
        "type": "object",
        "description": "单条告警处理规则。",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "title_reset",
              "description_reset",
              "severity_reset",
              "alert_drop",
              "alert_inhibit"
            ],
            "description": "规则类型。"
          },
          "if": {
            "$ref": "#/components/schemas/OrFilterGroup",
            "description": "可选的过滤条件，省略时对所有告警生效。"
          },
          "settings": {
            "type": "object",
            "description": "与 `kind` 对应的配置。取值结构因 `kind` 而异：\n- `title_reset`：`{ \"title\": \"<模板字符串>\" }`\n- `description_reset`：`{ \"description\": \"<模板字符串>\" }`\n- `severity_reset`：`{ \"severity\": \"Critical\"|\"Warning\"|\"Info\" }`\n- `alert_drop`：`{}` (空对象)\n- `alert_inhibit`：`{ \"equals\": [\"<标签键>\", ...], \"source_filters\": <OrFilterGroup> }`",
            "oneOf": [
              {
                "$ref": "#/components/schemas/ApTitleReset"
              },
              {
                "$ref": "#/components/schemas/ApDescriptionReset"
              },
              {
                "$ref": "#/components/schemas/ApSeverityReset"
              },
              {
                "$ref": "#/components/schemas/ApAlertDrop"
              },
              {
                "$ref": "#/components/schemas/ApAlertInhibit"
              }
            ]
          }
        }
      },
      "AlertPipelineItem": {
        "type": "object",
        "description": "集成的告警处理规则配置。",
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "该处理规则所属的集成 ID。"
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertPipeline"
            },
            "description": "有序的处理规则列表。"
          },
          "status": {
            "type": "string",
            "description": "规则状态（如 `active`）。"
          },
          "creator_id": {
            "type": "integer",
            "format": "int64",
            "description": "创建规则的成员 ID。"
          },
          "updated_by": {
            "type": "integer",
            "format": "int64",
            "description": "最后更新规则的成员 ID。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间，Unix 时间戳（秒）。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最后更新时间，Unix 时间戳（秒）。"
          }
        }
      },
      "AlertPipelineListRequest": {
        "type": "object",
        "required": [
          "integration_ids"
        ],
        "properties": {
          "integration_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "集成 ID 列表。"
          }
        }
      },
      "AlertPipelineListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertPipelineItem"
            }
          }
        }
      },
      "AlertPipelineUpsertRequest": {
        "type": "object",
        "required": [
          "integration_id",
          "rules"
        ],
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "要配置的集成 ID。"
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertPipeline"
            },
            "description": "处理规则列表，最多 50 条。",
            "maxItems": 50
          }
        }
      },
      "AlertEventGlobalListRequest": {
        "type": "object",
        "description": "全局原始事件列表的过滤和分页条件。",
        "properties": {
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "检索窗口开始时间，Unix 时间戳（秒）。"
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "检索窗口结束时间，Unix 时间戳（秒）。"
          },
          "p": {
            "type": "integer",
            "format": "int64",
            "description": "页码，从 1 开始。未提供 `search_after_ctx` 时使用。"
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "description": "每页条数，最大 100，默认 20。"
          },
          "search_after_ctx": {
            "type": "string",
            "description": "下一页的不透明游标。"
          },
          "integration_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "按集成 ID 过滤。"
          },
          "integration_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "按集成类型（插件键）过滤。"
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "按协作空间 ID 过滤，最多 100 个。"
          },
          "severities": {
            "type": "string",
            "description": "逗号分隔的严重程度过滤，如 `Critical,Warning`。"
          },
          "orderby": {
            "type": "string",
            "description": "排序字段（ES 字段名）。",
            "enum": [
              "event_time"
            ]
          },
          "asc": {
            "type": "boolean",
            "description": "为 true 时升序排序。"
          }
        }
      },
      "AlertEventGlobalListResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64"
          },
          "has_next_page": {
            "type": "boolean"
          },
          "search_after_ctx": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertEventItem"
            }
          }
        }
      },
      "ApTitleReset": {
        "type": "object",
        "description": "`title_reset` 规则的配置：使用模板字符串覆盖告警标题。",
        "required": [
          "title"
        ],
        "properties": {
          "title": {
            "type": "string",
            "description": "新标题模板，支持引用告警字段的 Golang 模板语法。"
          }
        }
      },
      "ApDescriptionReset": {
        "type": "object",
        "description": "`description_reset` 规则的配置：使用模板字符串覆盖告警描述。",
        "required": [
          "description"
        ],
        "properties": {
          "description": {
            "type": "string",
            "description": "新描述模板。"
          }
        }
      },
      "ApSeverityReset": {
        "type": "object",
        "description": "`severity_reset` 规则的配置：将告警严重程度强制设置为固定值。",
        "required": [
          "severity"
        ],
        "properties": {
          "severity": {
            "type": "string",
            "enum": [
              "Critical",
              "Warning",
              "Info"
            ],
            "description": "目标严重程度级别。"
          }
        }
      },
      "ApAlertDrop": {
        "type": "object",
        "description": "`alert_drop` 规则的配置：无需额外配置，匹配的告警将被静默丢弃。",
        "properties": {}
      },
      "ApAlertInhibit": {
        "type": "object",
        "description": "`alert_inhibit` 规则的配置：当来源告警与当前告警共享相同标签值时，抑制匹配过滤条件的来源告警。",
        "required": [
          "equals",
          "source_filters"
        ],
        "properties": {
          "equals": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "需要在来源告警与当前告警之间值相等的标签键列表。"
          },
          "source_filters": {
            "$ref": "#/components/schemas/OrFilterGroup",
            "description": "用于匹配待抑制来源告警的过滤条件。"
          }
        }
      },
      "ListWebhookHistoryRequest": {
        "type": "object",
        "description": "出站 Webhook 推送历史的筛选参数。查询必须指定毫秒级的时间窗口；使用 `search_after_ctx` 进行游标分页。",
        "required": [
          "limit",
          "start_time",
          "end_time"
        ],
        "properties": {
          "search_after_ctx": {
            "type": "string",
            "description": "上一次调用返回的不透明游标，用于获取下一页。"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "每页数量。"
          },
          "asc": {
            "type": "boolean",
            "description": "为 true 时按 `event_time` 升序排序，否则降序。"
          },
          "orderby": {
            "type": "string",
            "enum": [
              "event_time"
            ],
            "description": "排序字段，目前仅支持 `event_time`。"
          },
          "ref_id": {
            "type": "string",
            "maxLength": 128,
            "description": "按引用 ID 过滤（故障或告警 ID）。"
          },
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "按集成 ID 过滤。"
          },
          "event_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "按事件类型过滤。"
          },
          "status": {
            "type": "string",
            "enum": [
              "success",
              "failed"
            ],
            "description": "按投递状态过滤。"
          },
          "start_time": {
            "type": "integer",
            "format": "int64",
            "minimum": 1000000000000,
            "maximum": 9999999999999,
            "description": "时间窗口起始时间（Unix 毫秒）。"
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "minimum": 1000000000000,
            "maximum": 9999999999999,
            "description": "时间窗口结束时间（Unix 毫秒），必须大于 `start_time`。"
          }
        }
      },
      "ListWebhookHistoryResponse": {
        "type": "object",
        "description": "分页的 Webhook 推送历史。",
        "required": [
          "items",
          "total",
          "search_after_ctx"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookHistoryItem"
            }
          },
          "total": {
            "type": "integer",
            "description": "匹配记录总数。"
          },
          "search_after_ctx": {
            "type": "string",
            "description": "下一页游标，传入下次请求的 `search_after_ctx`。无更多数据时为空。"
          }
        }
      },
      "WebhookHistoryItem": {
        "type": "object",
        "description": "一次 Webhook 投递记录。带 `omitempty` 的字段在取零值时会被省略。",
        "required": [
          "integration_id",
          "event_id",
          "webhook_type",
          "event_type",
          "endpoint",
          "attempt",
          "duration",
          "status",
          "status_code",
          "event_time"
        ],
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "触发 Webhook 的集成 ID。"
          },
          "event_id": {
            "type": "string",
            "description": "本次投递的唯一事件 ID。"
          },
          "webhook_type": {
            "type": "string",
            "description": "来源对象类型：`incident` 或 `alert`。"
          },
          "event_type": {
            "type": "string",
            "description": "事件类型（如 `created`、`acknowledged`、`closed`）。"
          },
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "事件所属协作空间 ID（若有）。"
          },
          "ref_id": {
            "type": "string",
            "description": "来源对象 ID（故障或告警 ID）。"
          },
          "request_headers": {
            "type": "string",
            "description": "序列化的出站请求头。"
          },
          "request_body": {
            "type": "string",
            "description": "出站请求体。"
          },
          "endpoint": {
            "type": "string",
            "description": "目标地址。"
          },
          "attempt": {
            "type": "integer",
            "description": "尝试次数。"
          },
          "duration": {
            "type": "integer",
            "description": "整次尝试耗时（毫秒）。"
          },
          "status": {
            "type": "string",
            "enum": [
              "success",
              "failed"
            ],
            "description": "投递结果。"
          },
          "status_code": {
            "type": "integer",
            "description": "目标返回的 HTTP 状态码。"
          },
          "error_message": {
            "type": "string",
            "description": "投递失败时的错误信息。"
          },
          "response_headers": {
            "type": "string",
            "description": "序列化的响应头。"
          },
          "response_body": {
            "type": "string",
            "description": "目标返回的响应体。"
          },
          "event_time": {
            "type": "string",
            "description": "事件时间的格式化时间串。"
          }
        }
      },
      "GetWebhookHistoryDetailRequest": {
        "type": "object",
        "description": "获取单条 Webhook 推送详情的参数。",
        "required": [
          "event_id",
          "integration_id"
        ],
        "properties": {
          "event_id": {
            "type": "string",
            "description": "由 `ListWebhookHistory` 返回的事件 ID。"
          },
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "description": "事件所属的集成 ID。"
          }
        }
      },
      "WebhookHistoryDetail": {
        "type": "object",
        "description": "Webhook 推送的完整详情。相较 `WebhookHistoryItem`，额外附带查询时解析出的引用元信息。",
        "required": [
          "integration_id",
          "event_id",
          "webhook_type",
          "event_type",
          "endpoint",
          "attempt",
          "duration",
          "status",
          "status_code",
          "event_time"
        ],
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "集成 ID。"
          },
          "event_id": {
            "type": "string",
            "description": "事件 ID。"
          },
          "webhook_type": {
            "type": "string",
            "description": "来源对象类型：`incident` 或 `alert`。"
          },
          "event_type": {
            "type": "string",
            "description": "事件类型。"
          },
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "协作空间 ID（若有）。"
          },
          "ref_id": {
            "type": "string",
            "description": "来源对象 ID。"
          },
          "request_headers": {
            "type": "string",
            "description": "序列化的出站请求头。"
          },
          "request_body": {
            "type": "string",
            "description": "出站请求体。"
          },
          "endpoint": {
            "type": "string",
            "description": "目标地址。"
          },
          "attempt": {
            "type": "integer",
            "description": "尝试次数。"
          },
          "duration": {
            "type": "integer",
            "description": "整次尝试耗时（毫秒）。"
          },
          "status": {
            "type": "string",
            "enum": [
              "success",
              "failed"
            ],
            "description": "投递结果。"
          },
          "status_code": {
            "type": "integer",
            "description": "HTTP 状态码。"
          },
          "error_message": {
            "type": "string",
            "description": "投递失败时的错误信息。"
          },
          "response_headers": {
            "type": "string",
            "description": "序列化的响应头。"
          },
          "response_body": {
            "type": "string",
            "description": "响应体。"
          },
          "event_time": {
            "type": "string",
            "description": "事件时间的格式化时间串。"
          },
          "ref_title": {
            "type": "string",
            "description": "查询时解析出的来源故障或告警标题。"
          },
          "channel_name": {
            "type": "string",
            "description": "查询时解析出的关联协作空间名称。"
          }
        }
      },
      "ScheduleEmptyObject": {
        "type": "object",
        "description": "空响应。",
        "properties": {}
      },
      "ScheduleSelfRequest": {
        "type": "object",
        "description": "查询当前用户值班表的参数。start 和 end 为 Unix 时间戳（秒），缺省时默认为 0。时间窗口不得超过 30 天。",
        "properties": {
          "start": {
            "type": "integer",
            "format": "int64",
            "description": "时间窗口开始时间（Unix 秒，10 位）。"
          },
          "end": {
            "type": "integer",
            "format": "int64",
            "description": "时间窗口结束时间（Unix 秒，10 位），与 start 的差值不得超过 30 天。"
          }
        }
      },
      "ScheduleIDResponse": {
        "type": "object",
        "description": "创建值班表后返回的 ID 响应。",
        "required": [
          "schedule_id"
        ],
        "properties": {
          "schedule_id": {
            "type": "integer",
            "format": "int64",
            "description": "新建值班表的 ID。"
          }
        }
      },
      "ScheduleIDsBodyRequest": {
        "type": "object",
        "description": "携带值班表 ID 列表的请求体（删除/启用/禁用使用）。",
        "required": [
          "schedule_ids"
        ],
        "properties": {
          "schedule_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "要操作的值班表 ID 列表。"
          }
        }
      },
      "ScheduleIDsRequest": {
        "type": "object",
        "description": "批量查询值班表使用的请求体。",
        "required": [
          "schedule_ids"
        ],
        "properties": {
          "schedule_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "值班表 ID 列表。"
          }
        }
      },
      "ScheduleInfoRequest": {
        "type": "object",
        "description": "值班表详情请求。start/end 指定计算值班分层的时间窗口，跨度必须小于 45 天。",
        "required": [
          "schedule_id",
          "start",
          "end"
        ],
        "properties": {
          "schedule_id": {
            "type": "integer",
            "format": "int64",
            "description": "值班表 ID。"
          },
          "start": {
            "type": "integer",
            "format": "int64",
            "description": "窗口开始时间（Unix 秒，10 位）。"
          },
          "end": {
            "type": "integer",
            "format": "int64",
            "description": "窗口结束时间（Unix 秒，10 位）。"
          }
        }
      },
      "ScheduleMember": {
        "type": "object",
        "description": "值班组内成员条目。",
        "required": [
          "role_id",
          "person_ids"
        ],
        "properties": {
          "role_id": {
            "type": "integer",
            "format": "int64",
            "description": "值班角色 ID。"
          },
          "person_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "该角色下的用户 ID 列表。"
          }
        }
      },
      "ScheduleGroup": {
        "type": "object",
        "description": "值班分层内的值班组。",
        "required": [
          "group_name",
          "name",
          "members",
          "start",
          "end"
        ],
        "properties": {
          "group_name": {
            "type": "string",
            "description": "值班组显示名称。"
          },
          "name": {
            "type": "string",
            "description": "值班组内部名称。"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleMember"
            },
            "description": "值班组成员。"
          },
          "start": {
            "type": "integer",
            "format": "int64",
            "description": "值班组开始时间（Unix 秒）。"
          },
          "end": {
            "type": "integer",
            "format": "int64",
            "description": "值班组结束时间（Unix 秒）。"
          }
        }
      },
      "ScheduleRestrictPeriod": {
        "type": "object",
        "description": "单个值班周期内的限制区间。",
        "required": [
          "restrict_start",
          "restrict_end"
        ],
        "properties": {
          "restrict_start": {
            "type": "integer",
            "format": "int64",
            "description": "限制区间开始偏移。"
          },
          "restrict_end": {
            "type": "integer",
            "format": "int64",
            "description": "限制区间结束偏移。"
          }
        }
      },
      "ScheduleDayMask": {
        "type": "object",
        "description": "按星期几生效的掩码配置。",
        "properties": {
          "repeat": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "生效的星期几（0 = 周日）。"
          }
        }
      },
      "ScheduleLayer": {
        "type": "object",
        "description": "值班表中的单个分层。",
        "required": [
          "account_id",
          "name",
          "schedule_id",
          "hidden",
          "mode",
          "weight",
          "groups",
          "rotation_duration",
          "handoff_time",
          "enable_time",
          "expire_time",
          "restrict_mode",
          "restrict_start",
          "restrict_end",
          "restrict_periods",
          "day_mask",
          "create_at",
          "create_by",
          "update_at",
          "update_by",
          "fair_rotation",
          "rotation_unit",
          "rotation_value",
          "mask_continuous_enabled"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "账户 ID。"
          },
          "name": {
            "type": "string",
            "description": "分层内部名称。"
          },
          "schedule_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属值班表 ID。"
          },
          "hidden": {
            "type": "integer",
            "description": "是否在页面上隐藏（0 = 否，1 = 是）。"
          },
          "mode": {
            "type": "integer",
            "description": "分层模式：0 = 普通轮转，1 = 覆盖。",
            "enum": [
              0,
              1
            ]
          },
          "weight": {
            "type": "integer",
            "description": "分层权重，用于排序。"
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleGroup"
            },
            "description": "参与轮转的值班组。"
          },
          "rotation_duration": {
            "type": "integer",
            "format": "int64",
            "description": "轮转周期（秒）。"
          },
          "handoff_time": {
            "type": "integer",
            "format": "int64",
            "description": "值班交接时间（秒）。"
          },
          "enable_time": {
            "type": "integer",
            "format": "int64",
            "description": "分层生效时间（Unix 秒）。"
          },
          "expire_time": {
            "type": "integer",
            "format": "int64",
            "description": "分层失效时间（Unix 秒，0 表示永不过期）。"
          },
          "restrict_mode": {
            "type": "integer",
            "description": "限制模式：0 = 不限制，1 = day，2 = week。",
            "enum": [
              0,
              1,
              2
            ]
          },
          "restrict_start": {
            "type": "integer",
            "format": "int64",
            "description": "旧版限制区间开始偏移（秒）。"
          },
          "restrict_end": {
            "type": "integer",
            "format": "int64",
            "description": "旧版限制区间结束偏移（秒）。"
          },
          "restrict_periods": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleRestrictPeriod"
            },
            "description": "每个值班周期内的限制区间集合。"
          },
          "day_mask": {
            "$ref": "#/components/schemas/ScheduleDayMask",
            "description": "星期掩码。"
          },
          "create_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间（Unix 秒）。"
          },
          "create_by": {
            "type": "integer",
            "format": "int64",
            "description": "创建人 ID。"
          },
          "update_at": {
            "type": "integer",
            "format": "int64",
            "description": "更新时间（Unix 秒）。"
          },
          "update_by": {
            "type": "integer",
            "format": "int64",
            "description": "更新人 ID。"
          },
          "layer_name": {
            "type": "string",
            "description": "分层显示名称。"
          },
          "fair_rotation": {
            "type": "boolean",
            "description": "是否启用公平轮转。"
          },
          "layer_start": {
            "type": "integer",
            "format": "int64",
            "description": "分层开始时间（Unix 秒）。"
          },
          "layer_end": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "分层结束时间（Unix 秒）。null 表示无结束时间。"
          },
          "rotation_unit": {
            "type": "string",
            "description": "轮转单位。",
            "enum": [
              "hour",
              "day",
              "week",
              "month"
            ]
          },
          "rotation_value": {
            "type": "integer",
            "format": "int64",
            "description": "轮转数量（每周期的 rotation_unit 个数）。"
          },
          "mask_continuous_enabled": {
            "type": "boolean",
            "description": "是否启用连续掩码。"
          }
        }
      },
      "ScheduleImNotifySettings": {
        "type": "object",
        "description": "IM Webhook 通知通道配置。",
        "required": [
          "token",
          "alias",
          "data_source_id",
          "chat_ids",
          "verify_token",
          "sign_secret"
        ],
        "properties": {
          "token": {
            "type": "string",
            "description": "Webhook token。"
          },
          "alias": {
            "type": "string",
            "description": "通道别名。"
          },
          "data_source_id": {
            "type": "integer",
            "format": "int64",
            "description": "数据源 ID。"
          },
          "chat_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "会话 ID 列表。"
          },
          "verify_token": {
            "type": "string",
            "description": "验签 token。"
          },
          "sign_secret": {
            "type": "string",
            "description": "签名密钥。"
          }
        }
      },
      "ScheduleImNotify": {
        "type": "object",
        "description": "IM Webhook 通知条目。",
        "required": [
          "type",
          "settings"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "IM 提供方类型（如 feishu_app、dingtalk_app、wecom_app、teams_app、slack_app）。"
          },
          "settings": {
            "$ref": "#/components/schemas/ScheduleImNotifySettings"
          }
        }
      },
      "ScheduleFixedTimeNotifyInfo": {
        "type": "object",
        "description": "固定时间通知配置。",
        "required": [
          "cycle",
          "start"
        ],
        "properties": {
          "cycle": {
            "type": "string",
            "description": "通知周期。"
          },
          "start": {
            "type": "string",
            "description": "周期内的通知开始时间。"
          }
        }
      },
      "ScheduleNotifyBy": {
        "type": "object",
        "description": "接收人的通知偏好。",
        "required": [
          "follow_preference",
          "personal_channels"
        ],
        "properties": {
          "follow_preference": {
            "type": "boolean",
            "description": "是否跟随个人通知偏好。"
          },
          "personal_channels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "个人通知通道列表。"
          }
        }
      },
      "ScheduleNotify": {
        "type": "object",
        "description": "值班表的通知配置。",
        "required": [
          "fixed_time",
          "by",
          "webhooks"
        ],
        "properties": {
          "advance_in_time": {
            "type": "integer",
            "format": "int64",
            "description": "提前通知时间（秒）。"
          },
          "fixed_time": {
            "$ref": "#/components/schemas/ScheduleFixedTimeNotifyInfo"
          },
          "by": {
            "$ref": "#/components/schemas/ScheduleNotifyBy"
          },
          "im": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "旧版 IM 类型到 token 的映射。"
          },
          "webhooks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleImNotify"
            },
            "description": "IM Webhook 通知通道。"
          }
        }
      },
      "ScheduleCalculatedSchedule": {
        "type": "object",
        "description": "分层内计算出的值班时段。",
        "required": [
          "start",
          "end",
          "group",
          "index"
        ],
        "properties": {
          "start": {
            "type": "integer",
            "format": "int64",
            "description": "时段开始时间（Unix 秒）。"
          },
          "end": {
            "type": "integer",
            "format": "int64",
            "description": "时段结束时间（Unix 秒）。"
          },
          "group": {
            "$ref": "#/components/schemas/ScheduleGroup"
          },
          "index": {
            "type": "integer",
            "description": "轮转内索引。"
          }
        }
      },
      "ScheduleCalculatedLayer": {
        "type": "object",
        "description": "单个分层的计算结果。",
        "required": [
          "layer_name",
          "name",
          "mode",
          "schedules"
        ],
        "properties": {
          "layer_name": {
            "type": "string",
            "description": "分层显示名称。"
          },
          "name": {
            "type": "string",
            "description": "分层内部名称。"
          },
          "mode": {
            "type": "integer",
            "description": "分层模式：0 = 普通轮转，1 = 覆盖。"
          },
          "schedules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleCalculatedSchedule"
            },
            "description": "计算出的值班时段。"
          }
        }
      },
      "ScheduleOncallGroup": {
        "type": "object",
        "description": "当前或下一次值班组快照。",
        "required": [
          "start",
          "end",
          "group",
          "update_at",
          "weight",
          "index"
        ],
        "properties": {
          "start": {
            "type": "integer",
            "format": "int64",
            "description": "时段开始时间（Unix 秒）。"
          },
          "end": {
            "type": "integer",
            "format": "int64",
            "description": "时段结束时间（Unix 秒）。"
          },
          "group": {
            "$ref": "#/components/schemas/ScheduleGroup"
          },
          "update_at": {
            "type": "integer",
            "format": "int64",
            "description": "更新时间（Unix 秒）。"
          },
          "weight": {
            "type": "integer",
            "description": "来源分层权重。"
          },
          "index": {
            "type": "integer",
            "description": "轮转内索引。"
          }
        }
      },
      "ScheduleItem": {
        "type": "object",
        "description": "/schedule/info、/schedule/preview、/schedule/list 返回的完整值班表详情。",
        "required": [
          "id",
          "name",
          "account_id",
          "group_id",
          "disabled",
          "create_at",
          "create_by",
          "update_at",
          "update_by",
          "layers",
          "schedule_layers",
          "final_schedule",
          "notify",
          "schedule_id",
          "schedule_name",
          "team_id",
          "description",
          "layer_schedules",
          "status",
          "cur_oncall",
          "next_oncall"
        ],
        "properties": {
          "id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "值班表 ID。/schedule/preview 返回时为 null。"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "旧版值班表名称字段（与 schedule_name 同义）。/schedule/preview 返回时为 null。"
          },
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "账户 ID。"
          },
          "group_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "旧版团队/组 ID。/schedule/preview 返回时为 null。"
          },
          "disabled": {
            "type": [
              "integer",
              "null"
            ],
            "description": "禁用标记（0 = 启用，1 = 禁用），已废弃。/schedule/preview 返回时为 null。"
          },
          "create_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间（Unix 秒）。"
          },
          "create_by": {
            "type": "integer",
            "format": "int64",
            "description": "创建人 ID。"
          },
          "update_at": {
            "type": "integer",
            "format": "int64",
            "description": "更新时间（Unix 秒）。"
          },
          "update_by": {
            "type": "integer",
            "format": "int64",
            "description": "更新人 ID。"
          },
          "layers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleLayer"
            },
            "description": "值班表的轮转分层。"
          },
          "field": {
            "type": "string",
            "description": "旧版字段更新接口使用的字段名。"
          },
          "schedule_layers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleCalculatedLayer"
            },
            "description": "按窗口计算出的分层值班结果。"
          },
          "final_schedule": {
            "$ref": "#/components/schemas/ScheduleCalculatedLayer",
            "description": "所有分层合并后的最终值班结果。"
          },
          "start": {
            "type": "integer",
            "format": "int64",
            "description": "窗口开始时间（Unix 秒）。"
          },
          "end": {
            "type": "integer",
            "format": "int64",
            "description": "窗口结束时间（Unix 秒）。"
          },
          "notify": {
            "$ref": "#/components/schemas/ScheduleNotify"
          },
          "schedule_id": {
            "type": "integer",
            "format": "int64",
            "description": "值班表 ID。"
          },
          "schedule_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "值班表显示名称。/schedule/preview 返回时为 null。"
          },
          "team_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "所属团队 ID。/schedule/preview 返回时为 null。"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "值班表描述。/schedule/preview 返回时为 null。"
          },
          "layer_schedules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleCalculatedLayer"
            },
            "description": "与 schedule_layers 等价，用于旧版兼容。"
          },
          "status": {
            "type": [
              "integer",
              "null"
            ],
            "description": "旧版状态字段，已废弃。/schedule/preview 返回时为 null。"
          },
          "cur_oncall": {
            "$ref": "#/components/schemas/ScheduleOncallGroup",
            "description": "当前正在值班的组，无人值班时为 null。"
          },
          "next_oncall": {
            "$ref": "#/components/schemas/ScheduleOncallGroup",
            "description": "下一次值班的组，未知时为 null。"
          }
        }
      },
      "ScheduleUpsertRequest": {
        "type": "object",
        "description": "值班表创建/更新/预览共用的请求体，结构与值班表详情一致，此处仅列出常用字段。更新时需要 schedule_id；预览时 start、end 必填。",
        "properties": {
          "schedule_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "值班表 ID，更新时必填。"
          },
          "schedule_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "值班表显示名称，最长 40 字符。",
            "maxLength": 40
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "旧版名称字段，当 schedule_name 为空时使用。",
            "maxLength": 40
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "值班表描述，最长 500 字符。",
            "maxLength": 500
          },
          "team_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "所属团队 ID。"
          },
          "layers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleLayer"
            },
            "description": "轮转分层。"
          },
          "notify": {
            "$ref": "#/components/schemas/ScheduleNotify"
          },
          "start": {
            "type": "integer",
            "format": "int64",
            "description": "预览窗口开始时间（Unix 秒，10 位），/schedule/preview 必填。"
          },
          "end": {
            "type": "integer",
            "format": "int64",
            "description": "预览窗口结束时间（Unix 秒，10 位），/schedule/preview 必填，且距 start 不超过 45 天。"
          }
        }
      },
      "ScheduleListRequest": {
        "type": "object",
        "description": "值班表列表请求。limit 默认 10、最大 100，p 默认 1。is_my_team 与 is_my_manage 不能同时为 true。",
        "properties": {
          "query": {
            "type": "string",
            "description": "搜索关键字，匹配值班表名称。"
          },
          "p": {
            "type": "integer",
            "description": "页码（从 1 开始）。",
            "default": 1
          },
          "limit": {
            "type": "integer",
            "description": "每页条数，默认 10、最大 100。",
            "default": 10,
            "maximum": 100
          },
          "is_my_team": {
            "type": "boolean",
            "description": "仅返回当前用户所在团队的值班表。"
          },
          "is_my_manage": {
            "type": "boolean",
            "description": "仅返回当前用户在其团队内创建的值班表。"
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "按团队 ID 过滤。"
          },
          "start": {
            "type": "integer",
            "format": "int64",
            "description": "与 end 同时传入时，响应会包含计算后的分层值班结果；跨度必须小于 45 天。"
          },
          "end": {
            "type": "integer",
            "format": "int64",
            "description": "窗口结束时间（Unix 秒）。"
          }
        }
      },
      "ScheduleListResponse": {
        "type": "object",
        "description": "值班表列表响应。",
        "required": [
          "items",
          "total"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleItem"
            },
            "description": "当前页的值班表列表。"
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "符合过滤条件的总条数。"
          }
        }
      },
      "ScheduleSelfResponse": {
        "type": "object",
        "description": "/schedule/self 与 /schedule/infos 的响应，仅返回 items。",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleItem"
            },
            "description": "当前用户被分配到的值班表（或请求指定的 ID 对应的值班表）。"
          }
        }
      },
      "CalendarEmptyObject": {
        "type": "object",
        "description": "空响应体。",
        "properties": {}
      },
      "CalendarCreateRequest": {
        "type": "object",
        "description": "创建日历请求，cal_name 必填。",
        "required": [
          "cal_name"
        ],
        "properties": {
          "cal_name": {
            "type": "string",
            "description": "日历显示名称。",
            "minLength": 1,
            "maxLength": 39
          },
          "description": {
            "type": "string",
            "description": "日历描述。",
            "maxLength": 499
          },
          "timezone": {
            "type": "string",
            "description": "IANA 时区，为空时默认 Asia/Shanghai。",
            "default": "Asia/Shanghai"
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属团队 ID，0 表示不关联团队。"
          },
          "workdays": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 6
            },
            "description": "工作日（0 = 周日，6 = 周六）。"
          },
          "extra_cal_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "需要继承事件的公共节假日日历 ID 列表（例如 zh-cn.china.official）。"
          }
        }
      },
      "CalendarCreateResponse": {
        "type": "object",
        "description": "创建日历响应。",
        "required": [
          "cal_id",
          "cal_name"
        ],
        "properties": {
          "cal_id": {
            "type": "string",
            "description": "新建日历的 ID（格式 cal.<uuid>）。"
          },
          "cal_name": {
            "type": "string",
            "description": "日历显示名称。"
          }
        }
      },
      "CalendarUpdateRequest": {
        "type": "object",
        "description": "更新日历请求。cal_id 必填，其他字段均为可选，仅在传入时更新。",
        "required": [
          "cal_id"
        ],
        "properties": {
          "cal_id": {
            "type": "string",
            "description": "日历 ID。"
          },
          "cal_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "新的日历名称。",
            "minLength": 1,
            "maxLength": 39
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "新的描述。",
            "maxLength": 499
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "新的 IANA 时区。"
          },
          "team_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "新的所属团队 ID。"
          },
          "workdays": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 6
            },
            "description": "工作日（0 = 周日，6 = 周六）。"
          },
          "extra_cal_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "需要继承事件的公共节假日日历 ID 列表。"
          }
        }
      },
      "CalendarIDRequest": {
        "type": "object",
        "description": "携带日历 ID 的请求体。",
        "required": [
          "cal_id"
        ],
        "properties": {
          "cal_id": {
            "type": "string",
            "description": "日历 ID。"
          }
        }
      },
      "CalendarItem": {
        "type": "object",
        "description": "服务日历详情。",
        "required": [
          "account_id",
          "team_id",
          "cal_id",
          "cal_name",
          "description",
          "timezone",
          "kind",
          "created_at",
          "updated_at",
          "creator_id",
          "updated_by",
          "status"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "账户 ID。"
          },
          "team_id": {
            "type": "integer",
            "format": "uint64",
            "description": "所属团队 ID（0 表示未关联团队）。"
          },
          "cal_id": {
            "type": "string",
            "description": "日历 ID。"
          },
          "cal_name": {
            "type": "string",
            "description": "日历显示名称。"
          },
          "description": {
            "type": "string",
            "description": "日历描述。"
          },
          "timezone": {
            "type": "string",
            "description": "IANA 时区。"
          },
          "kind": {
            "type": "string",
            "description": "日历类型。",
            "enum": [
              "region.official.holiday",
              "religion.holiday",
              "personal"
            ]
          },
          "workdays": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 6
            },
            "description": "工作日（0 = 周日，6 = 周六）。"
          },
          "extra_cal_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "继承的公共节假日日历 ID 列表。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间（Unix 秒）。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "更新时间（Unix 秒）。"
          },
          "creator_id": {
            "type": "integer",
            "format": "uint64",
            "description": "创建人 ID。"
          },
          "updated_by": {
            "type": "integer",
            "format": "uint64",
            "description": "最后更新人 ID。"
          },
          "status": {
            "type": "string",
            "description": "日历状态。",
            "enum": [
              "enabled",
              "deleted"
            ]
          }
        }
      },
      "CalendarListRequest": {
        "type": "object",
        "description": "日历列表请求。kind 用于按类型过滤；no_locale 在查询公共节假日日历时关闭 locale 过滤。",
        "properties": {
          "kind": {
            "type": "string",
            "description": "日历类型过滤条件，为空时默认 personal。",
            "enum": [
              "region.official.holiday",
              "personal"
            ]
          },
          "no_locale": {
            "type": "boolean",
            "description": "查询公共节假日日历时关闭 locale 过滤。"
          }
        }
      },
      "CalendarListResponse": {
        "type": "object",
        "description": "日历列表响应。",
        "required": [
          "items",
          "total"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CalendarItem"
            },
            "description": "日历列表。"
          },
          "total": {
            "type": "integer",
            "description": "返回的日历总数。"
          }
        }
      },
      "CalEventUpsertRequest": {
        "type": "object",
        "description": "日历事件创建/更新请求。传入 event_id 表示更新，留空表示创建。",
        "required": [
          "cal_id",
          "summary",
          "start_at",
          "end_at",
          "is_off"
        ],
        "properties": {
          "cal_id": {
            "type": "string",
            "description": "日历 ID。"
          },
          "event_id": {
            "type": "string",
            "description": "事件 ID，创建时留空。",
            "maxLength": 63
          },
          "summary": {
            "type": "string",
            "description": "事件摘要。",
            "minLength": 1,
            "maxLength": 39
          },
          "description": {
            "type": "string",
            "description": "事件描述。",
            "maxLength": 499
          },
          "start_at": {
            "type": "string",
            "description": "事件开始日期，格式 YYYY-MM-DD。"
          },
          "end_at": {
            "type": "string",
            "description": "事件结束日期（不含），格式 YYYY-MM-DD。"
          },
          "is_off": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "是否为非工作日。true = 休息日，false = 工作日覆盖。"
          }
        }
      },
      "CalEventUpsertResponse": {
        "type": "object",
        "description": "/calendar/event/upsert 的响应。",
        "required": [
          "cal_id",
          "event_id",
          "summary"
        ],
        "properties": {
          "cal_id": {
            "type": "string",
            "description": "日历 ID。"
          },
          "event_id": {
            "type": "string",
            "description": "事件 ID（已存在的或新生成的）。"
          },
          "summary": {
            "type": "string",
            "description": "事件摘要。"
          }
        }
      },
      "CalEventIDRequest": {
        "type": "object",
        "description": "日历事件删除请求。",
        "required": [
          "cal_id",
          "event_id"
        ],
        "properties": {
          "cal_id": {
            "type": "string",
            "description": "日历 ID。"
          },
          "event_id": {
            "type": "string",
            "description": "事件 ID。"
          }
        }
      },
      "CalEventListRequest": {
        "type": "object",
        "description": "日历事件列表请求。day > 0 时必须同时指定 month；month 与 day 为 0 表示不过滤。",
        "required": [
          "cal_id"
        ],
        "properties": {
          "cal_id": {
            "type": "string",
            "description": "日历 ID。"
          },
          "year": {
            "type": "integer",
            "description": "年份，留空时默认当前年。",
            "minimum": 2023
          },
          "month": {
            "type": "integer",
            "description": "月份（1-12），0 表示不按月过滤。",
            "minimum": 0,
            "maximum": 12
          },
          "day": {
            "type": "integer",
            "description": "日（1-31），0 表示不按日过滤。",
            "minimum": 0,
            "maximum": 31
          }
        }
      },
      "CalEventItem": {
        "type": "object",
        "description": "日历事件条目。",
        "required": [
          "cal_id",
          "event_id",
          "summary",
          "description",
          "start_at",
          "end_at",
          "is_off",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "账户 ID，仅私有事件返回。"
          },
          "creator_id": {
            "type": "integer",
            "format": "uint64",
            "description": "创建人 ID，仅私有事件返回。"
          },
          "cal_id": {
            "type": "string",
            "description": "日历 ID，公共事件为 locale key（如 zh-cn.china.official）。"
          },
          "event_id": {
            "type": "string",
            "description": "事件 ID。"
          },
          "summary": {
            "type": "string",
            "description": "事件摘要。"
          },
          "description": {
            "type": "string",
            "description": "事件描述。"
          },
          "start_at": {
            "type": "string",
            "description": "事件开始日期（YYYY-MM-DD）。"
          },
          "end_at": {
            "type": "string",
            "description": "事件结束日期（YYYY-MM-DD，不含）。"
          },
          "is_off": {
            "type": "boolean",
            "description": "是否为非工作日。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间（Unix 秒）。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "更新时间（Unix 秒）。"
          }
        }
      },
      "CalEventListResponse": {
        "type": "object",
        "description": "日历事件列表响应。",
        "required": [
          "items",
          "total"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CalEventItem"
            },
            "description": "按 start_at 排序的日历事件列表。"
          },
          "total": {
            "type": "integer",
            "description": "返回的事件总数。"
          }
        }
      },
      "TemplateItem": {
        "type": "object",
        "description": "一个通知模板。每个通道字段中存放该通道的模板源字符串；空字符串表示该通道没有自定义模板。",
        "required": [
          "account_id",
          "team_id",
          "template_id",
          "template_name",
          "description",
          "email",
          "sms",
          "voice",
          "dingtalk",
          "wecom",
          "feishu",
          "feishu_app",
          "dingtalk_app",
          "wecom_app",
          "slack_app",
          "teams_app",
          "telegram",
          "slack",
          "zoom",
          "status",
          "creator_id",
          "updated_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属账户 ID。"
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属团队 ID，0 表示账户全局共享。"
          },
          "template_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "模板 ID。",
            "example": "6605a1b2c3d4e5f6a7b8c9d0"
          },
          "template_name": {
            "type": "string",
            "description": "模板名称，同一账户内唯一。"
          },
          "description": {
            "type": "string",
            "description": "自定义描述。"
          },
          "email": {
            "type": "string",
            "description": "邮件正文模板源（Go `html/template` 语法）。"
          },
          "sms": {
            "type": "string",
            "description": "短信模板源（Go `text/template` 语法）。"
          },
          "voice": {
            "type": "string",
            "description": "语音呼叫脚本模板源。"
          },
          "dingtalk": {
            "type": "string",
            "description": "钉钉群机器人消息模板源。"
          },
          "wecom": {
            "type": "string",
            "description": "企业微信群机器人消息模板源。"
          },
          "feishu": {
            "type": "string",
            "description": "飞书群机器人消息模板源。"
          },
          "feishu_app": {
            "type": "string",
            "description": "飞书应用消息模板源。"
          },
          "dingtalk_app": {
            "type": "string",
            "description": "钉钉应用消息模板源。"
          },
          "wecom_app": {
            "type": "string",
            "description": "企业微信应用消息模板源。"
          },
          "slack_app": {
            "type": "string",
            "description": "Slack 应用消息模板源。"
          },
          "teams_app": {
            "type": "string",
            "description": "Microsoft Teams 应用消息模板源。"
          },
          "telegram": {
            "type": "string",
            "description": "Telegram 机器人消息模板源。"
          },
          "slack": {
            "type": "string",
            "description": "Slack 机器人消息模板源。"
          },
          "zoom": {
            "type": "string",
            "description": "Zoom 机器人消息模板源。"
          },
          "status": {
            "type": "string",
            "description": "模板生命周期状态。",
            "enum": [
              "enabled",
              "disabled",
              "deleted"
            ]
          },
          "creator_id": {
            "type": "integer",
            "format": "int64",
            "description": "创建人成员 ID。"
          },
          "updated_by": {
            "type": "integer",
            "format": "int64",
            "description": "最后修改人成员 ID。"
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64",
            "description": "软删除时间（Unix 秒）。模板未删除时字段缺省（omitempty）。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间（Unix 秒）。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最近更新时间（Unix 秒）。"
          }
        }
      },
      "TemplateIDRequest": {
        "type": "object",
        "required": [
          "template_id"
        ],
        "properties": {
          "template_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "要操作的模板 ID。传入 `000000000000000000000001` 可访问系统预置模板。",
            "example": "6605a1b2c3d4e5f6a7b8c9d0"
          }
        }
      },
      "TemplateListRequest": {
        "type": "object",
        "description": "分页过滤条件。默认 p=1、limit=20，limit 上限为 100。",
        "properties": {
          "p": {
            "type": "integer",
            "description": "页码，从 1 开始。",
            "minimum": 1,
            "default": 1,
            "example": 1
          },
          "limit": {
            "type": "integer",
            "description": "分页大小，最大 100。",
            "minimum": 1,
            "maximum": 100,
            "default": 20,
            "example": 20
          },
          "orderby": {
            "type": "string",
            "description": "排序字段。",
            "enum": [
              "created_at",
              "updated_at"
            ]
          },
          "asc": {
            "type": "boolean",
            "description": "升序排序。",
            "default": false
          },
          "is_my_team": {
            "type": "boolean",
            "description": "为 true 时只返回当前成员所属团队范围内的模板。",
            "default": false
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "按团队 ID 列表过滤。"
          },
          "creator_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "按创建人成员 ID 过滤。"
          },
          "query": {
            "type": "string",
            "description": "按模板名称做正则或子串匹配。"
          }
        }
      },
      "TemplateListResponse": {
        "type": "object",
        "description": "通知模板的分页列表。",
        "required": [
          "total",
          "has_next_page",
          "items"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "符合过滤条件的模板总数。",
            "example": 47
          },
          "has_next_page": {
            "type": "boolean",
            "description": "是否还有下一页。",
            "example": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateItem"
            }
          }
        }
      },
      "TemplateCreateRequest": {
        "type": "object",
        "description": "创建通知模板。",
        "required": [
          "template_name"
        ],
        "properties": {
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "团队归属。0 表示账户全局共享。",
            "default": 0
          },
          "template_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39,
            "description": "模板名称，同一账户内唯一，长度 1–39 个字符。",
            "example": "生产环境默认模板"
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "自定义描述。最多 500 字符。"
          },
          "email": {
            "type": "string",
            "description": "邮件正文模板源（Go `html/template` 语法）。"
          },
          "sms": {
            "type": "string",
            "description": "短信模板源（Go `text/template` 语法）。"
          },
          "voice": {
            "type": "string",
            "description": "语音呼叫脚本模板源。"
          },
          "dingtalk": {
            "type": "string",
            "description": "钉钉群机器人消息模板源。"
          },
          "wecom": {
            "type": "string",
            "description": "企业微信群机器人消息模板源。"
          },
          "feishu": {
            "type": "string",
            "description": "飞书群机器人消息模板源。"
          },
          "feishu_app": {
            "type": "string",
            "description": "飞书应用消息模板源。"
          },
          "dingtalk_app": {
            "type": "string",
            "description": "钉钉应用消息模板源。"
          },
          "wecom_app": {
            "type": "string",
            "description": "企业微信应用消息模板源。"
          },
          "slack_app": {
            "type": "string",
            "description": "Slack 应用消息模板源。"
          },
          "teams_app": {
            "type": "string",
            "description": "Microsoft Teams 应用消息模板源。"
          },
          "telegram": {
            "type": "string",
            "description": "Telegram 机器人消息模板源。"
          },
          "slack": {
            "type": "string",
            "description": "Slack 机器人消息模板源。"
          },
          "zoom": {
            "type": "string",
            "description": "Zoom 机器人消息模板源。"
          }
        }
      },
      "TemplateCreateResponse": {
        "type": "object",
        "required": [
          "template_id",
          "template_name"
        ],
        "properties": {
          "template_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "新创建的模板 ID。",
            "example": "6605a1b2c3d4e5f6a7b8c9d0"
          },
          "template_name": {
            "type": "string",
            "description": "从请求中回显的模板名称。",
            "example": "生产环境默认模板"
          }
        }
      },
      "TemplateUpdateRequest": {
        "type": "object",
        "description": "更新已存在的模板。",
        "required": [
          "template_id",
          "template_name"
        ],
        "properties": {
          "template_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "目标模板 ID。",
            "example": "6605a1b2c3d4e5f6a7b8c9d0"
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "团队归属。0 表示账户全局共享。",
            "default": 0
          },
          "template_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39,
            "description": "模板名称，长度 1–39 个字符。"
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "自定义描述。最多 500 字符。"
          },
          "email": {
            "type": "string",
            "description": "邮件正文模板源（Go `html/template` 语法）。"
          },
          "sms": {
            "type": "string",
            "description": "短信模板源（Go `text/template` 语法）。"
          },
          "voice": {
            "type": "string",
            "description": "语音呼叫脚本模板源。"
          },
          "dingtalk": {
            "type": "string",
            "description": "钉钉群机器人消息模板源。"
          },
          "wecom": {
            "type": "string",
            "description": "企业微信群机器人消息模板源。"
          },
          "feishu": {
            "type": "string",
            "description": "飞书群机器人消息模板源。"
          },
          "feishu_app": {
            "type": "string",
            "description": "飞书应用消息模板源。"
          },
          "dingtalk_app": {
            "type": "string",
            "description": "钉钉应用消息模板源。"
          },
          "wecom_app": {
            "type": "string",
            "description": "企业微信应用消息模板源。"
          },
          "slack_app": {
            "type": "string",
            "description": "Slack 应用消息模板源。"
          },
          "teams_app": {
            "type": "string",
            "description": "Microsoft Teams 应用消息模板源。"
          },
          "telegram": {
            "type": "string",
            "description": "Telegram 机器人消息模板源。"
          },
          "slack": {
            "type": "string",
            "description": "Slack 机器人消息模板源。"
          },
          "zoom": {
            "type": "string",
            "description": "Zoom 机器人消息模板源。"
          }
        }
      },
      "CsvFileResponse": {
        "type": "string",
        "description": "以附件形式返回的 CSV 文件内容。"
      },
      "EnrichmentInfoRequest": {
        "type": "object",
        "required": [
          "integration_id"
        ],
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "description": "待查询富化规则的集成 ID，必须大于 0。"
          }
        }
      },
      "EnrichmentListRequest": {
        "type": "object",
        "required": [
          "integration_ids"
        ],
        "properties": {
          "integration_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "待查询的集成 ID 列表。"
          }
        }
      },
      "EnrichmentUpsertRequest": {
        "type": "object",
        "required": [
          "integration_id",
          "rules"
        ],
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "待配置富化规则的集成 ID。"
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnrichRule"
            },
            "description": "富化规则有序列表，将原子替换现有全部规则。"
          }
        }
      },
      "EnrichRule": {
        "type": "object",
        "required": [
          "kind",
          "settings"
        ],
        "description": "带可选条件的富化规则，包含特定类型配置。",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "extraction",
              "composition",
              "mapping",
              "drop"
            ],
            "description": "规则类型。`extraction` 通过正则或 GJson 提取标签；`composition` 通过模板组合标签；`mapping` 通过映射规则或 API 查找填充标签；`drop` 删除标签。"
          },
          "if": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnrichFilter"
            },
            "description": "可选 AND 过滤条件列表，不匹配时跳过该规则。"
          },
          "settings": {
            "description": "与规则类型对应的配置，具体结构由 `kind` 字段决定。",
            "discriminator": {
              "propertyName": "kind",
              "mapping": {
                "extraction": "#/components/schemas/ErsExtraction",
                "composition": "#/components/schemas/ErsComposition",
                "mapping": "#/components/schemas/ErsMapping",
                "drop": "#/components/schemas/ErsDrop"
              }
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/ErsExtraction"
              },
              {
                "$ref": "#/components/schemas/ErsComposition"
              },
              {
                "$ref": "#/components/schemas/ErsMapping"
              },
              {
                "$ref": "#/components/schemas/ErsDrop"
              }
            ]
          }
        }
      },
      "ErsExtraction": {
        "type": "object",
        "title": "extraction",
        "required": [
          "source_field",
          "result_label"
        ],
        "properties": {
          "source_field": {
            "type": "string",
            "description": "待提取的源字段。可为 `title`、`description` 或以 `labels.` 为前缀的标签键（如 `labels.env`）。"
          },
          "result_label": {
            "type": "string",
            "description": "写入提取值的目标标签键，须符合 `^[a-z][a-z0-9_]{0,62}$`。"
          },
          "pattern": {
            "type": "string",
            "description": "RE2 正则表达式。使用命名捕获组 `(?P<result>...)` 提取子匹配；无命名组时取全匹配。与 `g_json` 互斥。"
          },
          "g_json": {
            "type": "string",
            "description": "GJson 路径表达式，用于从 JSON 编码的字段中提取值。与 `pattern` 互斥。"
          },
          "override": {
            "type": "boolean",
            "description": "为 `true` 时若标签已存在则覆盖，默认为 `false`。"
          }
        }
      },
      "ErsComposition": {
        "type": "object",
        "title": "composition",
        "required": [
          "result_label",
          "template"
        ],
        "properties": {
          "result_label": {
            "type": "string",
            "description": "写入组合值的目标标签键，须符合 `^[a-z][a-z0-9_]{0,62}$`。"
          },
          "template": {
            "type": "string",
            "maxLength": 500,
            "description": "Go `text/template` 字符串，可引用告警字段 `{{.title}}`、`{{.description}}`、`{{.labels.key}}`。示例：`{{.labels.region}}-{{.labels.env}}`。"
          },
          "override": {
            "type": "boolean",
            "description": "为 `true` 时若标签已存在则覆盖，默认为 `false`。"
          }
        }
      },
      "ErsMapping": {
        "type": "object",
        "title": "mapping",
        "required": [
          "result_labels"
        ],
        "properties": {
          "result_labels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "从映射查找结果中填充的目标标签键列表。"
          },
          "mapping_type": {
            "type": "string",
            "enum": [
              "schema",
              "api"
            ],
            "default": "schema",
            "description": "映射来源类型。`schema` 使用映射规则表；`api` 调用外部 HTTP API。"
          },
          "schema_id": {
            "type": "string",
            "description": "映射规则 ID（MongoDB ObjectID 十六进制）。`mapping_type` 为 `schema` 时必填。"
          },
          "api_id": {
            "type": "string",
            "description": "映射 API ID（MongoDB ObjectID 十六进制）。`mapping_type` 为 `api` 时必填。"
          },
          "override": {
            "type": "boolean",
            "description": "为 `true` 时若标签已存在则覆盖，默认为 `false`。"
          }
        }
      },
      "ErsDrop": {
        "type": "object",
        "title": "drop",
        "required": [
          "drop_labels"
        ],
        "properties": {
          "drop_labels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "待从告警中删除的标签键列表。"
          }
        }
      },
      "EnrichFilter": {
        "type": "object",
        "required": [
          "key",
          "oper",
          "vals"
        ],
        "description": "单个标签过滤条件。",
        "properties": {
          "key": {
            "type": "string",
            "description": "告警标签键。"
          },
          "oper": {
            "type": "string",
            "enum": [
              "IN",
              "NOTIN"
            ],
            "description": "匹配操作符。`IN` 表示任一值匹配即通过；`NOTIN` 表示所有值均不匹配时通过。"
          },
          "vals": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "待匹配的值列表。"
          }
        }
      },
      "EnrichmentItem": {
        "type": "object",
        "description": "集成的富化规则集。",
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "集成 ID。"
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnrichRule"
            },
            "description": "有序富化规则列表。"
          },
          "status": {
            "type": "string",
            "description": "规则集状态。"
          },
          "updated_by": {
            "type": "integer",
            "format": "int64",
            "description": "最后更新者成员 ID。"
          },
          "creator_id": {
            "type": "integer",
            "format": "int64",
            "description": "创建者成员 ID。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间，Unix 时间戳（秒）。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最后更新时间，Unix 时间戳（秒）。"
          }
        },
        "required": [
          "integration_id",
          "rules",
          "status",
          "updated_by",
          "creator_id",
          "created_at",
          "updated_at"
        ]
      },
      "EnrichmentListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnrichmentItem"
            },
            "description": "富化规则集列表。"
          }
        },
        "required": [
          "items"
        ]
      },
      "MappingSchemaIDRequest": {
        "type": "object",
        "required": [
          "schema_id"
        ],
        "properties": {
          "schema_id": {
            "type": "string",
            "description": "映射规则 ID（MongoDB ObjectID 十六进制）。"
          }
        }
      },
      "MappingSchemaCreateRequest": {
        "type": "object",
        "required": [
          "schema_name",
          "source_labels",
          "result_labels"
        ],
        "properties": {
          "schema_name": {
            "type": "string",
            "maxLength": 39,
            "description": "唯一的映射规则名称（最多 39 个字符）。"
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "可选描述（最多 500 个字符）。"
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属团队 ID，`0` 表示无团队。"
          },
          "source_labels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 3,
            "description": "查找键标签名（1–3 个），不得与 `result_labels` 重叠。"
          },
          "result_labels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 10,
            "description": "输出标签名（1–10 个），不得与 `source_labels` 重叠。"
          }
        }
      },
      "MappingSchemaCreateResponse": {
        "type": "object",
        "properties": {
          "schema_id": {
            "type": "string",
            "description": "创建的映射规则 ID（MongoDB ObjectID 十六进制）。"
          },
          "schema_name": {
            "type": "string",
            "description": "映射规则名称。"
          }
        },
        "required": [
          "schema_id",
          "schema_name"
        ]
      },
      "MappingSchemaUpdateRequest": {
        "type": "object",
        "required": [
          "schema_id"
        ],
        "properties": {
          "schema_id": {
            "type": "string",
            "description": "映射规则 ID（MongoDB ObjectID 十六进制）。"
          },
          "schema_name": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 39,
            "description": "新的映射规则名称（最多 39 个字符）。"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500,
            "description": "新的描述（最多 500 个字符）。"
          },
          "team_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "新的所属团队 ID，`0` 表示移除团队关联。"
          }
        }
      },
      "MappingSchemaItem": {
        "type": "object",
        "description": "映射规则定义。",
        "properties": {
          "schema_id": {
            "type": "string",
            "description": "映射规则 ID（MongoDB ObjectID 十六进制）。"
          },
          "schema_name": {
            "type": "string",
            "description": "映射规则名称。"
          },
          "description": {
            "type": "string",
            "description": "描述。"
          },
          "source_labels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "查找键标签名。"
          },
          "result_labels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "输出标签名。"
          },
          "status": {
            "type": "string",
            "description": "映射规则状态。"
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属团队 ID。"
          },
          "creator_id": {
            "type": "integer",
            "format": "int64",
            "description": "创建者成员 ID。"
          },
          "updated_by": {
            "type": "integer",
            "format": "int64",
            "description": "最后更新者成员 ID。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间，Unix 时间戳（秒）。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最后更新时间，Unix 时间戳（秒）。"
          }
        },
        "required": [
          "schema_id",
          "schema_name",
          "description",
          "source_labels",
          "result_labels",
          "status",
          "team_id",
          "updated_by",
          "creator_id"
        ]
      },
      "MappingSchemaListResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "映射规则总数。"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MappingSchemaItem"
            },
            "description": "映射规则列表。"
          }
        },
        "required": [
          "total",
          "items"
        ]
      },
      "MappingDataListRequest": {
        "type": "object",
        "required": [
          "schema_id"
        ],
        "properties": {
          "schema_id": {
            "type": "string",
            "description": "映射规则 ID（MongoDB ObjectID 十六进制）。"
          },
          "query": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "按来源标签值精确过滤。若指定 query，须包含全部来源标签。"
          },
          "orderby": {
            "type": "string",
            "enum": [
              "created_at",
              "updated_at"
            ],
            "description": "排序字段。"
          },
          "asc": {
            "type": "boolean",
            "description": "为 `true` 时升序排列。"
          },
          "p": {
            "type": "integer",
            "format": "int64",
            "description": "页码（从 1 开始），用于页码分页。"
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "description": "每页数量（1–100，默认 20）。"
          },
          "search_after_ctx": {
            "type": "string",
            "description": "用于游标分页的不透明游标令牌。"
          }
        }
      },
      "MappingDataItem": {
        "type": "object",
        "description": "单条映射数据行。",
        "properties": {
          "key": {
            "type": "string",
            "description": "由来源标签值组合生成的唯一键。"
          },
          "fields": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "该行所有标签的键值对。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间，Unix 时间戳（秒）。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最后更新时间，Unix 时间戳（秒）。"
          }
        }
      },
      "MappingDataListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MappingDataItem"
            },
            "description": "数据行列表。"
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "匹配的总行数。"
          },
          "has_next_page": {
            "type": "boolean",
            "description": "是否存在更多页。"
          },
          "search_after_ctx": {
            "type": "string",
            "description": "用于获取下一页的游标令牌。"
          }
        },
        "required": [
          "items",
          "total",
          "has_next_page"
        ]
      },
      "MappingDataUpsertRequest": {
        "type": "object",
        "required": [
          "schema_id",
          "docs"
        ],
        "properties": {
          "schema_id": {
            "type": "string",
            "description": "映射规则 ID（MongoDB ObjectID 十六进制）。"
          },
          "docs": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            },
            "maxItems": 1000,
            "description": "待插入或更新的数据行，每行须包含所有来源标签和结果标签的值。"
          }
        }
      },
      "MappingDataUpsertResponse": {
        "type": "object",
        "properties": {
          "keys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "已 Upsert 数据行的组合键列表。"
          }
        },
        "required": [
          "keys"
        ]
      },
      "MappingDataDeleteRequest": {
        "type": "object",
        "required": [
          "schema_id",
          "keys"
        ],
        "properties": {
          "schema_id": {
            "type": "string",
            "description": "映射规则 ID（MongoDB ObjectID 十六进制）。"
          },
          "keys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 100,
            "description": "待删除的数据行键名列表。"
          }
        }
      },
      "MappingDataUploadRequest": {
        "type": "object",
        "description": "Multipart form-data 上传请求。`schema_id` 通过查询参数传入，`file` 为 CSV 文件字段。",
        "properties": {
          "schema_id": {
            "type": "string",
            "description": "映射规则 ID（查询参数）。"
          },
          "file": {
            "type": "string",
            "format": "binary",
            "description": "待上传的 CSV 文件。"
          }
        }
      },
      "MappingAPIIDRequest": {
        "type": "object",
        "required": [
          "api_id"
        ],
        "properties": {
          "api_id": {
            "type": "string",
            "description": "映射 API ID（MongoDB ObjectID 十六进制）。"
          }
        }
      },
      "MappingAPICreateRequest": {
        "type": "object",
        "required": [
          "api_name",
          "url"
        ],
        "properties": {
          "api_name": {
            "type": "string",
            "maxLength": 199,
            "description": "唯一的 API 名称（最多 199 个字符）。"
          },
          "description": {
            "type": "string",
            "description": "可选描述。"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "maxLength": 500,
            "description": "HTTP/HTTPS 端点 URL（最多 500 个字符）。"
          },
          "insecure_skip_verify": {
            "type": "boolean",
            "description": "是否跳过 TLS 证书验证，默认 `false`。"
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "自定义 HTTP 请求头。"
          },
          "timeout": {
            "type": "integer",
            "description": "请求超时秒数（1–3），默认 2。"
          },
          "retry_count": {
            "type": "integer",
            "description": "失败重试次数（0–1），默认 0。"
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属团队 ID。"
          }
        }
      },
      "MappingAPICreateResponse": {
        "type": "object",
        "properties": {
          "api_id": {
            "type": "string",
            "description": "创建的映射 API ID（MongoDB ObjectID 十六进制）。"
          },
          "api_name": {
            "type": "string",
            "description": "API 名称。"
          }
        },
        "required": [
          "api_id",
          "api_name"
        ]
      },
      "MappingAPIUpdateRequest": {
        "type": "object",
        "required": [
          "api_id"
        ],
        "properties": {
          "api_id": {
            "type": "string",
            "description": "映射 API ID（MongoDB ObjectID 十六进制）。"
          },
          "api_name": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 199,
            "description": "新 API 名称（最多 199 个字符）。"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "新描述。"
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "maxLength": 500,
            "description": "新端点 URL（最多 500 个字符）。"
          },
          "insecure_skip_verify": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "新 TLS 跳过验证设置。"
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "新请求头映射（覆盖原有值）。"
          },
          "timeout": {
            "type": [
              "integer",
              "null"
            ],
            "description": "新超时秒数。"
          },
          "retry_count": {
            "type": [
              "integer",
              "null"
            ],
            "description": "新重试次数。"
          },
          "team_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "新所属团队 ID。"
          }
        }
      },
      "MappingAPIItem": {
        "type": "object",
        "description": "映射 API 配置。",
        "properties": {
          "api_id": {
            "type": "string",
            "description": "API ID（MongoDB ObjectID 十六进制）。"
          },
          "api_name": {
            "type": "string",
            "description": "API 名称。"
          },
          "description": {
            "type": "string",
            "description": "描述。"
          },
          "url": {
            "type": "string",
            "description": "端点 URL。"
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "自定义请求头。"
          },
          "timeout": {
            "type": "integer",
            "description": "请求超时秒数。"
          },
          "retry_count": {
            "type": "integer",
            "description": "重试次数。"
          },
          "insecure_skip_verify": {
            "type": "boolean",
            "description": "是否跳过 TLS 验证。"
          },
          "status": {
            "type": "string",
            "description": "API 状态。"
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属团队 ID。"
          },
          "creator_id": {
            "type": "integer",
            "format": "int64",
            "description": "创建者成员 ID。"
          },
          "updated_by": {
            "type": "integer",
            "format": "int64",
            "description": "最后更新者成员 ID。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间，Unix 时间戳（秒）。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最后更新时间，Unix 时间戳（秒）。"
          }
        },
        "required": [
          "api_id",
          "api_name",
          "description",
          "url",
          "headers",
          "timeout",
          "retry_count",
          "insecure_skip_verify",
          "status",
          "team_id",
          "updated_by",
          "creator_id"
        ]
      },
      "MappingAPIListResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "映射 API 总数。"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MappingAPIItem"
            },
            "description": "映射 API 列表。"
          }
        },
        "required": [
          "total",
          "items"
        ]
      },
      "InsightFilter": {
        "type": "object",
        "description": "洞察与导出接口共享的过滤参数。`severities` 至多 3 项，team/channel/responder/incident 过滤条件每项至多 100 条，时间范围不能超过一年。",
        "required": [
          "start_time",
          "end_time"
        ],
        "properties": {
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "起始时间，Unix 秒，必须大于 0。"
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "结束时间，Unix 秒，必须大于 `start_time`。"
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "按团队 ID 过滤，至多 100 项。"
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "按协作空间 ID 过滤，至多 100 项。"
          },
          "responder_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "按处理人员 ID 过滤，至多 100 项。"
          },
          "severities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Critical",
                "Warning",
                "Info",
                "Ok"
              ]
            },
            "description": "按严重程度过滤，至多 3 项。"
          },
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "description": "按故障 ID（MongoDB ObjectID）过滤，至多 100 项。"
          },
          "query": {
            "type": "string",
            "description": "作用于故障标题与描述的全文关键字。"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "标签过滤（精确匹配）。"
          },
          "fields": {
            "type": "object",
            "additionalProperties": true,
            "description": "自定义字段过滤（精确匹配）。"
          },
          "orderby": {
            "type": "string",
            "enum": [
              "created_at"
            ],
            "description": "底层故障集合的排序字段。"
          },
          "asc": {
            "type": "boolean",
            "description": "为 `true` 时升序，否则降序。"
          },
          "is_my_team": {
            "type": "boolean",
            "description": "是否仅返回调用者所属团队的数据。若调用者无任何团队，返回空集合。"
          },
          "time_zone": {
            "type": "string",
            "description": "IANA 时区名（如 `Asia/Shanghai`），用于解释时间范围。默认使用账户时区。"
          },
          "seconds_to_close_from": {
            "type": "integer",
            "format": "int64",
            "description": "解决时长下界（秒，包含）。"
          },
          "seconds_to_close_to": {
            "type": "integer",
            "format": "int64",
            "description": "解决时长上界（秒，不包含）。两端同时设置时，必须大于 `seconds_to_close_from`。"
          },
          "seconds_to_ack_from": {
            "type": "integer",
            "format": "int64",
            "description": "认领时长下界（秒，包含）。"
          },
          "seconds_to_ack_to": {
            "type": "integer",
            "format": "int64",
            "description": "认领时长上界（秒，不包含）。两端同时设置时，必须大于 `seconds_to_ack_from`。"
          },
          "export_fields": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "incident_id",
                "title",
                "severity",
                "progress",
                "channel_id",
                "channel_name",
                "team_id",
                "team_name",
                "created_at",
                "seconds_to_ack",
                "seconds_to_close",
                "closed_by",
                "engaged_seconds",
                "hours",
                "notifications",
                "interruptions",
                "acknowledgements",
                "assignments",
                "reassignments",
                "escalations",
                "manual_escalations",
                "timeout_escalations",
                "assigned_to",
                "responders",
                "description",
                "labels",
                "fields",
                "creator_id",
                "creator_name"
              ]
            },
            "description": "导出 CSV 时要包含的列键子集，至多 50 项。仅导出接口会读取。"
          },
          "description_html_to_text": {
            "type": "boolean",
            "description": "导出时是否将描述列中的 HTML 标签转换为纯文本。"
          },
          "include_ever_muted": {
            "type": "boolean",
            "description": "是否包含曾被收敛的故障；默认不包含。"
          }
        }
      },
      "InsightQueryRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/InsightFilter"
          },
          {
            "type": "object",
            "description": "洞察维度聚合请求。在 InsightFilter 基础上增加聚合控制字段。",
            "properties": {
              "split_hours": {
                "type": "boolean",
                "description": "为 `true` 时将指标拆分为 `work`/`sleep`/`off` 时段。"
              },
              "aggregate_unit": {
                "type": "string",
                "enum": [
                  "day",
                  "week",
                  "month"
                ],
                "description": "将指标按时间粒度聚合。设置后时间范围须不少于 24 小时；`day` 粒度时范围不得超过 31 天。"
              }
            }
          }
        ]
      },
      "InsightIncidentListRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/InsightFilter"
          },
          {
            "type": "object",
            "description": "故障分页列表请求。在 InsightFilter 基础上增加分页字段。",
            "properties": {
              "p": {
                "type": "integer",
                "minimum": 1,
                "default": 1,
                "description": "页码，从 1 开始，默认 1。"
              },
              "limit": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100,
                "default": 20,
                "description": "每页条数，范围 1-100，默认 20。"
              },
              "search_after_ctx": {
                "type": "string",
                "description": "上一页返回的游标 token，下一页请求时回传。"
              }
            }
          }
        ]
      },
      "InsightIncidentExportRequest": {
        "$ref": "#/components/schemas/InsightFilter"
      },
      "InsightTopkAlertByLabelRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/InsightQueryRequest"
          },
          {
            "type": "object",
            "required": [
              "label"
            ],
            "properties": {
              "label": {
                "type": "string",
                "enum": [
                  "check",
                  "resource"
                ],
                "description": "聚合维度。"
              },
              "k": {
                "type": "integer",
                "description": "返回前 K 条记录，取值范围 1-100。"
              },
              "orderby": {
                "type": "string",
                "enum": [
                  "total_alert_cnt",
                  "total_alert_event_cnt"
                ],
                "description": "排序字段。"
              },
              "asc": {
                "type": "boolean",
                "description": "为 `true` 时升序，否则降序。"
              }
            }
          }
        ]
      },
      "MetricsBase": {
        "type": "object",
        "description": "每条聚合洞察行都带有的共享维度字段。",
        "properties": {
          "hours": {
            "type": "string",
            "enum": [
              "work",
              "sleep",
              "off"
            ],
            "description": "启用 `split_hours` 时的时段桶。"
          },
          "ts": {
            "type": "integer",
            "format": "int64",
            "description": "聚合桶的起始时间（Unix 秒）。在使用 `aggregate_unit` 时返回。"
          },
          "channel_id": {
            "type": "integer",
            "format": "int64"
          },
          "team_id": {
            "type": "integer",
            "format": "int64"
          },
          "responder_id": {
            "type": "integer",
            "format": "int64"
          },
          "account_id": {
            "type": "integer",
            "format": "int64"
          },
          "team_name": {
            "type": "string"
          },
          "channel_name": {
            "type": "string"
          },
          "responder_name": {
            "type": "string"
          }
        }
      },
      "DimensionInsightItem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/MetricsBase"
          },
          {
            "type": "object",
            "description": "按账户/团队/协作空间聚合的故障与告警指标。",
            "properties": {
              "total_incident_cnt": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_acknowledged": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_closed": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_auto_closed": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_manually_closed": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_timeout_closed": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_escalated": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_manually_escalated": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_timeout_escalated": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_reassigned": {
                "type": "integer",
                "format": "int64"
              },
              "total_interruptions": {
                "type": "integer",
                "format": "int64"
              },
              "total_notifications": {
                "type": "integer",
                "format": "int64"
              },
              "total_engaged_seconds": {
                "type": "integer",
                "format": "int64"
              },
              "total_seconds_to_ack": {
                "type": "integer",
                "format": "int64"
              },
              "total_seconds_to_close": {
                "type": "integer",
                "format": "int64"
              },
              "mean_seconds_to_ack": {
                "type": "number",
                "format": "double"
              },
              "mean_seconds_to_close": {
                "type": "number",
                "format": "double"
              },
              "noise_reduction_pct": {
                "type": "number",
                "format": "double"
              },
              "acknowledgement_pct": {
                "type": "number",
                "format": "double"
              },
              "total_alert_cnt": {
                "type": "integer",
                "format": "int64"
              },
              "total_alert_event_cnt": {
                "type": "integer",
                "format": "int64"
              }
            }
          }
        ]
      },
      "ResponderInsightItem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/MetricsBase"
          },
          {
            "type": "object",
            "description": "按单个处理人员聚合的故障指标。",
            "properties": {
              "total_incident_cnt": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_acknowledged": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_reassigned": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_escalated": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_timeout_escalated": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_manually_escalated": {
                "type": "integer",
                "format": "int64"
              },
              "total_interruptions": {
                "type": "integer",
                "format": "int64"
              },
              "total_notifications": {
                "type": "integer",
                "format": "int64"
              },
              "total_engaged_seconds": {
                "type": "integer",
                "format": "int64"
              },
              "total_seconds_to_ack": {
                "type": "integer",
                "format": "int64"
              },
              "mean_seconds_to_ack": {
                "type": "number",
                "format": "double"
              },
              "acknowledgement_pct": {
                "type": "number",
                "format": "double"
              }
            }
          }
        ]
      },
      "DimensionInsightResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DimensionInsightItem"
            }
          }
        }
      },
      "ResponderInsightResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResponderInsightItem"
            }
          }
        }
      },
      "IncidentRawItem": {
        "type": "object",
        "description": "分析看板故障列表返回的原始故障记录，附带每条故障的处理效能指标。",
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "team_id": {
            "type": "integer",
            "format": "int64"
          },
          "team_name": {
            "type": "string"
          },
          "channel_id": {
            "type": "integer",
            "format": "int64"
          },
          "channel_name": {
            "type": "string"
          },
          "progress": {
            "type": "string",
            "description": "故障处理进度——`Triggered`、`Processing`、`Closed` 之一。"
          },
          "severity": {
            "type": "string",
            "enum": [
              "Critical",
              "Warning",
              "Info",
              "Ok"
            ]
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "closed_by": {
            "type": "string",
            "enum": [
              "auto",
              "timeout",
              "manually"
            ]
          },
          "seconds_to_ack": {
            "type": "integer",
            "format": "int64"
          },
          "seconds_to_close": {
            "type": "integer",
            "format": "int64"
          },
          "engaged_seconds": {
            "type": "integer",
            "format": "int64"
          },
          "hours": {
            "type": "string"
          },
          "responders": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "处理人员条目（结构详见故障模块）。"
            }
          },
          "assigned_to": {
            "type": "object",
            "description": "故障的当前分派目标。",
            "properties": {
              "person_ids": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int64"
                },
                "description": "直接分派给该故障的成员 ID 列表。"
              },
              "escalate_rule_id": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{24}$",
                "description": "驱动分派的升级规则 ID（MongoDB ObjectID）。"
              },
              "escalate_rule_name": {
                "type": "string",
                "description": "升级规则的显示名称。"
              },
              "layer_idx": {
                "type": "integer",
                "description": "升级规则中的当前级别索引。"
              },
              "type": {
                "type": "string",
                "enum": [
                  "assign",
                  "reassign",
                  "escalate",
                  "reopen"
                ],
                "description": "分派类型。"
              },
              "assigned_at": {
                "type": "integer",
                "format": "int64",
                "description": "本次分派发生的时间戳（Unix 秒）。"
              },
              "id": {
                "type": "string",
                "description": "内部分派记录 ID。"
              }
            }
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "fields": {
            "type": "object",
            "additionalProperties": true
          },
          "notifications": {
            "type": "integer",
            "format": "int64"
          },
          "interruptions": {
            "type": "integer",
            "format": "int64"
          },
          "assignments": {
            "type": "integer",
            "format": "int64"
          },
          "reassignments": {
            "type": "integer",
            "format": "int64"
          },
          "acknowledgements": {
            "type": "integer",
            "format": "int64"
          },
          "escalations": {
            "type": "integer",
            "format": "int64"
          },
          "timeout_escalations": {
            "type": "integer",
            "format": "int64"
          },
          "manual_escalations": {
            "type": "integer",
            "format": "int64"
          },
          "creator_id": {
            "type": "integer",
            "format": "int64"
          },
          "creator_name": {
            "type": "string"
          },
          "owner_id": {
            "type": "integer",
            "format": "int64",
            "description": "故障负责人的成员 ID。"
          },
          "owner_name": {
            "type": "string",
            "description": "故障负责人的显示名称。"
          },
          "closer_id": {
            "type": "integer",
            "format": "int64",
            "description": "关闭该故障的成员 ID。"
          },
          "closer_name": {
            "type": "string",
            "description": "关闭该故障的成员显示名称。"
          },
          "snoozed_before": {
            "type": "integer",
            "format": "int64",
            "description": "故障被暂缓到何时的 Unix 时间戳（秒）。"
          },
          "ever_muted": {
            "type": "boolean",
            "description": "该故障是否曾被收敛。"
          },
          "frequency": {
            "type": "string",
            "enum": [
              "frequent",
              "rare"
            ],
            "description": "故障频次分类。"
          }
        }
      },
      "InsightIncidentListResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "匹配的故障总数。"
          },
          "has_next_page": {
            "type": "boolean"
          },
          "search_after_ctx": {
            "type": "string",
            "description": "用于翻下一页的游标 token，下次请求时通过 `search_after_ctx` 回传。"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IncidentRawItem"
            }
          }
        }
      },
      "InsightAlertByLabelItem": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "description": "聚合键取值（check 名或 resource 标识）。"
          },
          "hours": {
            "type": "string",
            "description": "启用 `split_hours` 时的时段桶。"
          },
          "total_alert_cnt": {
            "type": "integer",
            "format": "int64"
          },
          "total_alert_event_cnt": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "InsightAlertByLabelResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InsightAlertByLabelItem"
            }
          }
        }
      },
      "StatusPageChangeItem": {
        "type": "object",
        "description": "状态页事件（故障或维护）。",
        "required": [
          "change_id",
          "type",
          "title"
        ],
        "properties": {
          "change_id": {
            "type": "integer",
            "format": "int64",
            "description": "事件 ID。"
          },
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属状态页 ID。"
          },
          "type": {
            "type": "string",
            "enum": [
              "incident",
              "maintenance"
            ],
            "description": "事件类型。"
          },
          "title": {
            "type": "string",
            "description": "事件标题。"
          },
          "description": {
            "type": "string",
            "description": "事件描述（Markdown）。"
          },
          "status": {
            "type": "string",
            "enum": [
              "investigating",
              "identified",
              "monitoring",
              "resolved",
              "scheduled",
              "ongoing",
              "completed"
            ],
            "description": "事件当前状态。故障事件支持 `investigating`/`identified`/`monitoring`/`resolved`；维护事件支持 `scheduled`/`ongoing`/`completed`。"
          },
          "affected_components": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AffectedStatusPageComponentItem"
            },
            "description": "当前受此事件影响的组件及其状态。"
          },
          "responder_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "事件负责成员 ID 列表。"
          },
          "linked_change_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "关联的事件 ID 列表（相关故障、发布等）。"
          },
          "start_at_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "事件开始时间（Unix 秒）。"
          },
          "close_at_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "计划结束时间（Unix 秒）。回溯事件和维护事件会设置此字段。"
          },
          "is_retrospective": {
            "type": "boolean",
            "description": "是否为回溯（历史）事件。"
          },
          "updates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusPageChangeUpdateItem"
            },
            "description": "事件的时间线更新列表，按时间排序。"
          },
          "notify_subscribers": {
            "type": "boolean",
            "description": "创建本事件时是否通知订阅者。"
          },
          "auto_update_by_schedule": {
            "type": "boolean",
            "description": "仅维护事件：是否根据计划窗口自动推进状态。"
          }
        }
      },
      "AffectedStatusPageComponentItem": {
        "type": "object",
        "description": "事件当前影响的状态页组件，包含组件元数据及其状态。",
        "required": [
          "name",
          "status"
        ],
        "properties": {
          "component_id": {
            "type": "string",
            "description": "组件 ID。"
          },
          "section_id": {
            "type": "string",
            "description": "所属区域 ID。"
          },
          "name": {
            "type": "string",
            "description": "组件显示名称。"
          },
          "description": {
            "type": "string",
            "description": "组件描述。"
          },
          "available_since_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "组件首次可用时间（Unix 秒）。"
          },
          "order_id": {
            "type": "integer",
            "format": "int64",
            "description": "在所属区域内的显示顺序。"
          },
          "hide_uptime": {
            "type": "boolean",
            "description": "为 true 时在摘要响应中隐藏可用率数据。"
          },
          "hide_all": {
            "type": "boolean",
            "description": "为 true 时从摘要接口中完全隐藏该组件。"
          },
          "status": {
            "type": "string",
            "enum": [
              "operational",
              "degraded",
              "partial_outage",
              "full_outage",
              "under_maintenance"
            ],
            "description": "事件导致的组件当前状态。"
          }
        }
      },
      "StatusPageChangeUpdateItem": {
        "type": "object",
        "description": "状态页事件的单条时间线更新。",
        "required": [
          "update_id",
          "at_seconds"
        ],
        "properties": {
          "update_id": {
            "type": "string",
            "description": "更新 ID。"
          },
          "at_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "更新时间戳（Unix 秒）。"
          },
          "status": {
            "type": "string",
            "enum": [
              "investigating",
              "identified",
              "monitoring",
              "resolved",
              "scheduled",
              "ongoing",
              "completed"
            ],
            "description": "本次更新后的事件状态。当更新不改变整体状态时省略。"
          },
          "description": {
            "type": "string",
            "description": "更新说明（Markdown）。"
          },
          "component_changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusPageComponentChangeItem"
            },
            "description": "本次更新应用的组件状态变更。"
          }
        }
      },
      "StatusPageComponentChangeItem": {
        "type": "object",
        "description": "时间线更新中的组件状态变更。",
        "required": [
          "component_id",
          "status"
        ],
        "properties": {
          "component_id": {
            "type": "string",
            "description": "组件 ID。"
          },
          "component_name": {
            "type": "string",
            "description": "组件显示名称。读取时由后端填充，写入时忽略。"
          },
          "status": {
            "type": "string",
            "enum": [
              "operational",
              "degraded",
              "partial_outage",
              "full_outage",
              "under_maintenance"
            ],
            "description": "组件新状态。故障事件支持 `operational`/`degraded`/`partial_outage`/`full_outage`；维护事件支持 `operational`/`under_maintenance`。"
          }
        }
      },
      "StatusPageChangeListResponse": {
        "type": "object",
        "description": "状态页事件列表。",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusPageChangeItem"
            }
          }
        }
      },
      "StatusPageChangeCreateResponse": {
        "type": "object",
        "description": "创建状态页事件的结果。",
        "required": [
          "change_id",
          "change_name"
        ],
        "properties": {
          "change_id": {
            "type": "integer",
            "format": "int64",
            "description": "新创建的事件 ID。"
          },
          "change_name": {
            "type": "string",
            "description": "事件标题（来自请求）。"
          }
        }
      },
      "UpdateStatusPageChangeRequest": {
        "type": "object",
        "description": "更新状态页事件可编辑字段所需的参数。",
        "required": [
          "page_id",
          "change_id"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "状态页 ID。"
          },
          "change_id": {
            "type": "integer",
            "format": "int64",
            "description": "目标事件 ID。"
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "description": "新的事件标题，最多 255 个字符。留空表示保持原值。"
          },
          "responders": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "事件负责成员 ID 列表。传入完整替换列表。"
          },
          "linked_changes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "关联的事件 ID 列表。传入完整替换列表。"
          }
        }
      },
      "DeleteStatusPageChangeRequest": {
        "type": "object",
        "description": "删除状态页事件所需的参数。",
        "required": [
          "page_id",
          "change_id"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "状态页 ID。"
          },
          "change_id": {
            "type": "integer",
            "format": "int64",
            "description": "目标事件 ID。"
          }
        }
      },
      "StatusPageChangeTimelineCreateResponse": {
        "type": "object",
        "description": "向状态页事件追加时间线更新的结果。",
        "required": [
          "update_id"
        ],
        "properties": {
          "update_id": {
            "type": "string",
            "description": "新创建的更新 ID。"
          }
        }
      },
      "UpdateStatusPageChangeTimelineRequest": {
        "type": "object",
        "description": "更新状态页事件已有时间线条目所需的参数。",
        "required": [
          "page_id",
          "change_id",
          "update_id"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "状态页 ID。"
          },
          "change_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属事件 ID。"
          },
          "update_id": {
            "type": "string",
            "description": "目标时间线更新 ID。"
          },
          "at_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "新的更新时间戳（Unix 秒）。"
          },
          "description": {
            "type": "string",
            "description": "新的更新说明（Markdown）。"
          }
        }
      },
      "DeleteStatusPageChangeTimelineRequest": {
        "type": "object",
        "description": "删除状态页事件时间线条目所需的参数。",
        "required": [
          "page_id",
          "change_id",
          "update_id"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "状态页 ID。"
          },
          "change_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属事件 ID。"
          },
          "update_id": {
            "type": "string",
            "description": "要删除的时间线更新 ID。"
          }
        }
      },
      "StatusPageSubscriberListResponse": {
        "type": "object",
        "description": "状态页订阅者分页列表。",
        "required": [
          "total",
          "has_next_page",
          "items"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "匹配的订阅者总数。"
          },
          "has_next_page": {
            "type": "boolean",
            "description": "当前页之后是否还有下一页。"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExportedStatusPageSubscriberItem"
            }
          }
        }
      },
      "ExportedStatusPageSubscriberItem": {
        "type": "object",
        "description": "状态页订阅者，供订阅者列表和导出接口返回。",
        "required": [
          "recipient",
          "method",
          "components",
          "all"
        ],
        "properties": {
          "recipient": {
            "type": "string",
            "description": "订阅接收方：公开状态页为邮箱地址，内部状态页为用户 ID。"
          },
          "method": {
            "type": "string",
            "enum": [
              "email",
              "im"
            ],
            "description": "订阅通知方式。"
          },
          "components": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusPageComponentItem"
            },
            "description": "该订阅者订阅的组件列表。"
          },
          "all": {
            "type": "boolean",
            "description": "是否订阅全部组件。"
          },
          "locale": {
            "type": "string",
            "description": "通知的首选语言。"
          }
        }
      },
      "StatusPageComponentItem": {
        "type": "object",
        "description": "状态页组件。",
        "required": [
          "name"
        ],
        "properties": {
          "component_id": {
            "type": "string",
            "description": "组件 ID。"
          },
          "section_id": {
            "type": "string",
            "description": "所属区域 ID。"
          },
          "name": {
            "type": "string",
            "description": "组件显示名称。"
          },
          "description": {
            "type": "string",
            "description": "组件描述。"
          },
          "available_since_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "组件首次可用时间（Unix 秒）。"
          },
          "order_id": {
            "type": "integer",
            "format": "int64",
            "description": "在所属区域内的显示顺序。"
          },
          "hide_uptime": {
            "type": "boolean",
            "description": "为 true 时在摘要响应中隐藏可用率数据。"
          },
          "hide_all": {
            "type": "boolean",
            "description": "为 true 时从摘要接口中完全隐藏该组件。"
          }
        }
      },
      "ImportStatusPageSubscribersRequest": {
        "type": "object",
        "description": "批量导入订阅者所需的参数。每个订阅者的 `recipient` 非空且不超过 255 字符；并且至少订阅一个组件/事件，或将 `all` 置为 true。",
        "required": [
          "page_id",
          "method"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "目标状态页 ID。"
          },
          "method": {
            "type": "string",
            "enum": [
              "email",
              "im"
            ],
            "description": "订阅通知方式。`email` 仅适用于公开状态页，`im` 仅适用于内部状态页。"
          },
          "subscribers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImportStatusPageSubscriberItem"
            },
            "description": "要导入的订阅者列表。"
          }
        }
      },
      "ImportStatusPageSubscriberItem": {
        "type": "object",
        "description": "单个待导入的订阅者。",
        "required": [
          "recipient"
        ],
        "properties": {
          "recipient": {
            "type": "string",
            "maxLength": 255,
            "description": "邮箱地址（公开状态页）或用户 ID（内部状态页）。"
          },
          "component_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "订阅者需要接收通知的组件 ID 列表。"
          },
          "change_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "订阅者需要接收通知的特定事件 ID 列表。"
          },
          "all": {
            "type": "boolean",
            "description": "为 true 时订阅所有组件。当 `component_ids` 与 `change_ids` 均为空时必须为 true。"
          },
          "locale": {
            "type": "string",
            "description": "通知的首选语言。留空时使用请求语言。"
          }
        }
      },
      "ExportStatusPageSubscribersRequest": {
        "type": "object",
        "description": "导出状态页订阅者列表所需的参数。",
        "required": [
          "page_id"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "状态页 ID。"
          },
          "component_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "可选：按组件 ID 过滤订阅者。"
          }
        }
      },
      "StatusPageSubscriberExportResponse": {
        "type": "string",
        "format": "binary",
        "description": "CSV 文件（Content-Type: text/csv; charset=utf-8），包含列：Method、Recipient、Components、Subscribe All、Locale。"
      },
      "MigrateStatusPageStructureRequest": {
        "type": "object",
        "description": "启动 Atlassian Statuspage 结构与历史迁移任务所需的参数。",
        "required": [
          "api_key",
          "source_page_id"
        ],
        "properties": {
          "api_key": {
            "type": "string",
            "description": "可访问源状态页的 Atlassian Statuspage API Key。"
          },
          "source_page_id": {
            "type": "string",
            "description": "Atlassian Statuspage 源状态页 ID。"
          },
          "url_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "迁移后状态页的目标 URL 名称。省略时沿用源状态页的 URL 名称。"
          }
        }
      },
      "MigrateStatusPageEmailSubscribersRequest": {
        "type": "object",
        "description": "启动 Atlassian Statuspage 邮件订阅者迁移任务所需的参数。",
        "required": [
          "api_key",
          "source_page_id",
          "target_page_id"
        ],
        "properties": {
          "api_key": {
            "type": "string",
            "description": "可访问源状态页的 Atlassian Statuspage API Key。"
          },
          "source_page_id": {
            "type": "string",
            "description": "Atlassian Statuspage 源状态页 ID。"
          },
          "target_page_id": {
            "type": "integer",
            "format": "int64",
            "description": "接收导入订阅者的 Flashduty 目标状态页 ID。"
          }
        }
      },
      "StatusPageMigrationStartResponse": {
        "type": "object",
        "description": "启动迁移任务的结果。",
        "required": [
          "job_id"
        ],
        "properties": {
          "job_id": {
            "type": "string",
            "description": "迁移任务 ID。用于查询状态或请求取消。"
          }
        }
      },
      "StatusPageMigrationJob": {
        "type": "object",
        "description": "迁移任务的当前状态及进度。",
        "required": [
          "job_id",
          "account_id",
          "source_page_id",
          "target_page_id",
          "phase",
          "status",
          "progress",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "job_id": {
            "type": "string",
            "description": "迁移任务 ID。"
          },
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属账户 ID。"
          },
          "source_page_id": {
            "type": "string",
            "description": "Atlassian Statuspage 源状态页 ID。"
          },
          "target_page_id": {
            "type": "integer",
            "format": "int64",
            "description": "Flashduty 目标状态页 ID。任务产出后设置，或由订阅者迁移接口上游传入。"
          },
          "phase": {
            "type": "string",
            "enum": [
              "structure",
              "history",
              "subscribers"
            ],
            "description": "当前迁移阶段。"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "running",
              "completed",
              "failed",
              "cancelled"
            ],
            "description": "任务当前状态。"
          },
          "progress": {
            "$ref": "#/components/schemas/StatusPageMigrationProgress",
            "description": "按实体类型的进度计数。"
          },
          "error": {
            "type": "string",
            "description": "`status` 为 `failed` 时的终态错误信息。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "任务创建时间（Unix 秒）。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "任务最近一次状态更新时间（Unix 秒）。"
          }
        }
      },
      "StatusPageMigrationProgress": {
        "type": "object",
        "description": "迁移任务的进度计数。",
        "required": [
          "total_steps",
          "completed_steps",
          "components_imported",
          "sections_imported",
          "incidents_imported",
          "maintenances_imported",
          "subscribers_imported",
          "templates_imported",
          "subscribers_skipped"
        ],
        "properties": {
          "total_steps": {
            "type": "integer",
            "description": "任务包含的总步骤数。"
          },
          "completed_steps": {
            "type": "integer",
            "description": "已完成的步骤数。"
          },
          "components_imported": {
            "type": "integer"
          },
          "sections_imported": {
            "type": "integer"
          },
          "incidents_imported": {
            "type": "integer"
          },
          "maintenances_imported": {
            "type": "integer"
          },
          "subscribers_imported": {
            "type": "integer"
          },
          "templates_imported": {
            "type": "integer"
          },
          "subscribers_skipped": {
            "type": "integer",
            "description": "跳过的订阅者数量（例如重复）。"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "任务执行过程中记录的非致命警告。"
          }
        }
      },
      "CancelStatusPageMigrationRequest": {
        "type": "object",
        "description": "取消进行中迁移任务所需的参数。",
        "required": [
          "job_id"
        ],
        "properties": {
          "job_id": {
            "type": "string",
            "description": "迁移任务 ID。"
          }
        }
      },
      "CreateStatusPageChangeRequest": {
        "type": "object",
        "description": "创建状态页故障或维护事件所需的参数。首条更新必须包含 `component_changes` 以声明受影响组件;回溯事件至少需要 2 条更新。",
        "required": [
          "page_id",
          "type",
          "title",
          "status",
          "updates"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "状态页 ID。"
          },
          "type": {
            "type": "string",
            "enum": [
              "incident",
              "maintenance"
            ],
            "description": "事件类型。"
          },
          "title": {
            "type": "string",
            "maxLength": 255,
            "description": "事件标题,最多 255 个字符。"
          },
          "description": {
            "type": "string",
            "description": "事件描述(支持 Markdown),必填。"
          },
          "status": {
            "type": "string",
            "enum": [
              "investigating",
              "identified",
              "monitoring",
              "resolved",
              "scheduled",
              "ongoing",
              "completed"
            ],
            "description": "事件初始状态。故障事件支持 `investigating`/`identified`/`monitoring`/`resolved`;维护事件支持 `scheduled`/`ongoing`/`completed`。"
          },
          "start_at_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "事件开始时间(Unix 秒)。留空时默认为当前时间。"
          },
          "responders": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "事件负责成员 ID 列表。"
          },
          "linked_changes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "关联的事件 ID 列表(相关故障、发布等)。"
          },
          "close_at_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "回溯事件的结束时间,需大于 `start_at_seconds`。"
          },
          "updates": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "时间线更新条目。",
              "properties": {
                "update_id": {
                  "type": "string",
                  "description": "更新 ID。创建时由服务端生成;回溯历史更新时可手动指定。"
                },
                "at_seconds": {
                  "type": "integer",
                  "format": "int64",
                  "description": "更新时间戳(Unix 秒)。"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "investigating",
                    "identified",
                    "monitoring",
                    "resolved",
                    "scheduled",
                    "ongoing",
                    "completed"
                  ],
                  "description": "更新后的事件状态。若整体状态未变化可省略。"
                },
                "description": {
                  "type": "string",
                  "description": "更新说明(支持 Markdown)。"
                },
                "component_changes": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "component_id",
                      "status"
                    ],
                    "properties": {
                      "component_id": {
                        "type": "string",
                        "description": "组件 ID。"
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "operational",
                          "degraded",
                          "partial_outage",
                          "full_outage",
                          "under_maintenance"
                        ],
                        "description": "组件新状态。故障事件支持 `operational`/`degraded`/`partial_outage`/`full_outage`;维护事件支持 `operational`/`under_maintenance`。"
                      }
                    }
                  },
                  "description": "本次更新应用的组件状态变更。"
                }
              }
            },
            "description": "时间线更新列表。即时事件一般只传一条;回溯事件需传入全部历史更新。"
          },
          "notify_subscribers": {
            "type": "boolean",
            "description": "是否通知订阅者本事件及其所有更新。"
          },
          "auto_update_by_schedule": {
            "type": "boolean",
            "description": "仅维护事件:根据计划窗口自动推进状态。"
          },
          "is_retrospective": {
            "type": "boolean",
            "description": "标记为回溯(历史)事件。"
          }
        }
      },
      "CreateStatusPageChangeTimelineRequest": {
        "type": "object",
        "description": "向状态页事件时间线追加一条更新所需的参数。",
        "required": [
          "page_id",
          "change_id",
          "status"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "状态页 ID。"
          },
          "change_id": {
            "type": "integer",
            "format": "int64",
            "description": "目标事件 ID。"
          },
          "at_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "更新时间戳(Unix 秒),留空时默认为当前时间。"
          },
          "status": {
            "type": "string",
            "enum": [
              "investigating",
              "identified",
              "monitoring",
              "resolved",
              "scheduled",
              "ongoing",
              "completed"
            ],
            "description": "更新后的事件状态,需与事件类型匹配。当状态切换为 `resolved` 或 `completed` 时,所有关联组件必须恢复为 `operational`。"
          },
          "description": {
            "type": "string",
            "description": "更新说明(支持 Markdown),必填。"
          },
          "component_changes": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "component_id",
                "status"
              ],
              "properties": {
                "component_id": {
                  "type": "string",
                  "description": "组件 ID。"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "operational",
                    "degraded",
                    "partial_outage",
                    "full_outage",
                    "under_maintenance"
                  ],
                  "description": "组件新状态。故障事件支持 `operational`/`degraded`/`partial_outage`/`full_outage`;维护事件支持 `operational`/`under_maintenance`。"
                }
              }
            },
            "description": "本次更新应用的组件状态变更。组件 ID 不能重复。"
          }
        }
      },
      "RuleListRequest": {
        "type": "object",
        "description": "按文件夹查询规则的过滤参数。",
        "properties": {
          "folder_id": {
            "type": "integer",
            "format": "uint64",
            "description": "文件夹 ID，设为 0 可列出所有可访问规则。"
          }
        }
      },
      "AlertRuleBasic": {
        "type": "object",
        "description": "列表视图用的告警规则基础信息。",
        "required": [
          "id",
          "account_id",
          "folder_id",
          "name",
          "ds_type",
          "enabled",
          "debug_log_enabled",
          "cron_pattern",
          "delay_seconds",
          "creator_id",
          "creator_name",
          "updater_id",
          "updater_name",
          "created_at",
          "updated_at",
          "triggered"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "唯一规则 ID。"
          },
          "account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "账户 ID。"
          },
          "folder_id": {
            "type": "integer",
            "format": "uint64",
            "description": "文件夹 ID。"
          },
          "name": {
            "type": "string",
            "description": "规则名称。"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "自定义标签。"
          },
          "ds_type": {
            "type": "string",
            "description": "数据源类型，如 `prometheus`。"
          },
          "enabled": {
            "type": "boolean",
            "description": "规则是否启用。"
          },
          "debug_log_enabled": {
            "type": "boolean",
            "description": "是否启用调试日志。"
          },
          "cron_pattern": {
            "type": "string",
            "description": "5 字段 cron 调度，如 `* * * * *`。"
          },
          "delay_seconds": {
            "type": "integer",
            "description": "评估延迟（秒）。"
          },
          "creator_id": {
            "type": "integer",
            "format": "uint64"
          },
          "creator_name": {
            "type": "string"
          },
          "updater_id": {
            "type": "integer",
            "format": "uint64"
          },
          "updater_name": {
            "type": "string"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "triggered": {
            "type": "boolean",
            "description": "是否有当前活跃告警。"
          }
        }
      },
      "RuleBasicListResponse": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/AlertRuleBasic"
        },
        "description": "告警规则基础信息列表。"
      },
      "RuleConfigs": {
        "type": "object",
        "description": "规则评估配置。",
        "properties": {
          "queries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "查询标识符（字母，如 `A`）。`R` 为保留名称，不可使用。"
                },
                "expr": {
                  "type": "string",
                  "description": "查询表达式。"
                },
                "label_fields": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "value_fields": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "args": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "relate_queries": {
            "type": "array",
            "description": "可选的辅助查询，其结果作为上下文附加到告警事件中。每项须有唯一的 `name`（不与任何 query 名称重复）且 `expr` 非空。",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "辅助查询标识符。"
                },
                "expr": {
                  "type": "string",
                  "description": "查询表达式。"
                },
                "args": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "check_threshold": {
            "type": "object",
            "description": "阈值检查配置。",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "alerting_check_times": {
                "type": "integer"
              },
              "recovery_check_times": {
                "type": "integer"
              },
              "push_recovery_event": {
                "type": "boolean"
              },
              "critical": {
                "type": "string"
              },
              "warning": {
                "type": "string"
              },
              "info": {
                "type": "string"
              },
              "recovery": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "invert",
                      "threshold",
                      "ql"
                    ]
                  },
                  "condition": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "check_anydata": {
            "type": "object",
            "description": "有数据检查配置。查询返回任意数据行时触发告警。",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "alerting_check_times": {
                "type": "integer"
              },
              "recovery_check_times": {
                "type": "integer"
              },
              "push_recovery_event": {
                "type": "boolean"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "Critical",
                  "Warning",
                  "Info"
                ]
              },
              "recovery": {
                "type": "object",
                "description": "有数据检查的恢复条件。省略或 `mode` 为空时按 `nodata` 处理。",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "nodata",
                      "ql"
                    ],
                    "description": "`nodata` = 查询无数据时恢复；`ql` = `condition` 表达式为真时恢复。`mode` 为 `ql` 时，仅允许单个查询（`name=A`）。"
                  },
                  "condition": {
                    "type": "string",
                    "description": "恢复表达式，`mode` 为 `ql` 时必填。"
                  },
                  "args": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "check_nodata": {
            "type": "object",
            "description": "无数据检查配置。",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "alerting_check_times": {
                "type": "integer"
              },
              "recovery_check_times": {
                "type": "integer"
              },
              "push_recovery_event": {
                "type": "boolean"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "Critical",
                  "Warning",
                  "Info"
                ]
              },
              "resolve_timeout": {
                "type": "integer",
                "description": "自动恢复等待时间（秒）。"
              }
            }
          }
        }
      },
      "AlertRule": {
        "type": "object",
        "description": "完整的告警规则配置。",
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64"
          },
          "account_id": {
            "type": "integer",
            "format": "uint64"
          },
          "folder_id": {
            "type": "integer",
            "format": "uint64",
            "description": "规则所属文件夹。"
          },
          "name": {
            "type": "string",
            "description": "规则名称。"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "自定义标签。"
          },
          "ds_type": {
            "type": "string",
            "description": "数据源类型。"
          },
          "ds_list": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "数据源名称模式（支持通配符）。"
          },
          "ds_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "具体数据源 ID 列表。"
          },
          "enabled": {
            "type": "boolean"
          },
          "debug_log_enabled": {
            "type": "boolean"
          },
          "rule_configs": {
            "$ref": "#/components/schemas/RuleConfigs"
          },
          "cron_pattern": {
            "type": "string",
            "description": "5 字段 cron 调度。"
          },
          "delay_seconds": {
            "type": "integer"
          },
          "enabled_times": {
            "type": "array",
            "description": "规则生效的时间窗口。",
            "items": {
              "type": "object",
              "properties": {
                "days": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  },
                  "description": "星期几（0=周日）。"
                },
                "stime": {
                  "type": "string",
                  "description": "开始时间，如 `09:00`。"
                },
                "etime": {
                  "type": "string",
                  "description": "结束时间，如 `18:00`。"
                }
              }
            }
          },
          "annotations": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "description_type": {
            "type": "string",
            "enum": [
              "text",
              "markdown"
            ]
          },
          "description": {
            "type": "string"
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "告警发送到的协作空间 ID 列表。"
          },
          "repeat_interval": {
            "type": "integer",
            "format": "int64",
            "description": "通知重复间隔（秒）。"
          },
          "repeat_total": {
            "type": "integer",
            "format": "int64",
            "description": "最大重复通知次数。"
          },
          "creator_id": {
            "type": "integer",
            "format": "uint64"
          },
          "creator_name": {
            "type": "string"
          },
          "updater_id": {
            "type": "integer",
            "format": "uint64"
          },
          "updater_name": {
            "type": "string"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "AlertRuleInfoResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AlertRule"
          }
        ],
        "description": "info 接口返回的完整告警规则，服务端赋值字段均保证存在。",
        "required": [
          "id",
          "account_id",
          "folder_id",
          "name",
          "ds_type",
          "enabled",
          "debug_log_enabled",
          "cron_pattern",
          "delay_seconds",
          "creator_id",
          "creator_name",
          "updater_id",
          "updater_name",
          "created_at",
          "updated_at"
        ]
      },
      "RuleIDRequest": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "规则 ID。"
          }
        }
      },
      "AuditRecordIDRequest": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "审计记录 ID——来自 `POST /monit/rule/audits` 返回行的 `id`，不是规则 ID。传规则 ID 会返回 HTTP 400。"
          }
        }
      },
      "RuleIDsRequest": {
        "type": "object",
        "required": [
          "ids"
        ],
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "规则 ID 列表。"
          }
        }
      },
      "RuleEmptyRequest": {
        "type": "object",
        "description": "不需要任何参数。",
        "additionalProperties": false
      },
      "RuleEmptyResponse": {
        "type": "object",
        "description": "成功时返回空对象。",
        "additionalProperties": false
      },
      "RuleFolderIDRequest": {
        "type": "object",
        "properties": {
          "folder_id": {
            "type": "integer",
            "format": "uint64",
            "description": "文件夹 ID，0 表示所有。"
          }
        }
      },
      "RuleFieldsUpdateRequest": {
        "type": "object",
        "required": [
          "ids",
          "fields"
        ],
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "要更新的规则 ID 列表。"
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "要更新的字段名列表。"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "ds_type": {
            "type": "string"
          },
          "ds_list": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "ds_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            }
          },
          "enabled": {
            "type": "boolean"
          },
          "debug_log_enabled": {
            "type": "boolean"
          },
          "cron_pattern": {
            "type": "string"
          },
          "delay_seconds": {
            "type": "integer"
          },
          "enabled_times": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnabledTime"
            }
          },
          "annotations": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "description": {
            "type": "string"
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            }
          },
          "repeat_interval": {
            "type": "integer",
            "format": "int64"
          },
          "repeat_total": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "RuleMoveRequest": {
        "type": "object",
        "required": [
          "ids",
          "dest_folder_id"
        ],
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "要移动的规则 ID 列表。"
          },
          "dest_folder_id": {
            "type": "integer",
            "format": "uint64",
            "description": "目标文件夹 ID。"
          }
        }
      },
      "RuleImportRequest": {
        "type": "array",
        "description": "要导入的告警规则导出对象数组。",
        "items": {
          "$ref": "#/components/schemas/AlertRule"
        }
      },
      "RuleImportResponse": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/NameMessage"
        },
        "description": "每条规则的导入结果。"
      },
      "AlertRuleStatus": {
        "type": "object",
        "description": "文件夹节点的规则触发状态。",
        "required": [
          "folder_id",
          "rule_total",
          "triggered_rule_count"
        ],
        "properties": {
          "folder_id": {
            "type": "integer",
            "format": "uint64"
          },
          "folder_name": {
            "type": "string"
          },
          "rule_total": {
            "type": "integer",
            "format": "int64",
            "description": "文件夹家族内规则总数。"
          },
          "triggered_rule_count": {
            "type": "integer",
            "format": "int64",
            "description": "有活跃告警的规则数量。"
          }
        }
      },
      "RuleStatusResponse": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/AlertRuleStatus"
        }
      },
      "AlertRuleAudit": {
        "type": "object",
        "description": "审计记录，保存某一时刻的规则快照。",
        "required": [
          "id",
          "account_id",
          "alert_rule_id",
          "action",
          "creator_id",
          "creator_name",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "审计记录 ID。"
          },
          "account_id": {
            "type": "integer",
            "format": "uint64"
          },
          "alert_rule_id": {
            "type": "integer",
            "format": "uint64",
            "description": "关联的告警规则 ID。"
          },
          "action": {
            "type": "string",
            "description": "操作类型，如 `create`、`update`。"
          },
          "content": {
            "type": "string",
            "description": "审计时刻规则完整配置的 JSON 字符串，仅在 `/monit/rule/audit/detail` 返回，列表接口中省略。"
          },
          "creator_id": {
            "type": "integer",
            "format": "uint64"
          },
          "creator_name": {
            "type": "string"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "RuleAuditListResponse": {
        "type": "array",
        "description": "按创建时间倒序排列的规则审计记录列表，不含 `content` 字段。",
        "items": {
          "$ref": "#/components/schemas/AlertRuleAudit"
        }
      },
      "DSType": {
        "type": "object",
        "description": "告警规则可使用的数据源类型定义。",
        "required": [
          "id",
          "name",
          "ident",
          "account_id",
          "weight"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64"
          },
          "name": {
            "type": "string",
            "description": "显示名称，如 `Prometheus`。"
          },
          "ident": {
            "type": "string",
            "description": "作为规则 `ds_type` 的标识符，如 `prometheus`。"
          },
          "account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "所属账户 ID；`0` 表示全局类型。"
          },
          "weight": {
            "type": "integer",
            "description": "排序权重，值越大越靠前。"
          }
        }
      },
      "RuleDsTypesResponse": {
        "type": "array",
        "description": "当前账户可使用的数据源类型列表，包括全局类型和账户自定义类型。",
        "items": {
          "$ref": "#/components/schemas/DSType"
        }
      },
      "AlertRuleCounter": {
        "type": "object",
        "description": "账户规则总数的一次历史快照。",
        "required": [
          "id",
          "account_id",
          "num",
          "clock"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64"
          },
          "account_id": {
            "type": "integer",
            "format": "uint64"
          },
          "num": {
            "type": "integer",
            "format": "int64",
            "description": "该时间点的规则数量。"
          },
          "clock": {
            "type": "integer",
            "format": "int64",
            "description": "采样时间戳（Unix 秒）。"
          }
        }
      },
      "RuleCounterTotalResponse": {
        "type": "array",
        "description": "按 `clock` 升序排列的规则数量历史采样。",
        "items": {
          "$ref": "#/components/schemas/AlertRuleCounter"
        }
      },
      "RuleCounterNodeResponse": {
        "type": "object",
        "description": "顶层文件夹名称到规则数量的映射。",
        "additionalProperties": {
          "type": "integer",
          "format": "int64"
        }
      },
      "RuleCounterChannelResponse": {
        "type": "object",
        "description": "协作空间名称到规则数量的映射，无法解析的协作空间以其 ID 的字符串形式作为 key。",
        "additionalProperties": {
          "type": "integer",
          "format": "int64"
        }
      },
      "NameMessage": {
        "type": "object",
        "description": "批量规则操作中，单条规则的处理结果。",
        "required": [
          "name",
          "message"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "规则名称。"
          },
          "message": {
            "type": "string",
            "description": "成功时为空，失败时为错误信息。"
          }
        }
      },
      "RuleNameMessageListResponse": {
        "type": "array",
        "description": "批量规则操作中每条规则的处理结果列表。",
        "items": {
          "$ref": "#/components/schemas/NameMessage"
        }
      },
      "AlertRuleExport": {
        "type": "object",
        "description": "用于导入/导出的便携告警规则表示，省略 `id`、`account_id` 等标识字段与审计元数据。",
        "required": [
          "name",
          "ds_type",
          "enabled",
          "debug_log_enabled",
          "cron_pattern"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "ds_type": {
            "type": "string"
          },
          "ds_list": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "ds_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            }
          },
          "enabled": {
            "type": "boolean"
          },
          "debug_log_enabled": {
            "type": "boolean"
          },
          "rule_configs": {
            "$ref": "#/components/schemas/RuleConfigs"
          },
          "cron_pattern": {
            "type": "string"
          },
          "delay_seconds": {
            "type": "integer"
          },
          "enabled_times": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnabledTime"
            }
          },
          "annotations": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "description_type": {
            "type": "string",
            "enum": [
              "text",
              "markdown"
            ]
          },
          "description": {
            "type": "string"
          },
          "repeat_interval": {
            "type": "integer",
            "format": "int64"
          },
          "repeat_total": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "AlertRuleExportListResponse": {
        "type": "array",
        "description": "导出的规则配置列表，兼容 `POST /monit/rule/import`。",
        "items": {
          "$ref": "#/components/schemas/AlertRuleExport"
        }
      },
      "EnabledTime": {
        "type": "object",
        "description": "规则激活时间窗口。",
        "properties": {
          "days": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "星期几，0 = 周日。"
          },
          "stime": {
            "type": "string",
            "description": "起始时间，如 `09:00`。"
          },
          "etime": {
            "type": "string",
            "description": "结束时间，如 `18:00`。"
          }
        }
      },
      "DataSourceListRequest": {
        "type": "object",
        "description": "查询数据源列表的过滤参数。",
        "properties": {
          "type": {
            "type": "string",
            "description": "按数据源类型过滤，省略则返回所有类型。可选值：`prometheus`、`loki`、`mysql`、`oracle`、`postgres`、`clickhouse`、`elasticsearch`、`sls`、`victorialogs`。"
          }
        }
      },
      "DSPayload": {
        "type": "object",
        "description": "与类型相关的数据源配置，仅包含与 `type_ident` 匹配的配置块。",
        "properties": {
          "prometheus": {
            "$ref": "#/components/schemas/DSPrometheusConfig"
          },
          "loki": {
            "$ref": "#/components/schemas/DSLokiConfig"
          },
          "mysql": {
            "$ref": "#/components/schemas/DSMySQLConfig"
          },
          "oracle": {
            "$ref": "#/components/schemas/DSOracleConfig"
          },
          "postgres": {
            "$ref": "#/components/schemas/DSPostgresConfig"
          },
          "clickhouse": {
            "$ref": "#/components/schemas/DSClickHouseConfig"
          },
          "elasticsearch": {
            "$ref": "#/components/schemas/DSElasticSearchConfig"
          },
          "sls": {
            "$ref": "#/components/schemas/DSSLSConfig"
          },
          "victorialogs": {
            "$ref": "#/components/schemas/DSVictoriaLogsConfig"
          }
        }
      },
      "DSPrometheusConfig": {
        "type": "object",
        "description": "Prometheus 数据源配置，TLS 字段继承自 TLSClientConfig。",
        "properties": {
          "basic_auth_enabled": {
            "type": "boolean",
            "description": "启用 HTTP Basic 认证。"
          },
          "basic_auth_username": {
            "type": "string",
            "description": "Basic 认证用户名。"
          },
          "basic_auth_password": {
            "type": "string",
            "description": "Basic 认证密码。"
          },
          "headers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "自定义 HTTP 请求头，格式为 `Key: Value`。"
          },
          "params": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "自定义查询参数，格式为 `key=value`。"
          },
          "tls_ca": {
            "type": "string"
          },
          "tls_cert": {
            "type": "string"
          },
          "tls_key": {
            "type": "string"
          },
          "tls_key_pwd": {
            "type": "string"
          },
          "tls_skip_verify": {
            "type": "boolean"
          },
          "tls_server_name": {
            "type": "string"
          },
          "tls_min_version": {
            "type": "string"
          },
          "tls_max_version": {
            "type": "string"
          }
        }
      },
      "DSLokiConfig": {
        "type": "object",
        "description": "Loki 数据源配置，TLS 字段继承自 TLSClientConfig。",
        "properties": {
          "basic_auth_enabled": {
            "type": "boolean"
          },
          "basic_auth_username": {
            "type": "string"
          },
          "basic_auth_password": {
            "type": "string"
          },
          "headers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "params": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tls_ca": {
            "type": "string"
          },
          "tls_cert": {
            "type": "string"
          },
          "tls_key": {
            "type": "string"
          },
          "tls_key_pwd": {
            "type": "string"
          },
          "tls_skip_verify": {
            "type": "boolean"
          },
          "tls_server_name": {
            "type": "string"
          },
          "tls_min_version": {
            "type": "string"
          },
          "tls_max_version": {
            "type": "string"
          }
        }
      },
      "DSMySQLConfig": {
        "type": "object",
        "description": "MySQL 数据源配置，TLS 字段继承自 TLSClientConfig。",
        "properties": {
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "open_conns": {
            "type": "integer",
            "description": "最大打开连接数。"
          },
          "idle_conns": {
            "type": "integer",
            "description": "最大空闲连接数。"
          },
          "lifetime_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "连接最大生命周期（秒）。"
          },
          "timeout_mills": {
            "type": "integer",
            "format": "int64",
            "description": "查询超时时间（毫秒）。"
          },
          "tls_ca": {
            "type": "string"
          },
          "tls_cert": {
            "type": "string"
          },
          "tls_key": {
            "type": "string"
          },
          "tls_key_pwd": {
            "type": "string"
          },
          "tls_skip_verify": {
            "type": "boolean"
          },
          "tls_server_name": {
            "type": "string"
          },
          "tls_min_version": {
            "type": "string"
          },
          "tls_max_version": {
            "type": "string"
          }
        }
      },
      "DSOracleConfig": {
        "type": "object",
        "description": "Oracle 数据源配置。",
        "properties": {
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "options": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "额外连接参数（键值对）。"
          },
          "open_conns": {
            "type": "integer"
          },
          "idle_conns": {
            "type": "integer"
          },
          "lifetime_seconds": {
            "type": "integer",
            "format": "int64"
          },
          "timeout_mills": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "DSPostgresConfig": {
        "type": "object",
        "description": "PostgreSQL 数据源配置。",
        "properties": {
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "open_conns": {
            "type": "integer"
          },
          "idle_conns": {
            "type": "integer"
          },
          "lifetime_seconds": {
            "type": "integer",
            "format": "int64"
          },
          "timeout_mills": {
            "type": "integer",
            "format": "int64"
          },
          "tls_ca": {
            "type": "string"
          },
          "tls_cert": {
            "type": "string"
          },
          "tls_key": {
            "type": "string"
          }
        }
      },
      "DSClickHouseConfig": {
        "type": "object",
        "description": "ClickHouse 数据源配置，TLS 字段继承自 TLSClientConfig。",
        "properties": {
          "database": {
            "type": "string",
            "description": "认证用默认数据库。"
          },
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "open_conns": {
            "type": "integer"
          },
          "idle_conns": {
            "type": "integer"
          },
          "lifetime_seconds": {
            "type": "integer",
            "format": "int64"
          },
          "timeout_mills": {
            "type": "integer",
            "format": "int64"
          },
          "max_execution_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "最大查询执行时间（秒）。"
          },
          "dial_timeout_mills": {
            "type": "integer",
            "format": "int64",
            "description": "拨号超时（毫秒）。"
          },
          "tls_enabled": {
            "type": "boolean"
          },
          "tls_ca": {
            "type": "string"
          },
          "tls_cert": {
            "type": "string"
          },
          "tls_key": {
            "type": "string"
          },
          "tls_key_pwd": {
            "type": "string"
          },
          "tls_skip_verify": {
            "type": "boolean"
          },
          "tls_server_name": {
            "type": "string"
          },
          "tls_min_version": {
            "type": "string"
          },
          "tls_max_version": {
            "type": "string"
          }
        }
      },
      "DSElasticSearchConfig": {
        "type": "object",
        "description": "Elasticsearch 数据源配置。",
        "properties": {
          "deployment": {
            "type": "string",
            "enum": [
              "cloud",
              "self-managed"
            ],
            "description": "部署类型。`cloud` 使用 Elastic Cloud；`self-managed` 使用自托管集群。"
          },
          "timeout_mills": {
            "type": "integer",
            "format": "int64"
          },
          "cloud_id": {
            "type": "string",
            "description": "Elastic Cloud 部署 ID，仅用于 `cloud` 部署。"
          },
          "api_key": {
            "type": "string",
            "description": "Elastic Cloud API 密钥，仅用于 `cloud` 部署。"
          },
          "username": {
            "type": "string",
            "description": "`self-managed` 部署的用户名。"
          },
          "password": {
            "type": "string"
          },
          "service_token": {
            "type": "string",
            "description": "服务令牌，若设置则覆盖用户名/密码认证。"
          },
          "tls_ca": {
            "type": "string"
          },
          "certificate_fingerprint": {
            "type": "string"
          },
          "headers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "DSSLSConfig": {
        "type": "object",
        "description": "阿里云日志服务（SLS）数据源配置。",
        "properties": {
          "access_key_id": {
            "type": "string",
            "description": "阿里云 Access Key ID。"
          },
          "access_key_secret": {
            "type": "string",
            "description": "阿里云 Access Key Secret。"
          },
          "headers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "自定义 HTTP 请求头。"
          }
        }
      },
      "DSVictoriaLogsConfig": {
        "type": "object",
        "description": "VictoriaLogs 数据源配置，TLS 字段继承自 TLSClientConfig。",
        "properties": {
          "basic_auth_enabled": {
            "type": "boolean"
          },
          "basic_auth_username": {
            "type": "string"
          },
          "basic_auth_password": {
            "type": "string"
          },
          "headers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "params": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tls_ca": {
            "type": "string"
          },
          "tls_cert": {
            "type": "string"
          },
          "tls_key": {
            "type": "string"
          },
          "tls_key_pwd": {
            "type": "string"
          },
          "tls_skip_verify": {
            "type": "boolean"
          },
          "tls_server_name": {
            "type": "string"
          },
          "tls_min_version": {
            "type": "string"
          },
          "tls_max_version": {
            "type": "string"
          }
        }
      },
      "DataSourceItem": {
        "type": "object",
        "description": "单个监控数据源。",
        "required": [
          "id",
          "account_id",
          "type_ident",
          "name",
          "enabled",
          "note",
          "address",
          "edge_cluster_name",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "唯一数据源 ID。"
          },
          "account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "账户 ID。"
          },
          "type_ident": {
            "type": "string",
            "description": "数据源类型标识，可选值：`prometheus`、`loki`、`mysql`、`oracle`、`postgres`、`clickhouse`、`elasticsearch`、`sls`、`victorialogs`。"
          },
          "name": {
            "type": "string",
            "description": "数据源显示名称。"
          },
          "enabled": {
            "type": "boolean",
            "description": "数据源是否启用。"
          },
          "note": {
            "type": "string",
            "description": "可选描述。"
          },
          "address": {
            "type": "string",
            "description": "连接地址。Prometheus/Loki/VictoriaLogs 为 HTTP URL；MySQL/Oracle/Postgres/ClickHouse 为 `host:port`；SLS 为不含 http/https 前缀的 endpoint。"
          },
          "payload": {
            "$ref": "#/components/schemas/DSPayload"
          },
          "edge_cluster_name": {
            "type": "string",
            "description": "负责使用该数据源评估规则的 Monitors Edge 集群名称。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最后更新时间，Unix 时间戳（秒）。"
          }
        }
      },
      "DataSourceUpsertRequest": {
        "type": "object",
        "description": "创建或更新数据源的请求体。`id` 仅在更新时必填。`address` 除 Elasticsearch `deployment=cloud` 外均为必填。",
        "required": [
          "type_ident",
          "name",
          "edge_cluster_name",
          "payload"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "数据源 ID。更新时必填，创建时省略。"
          },
          "type_ident": {
            "type": "string",
            "description": "数据源类型标识，可选值：`prometheus`、`loki`、`mysql`、`oracle`、`postgres`、`clickhouse`、`elasticsearch`、`sls`、`victorialogs`。"
          },
          "name": {
            "type": "string",
            "description": "数据源显示名称。"
          },
          "note": {
            "type": "string",
            "description": "可选描述。"
          },
          "address": {
            "type": "string",
            "description": "连接地址。Prometheus/Loki/VictoriaLogs 为 HTTP URL；MySQL/Oracle/Postgres/ClickHouse 为 `host:port`；SLS 为不含 http/https 前缀的 endpoint；Elasticsearch cloud 部署无需填写。"
          },
          "payload": {
            "$ref": "#/components/schemas/DSPayload",
            "description": "类型相关配置块，必须包含与 `type_ident` 匹配的键。"
          },
          "edge_cluster_name": {
            "type": "string",
            "description": "负责使用该数据源评估规则的 Monitors Edge 集群名称。"
          }
        }
      },
      "DataSourceListResponse": {
        "type": "array",
        "description": "数据源列表，不含敏感凭证字段。",
        "items": {
          "$ref": "#/components/schemas/DataSourceItem"
        }
      },
      "IDRequest": {
        "type": "object",
        "required": [
          "id"
        ],
        "description": "包含单个数字 ID 的请求。",
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "资源 ID。"
          }
        }
      },
      "SLSProjectsRequest": {
        "type": "object",
        "description": "查询 SLS 项目列表的参数。",
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "SLS 数据源 ID。"
          },
          "query": {
            "type": "string",
            "description": "名称前缀过滤。"
          },
          "offset": {
            "type": "integer",
            "description": "分页偏移量。"
          },
          "size": {
            "type": "integer",
            "description": "每页大小。"
          }
        }
      },
      "SLSProjectsResponse": {
        "type": "array",
        "description": "SLS 项目名称列表。",
        "items": {
          "type": "string"
        }
      },
      "SLSLogstoresRequest": {
        "type": "object",
        "description": "查询 SLS 日志库列表的参数。",
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "SLS 数据源 ID。"
          },
          "project": {
            "type": "string",
            "description": "SLS 项目名称。"
          },
          "offset": {
            "type": "integer",
            "description": "分页偏移量。"
          },
          "size": {
            "type": "integer",
            "description": "每页大小。"
          }
        }
      },
      "SLSLogstoresResponse": {
        "type": "array",
        "description": "SLS 日志库名称列表。",
        "items": {
          "type": "string"
        }
      },
      "StoreRulesetUpsertRequest": {
        "type": "object",
        "description": "创建规则集的请求体，所有字段均经服务端 `Validate()` 校验。",
        "required": [
          "type_ident",
          "note",
          "payload"
        ],
        "properties": {
          "type_ident": {
            "type": "string",
            "description": "该规则集适用的数据源类型标识符，如 `prometheus`。"
          },
          "note": {
            "type": "string",
            "description": "规则集描述或标题。"
          },
          "open_flag": {
            "type": "integer",
            "enum": [
              0,
              1,
              2
            ],
            "description": "共享范围：`0` 仅创建者可见，`1` 账户内共享，`2` 公开。省略时默认为 `0`。"
          },
          "payload": {
            "type": "string",
            "description": "包含告警规则定义的 JSON 字符串。"
          }
        }
      },
      "StoreRulesetItem": {
        "type": "object",
        "description": "单个规则仓库规则集。",
        "required": [
          "id",
          "type_ident",
          "note",
          "open_flag",
          "creator_account_id",
          "creator_id",
          "creator_name",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "规则集 ID。"
          },
          "type_ident": {
            "type": "string",
            "description": "该规则集适用的数据源类型标识符。"
          },
          "note": {
            "type": "string",
            "description": "规则集描述或标题。"
          },
          "open_flag": {
            "type": "integer",
            "enum": [
              0,
              1,
              2
            ],
            "description": "共享范围：`0` 仅创建者可见，`1` 账户内共享，`2` 公开。"
          },
          "payload": {
            "type": "string",
            "description": "包含告警规则定义的 JSON 字符串，列表接口中省略。"
          },
          "creator_account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "创建者的账户 ID。"
          },
          "creator_id": {
            "type": "integer",
            "format": "uint64",
            "description": "创建者的成员 ID。"
          },
          "creator_name": {
            "type": "string",
            "description": "创建者显示名称。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间，Unix 时间戳（秒）。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最后更新时间，Unix 时间戳（秒）。"
          }
        }
      },
      "StoreRulesetListRequest": {
        "type": "object",
        "required": [
          "type_ident"
        ],
        "description": "按数据源类型过滤规则集。",
        "properties": {
          "type_ident": {
            "type": "string",
            "description": "数据源类型标识符，如 `prometheus`。"
          }
        }
      },
      "StoreRulesetListResponse": {
        "type": "array",
        "description": "当前用户有权访问的规则集列表，不含 `payload` 字段。",
        "items": {
          "$ref": "#/components/schemas/StoreRulesetItem"
        }
      },
      "StoreRulesetUpdateRequest": {
        "type": "object",
        "required": [
          "id",
          "note",
          "payload"
        ],
        "description": "更新规则集的参数。",
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "要更新的规则集 ID。"
          },
          "note": {
            "type": "string",
            "description": "新的描述。"
          },
          "open_flag": {
            "type": "integer",
            "enum": [
              0,
              1,
              2
            ],
            "description": "新的共享范围：`0` 仅创建者，`1` 账户共享，`2` 公开。"
          },
          "payload": {
            "type": "string",
            "description": "新的告警规则定义 JSON 字符串。"
          }
        }
      },
      "RumApplicationListRequest": {
        "type": "object",
        "description": "查询 RUM 应用列表的过滤参数。",
        "properties": {
          "p": {
            "type": "integer",
            "description": "页码（从 1 开始），默认 1。"
          },
          "limit": {
            "type": "integer",
            "description": "每页条数，范围 1–100，默认 20。"
          },
          "orderby": {
            "type": "string",
            "enum": [
              "created_at",
              "updated_at"
            ],
            "description": "排序字段。"
          },
          "asc": {
            "type": "boolean",
            "description": "为 `true` 时升序排列。"
          },
          "query": {
            "type": "string",
            "description": "按应用名称搜索。"
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "按团队 ID 过滤。"
          },
          "is_my_team": {
            "type": "boolean",
            "description": "为 `true` 时仅返回当前用户所在团队的应用。"
          }
        }
      },
      "RumApplicationAlerting": {
        "type": "object",
        "description": "应用的告警配置。",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "是否启用告警。"
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "接收告警的协作空间 ID 列表。"
          },
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "关联的 On-call 集成 ID（只读，自动分配）。"
          }
        }
      },
      "RumApplicationLink": {
        "type": "object",
        "description": "在匹配的 RUM 事件详情页展示的外部系统链接。",
        "required": [
          "name",
          "url",
          "event_types"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "外部系统的稳定客户端标识。"
          },
          "name": {
            "type": "string",
            "description": "外部系统显示名称。"
          },
          "icon_text": {
            "type": "string",
            "description": "链接图标中显示的短文本。"
          },
          "icon_color": {
            "type": "string",
            "description": "链接图标显示颜色。"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "HTTP 或 HTTPS URL 模板，`${var}` 变量会根据 RUM 事件上下文解析。"
          },
          "event_types": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "crash",
                "error",
                "view",
                "action",
                "resource",
                "session",
                "all"
              ]
            },
            "description": "展示该外部系统链接的 RUM 事件类型。"
          },
          "enabled": {
            "type": "boolean",
            "description": "是否启用该外部系统链接。"
          }
        }
      },
      "RumApplicationLinks": {
        "type": "object",
        "description": "应用的外部链接集成配置。",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "是否启用外部链接集成。"
          },
          "systems": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/RumApplicationLink"
            },
            "description": "可从匹配 RUM 事件打开的外部系统 URL 模板列表。"
          }
        }
      },
      "RumApplicationTracing": {
        "type": "object",
        "description": "APM 链路追踪集成配置。",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "是否启用链路追踪集成。"
          },
          "open_type": {
            "type": "string",
            "enum": [
              "popup",
              "tab"
            ],
            "description": "链路链接的打开方式。"
          },
          "endpoint": {
            "type": "string",
            "description": "链路 Endpoint URL（http 或 https）。"
          }
        }
      },
      "RumApplicationItem": {
        "type": "object",
        "description": "单个 RUM 应用。",
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "账户 ID。"
          },
          "application_id": {
            "type": "string",
            "description": "唯一应用 ID。"
          },
          "application_name": {
            "type": "string",
            "description": "应用显示名称。"
          },
          "type": {
            "type": "string",
            "enum": [
              "browser",
              "ios",
              "android",
              "react-native",
              "flutter",
              "kotlin-multiplatform",
              "roku",
              "unity"
            ],
            "description": "应用类型。"
          },
          "client_token": {
            "type": "string",
            "description": "用于初始化 RUM SDK 的令牌。"
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属团队 ID。"
          },
          "is_private": {
            "type": "boolean",
            "description": "为 `true` 时仅团队成员可访问。"
          },
          "no_ip": {
            "type": "boolean",
            "description": "为 `true` 时不采集 IP 地址。"
          },
          "no_geo": {
            "type": "boolean",
            "description": "为 `true` 时不推断地理位置。"
          },
          "alerting": {
            "$ref": "#/components/schemas/RumApplicationAlerting"
          },
          "tracing": {
            "$ref": "#/components/schemas/RumApplicationTracing"
          },
          "links": {
            "$ref": "#/components/schemas/RumApplicationLinks"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled",
              "deleted"
            ],
            "description": "应用状态。"
          },
          "created_by": {
            "type": "integer",
            "format": "int64",
            "description": "创建者成员 ID。"
          },
          "updated_by": {
            "type": "integer",
            "format": "int64",
            "description": "最后更新者成员 ID。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间，Unix 时间戳（秒）。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最后更新时间，Unix 时间戳（秒）。"
          }
        }
      },
      "RumApplicationListResponse": {
        "type": "object",
        "description": "RUM 应用分页列表。",
        "properties": {
          "has_next_page": {
            "type": "boolean"
          },
          "total": {
            "type": "integer"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RumApplicationItem"
            }
          }
        }
      },
      "RumApplicationIDRequest": {
        "type": "object",
        "required": [
          "application_id"
        ],
        "description": "包含单个应用 ID 的请求。",
        "properties": {
          "application_id": {
            "type": "string",
            "description": "RUM 应用 ID。"
          }
        }
      },
      "RumApplicationInfosRequest": {
        "type": "object",
        "required": [
          "application_ids"
        ],
        "description": "批量查询应用信息请求。",
        "properties": {
          "application_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "最多 200 个应用 ID。"
          }
        }
      },
      "RumApplicationInfosResponse": {
        "type": "object",
        "description": "批量查询应用信息响应。",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RumApplicationItem"
            }
          }
        }
      },
      "RumApplicationCreateRequest": {
        "type": "object",
        "required": [
          "application_name",
          "type",
          "team_id"
        ],
        "description": "创建 RUM 应用的参数。",
        "properties": {
          "application_name": {
            "type": "string",
            "description": "应用名称，1–40 个字符。"
          },
          "type": {
            "type": "string",
            "enum": [
              "browser",
              "ios",
              "android",
              "react-native",
              "flutter",
              "kotlin-multiplatform",
              "roku",
              "unity"
            ],
            "description": "应用类型。"
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属团队 ID。"
          },
          "is_private": {
            "type": "boolean",
            "description": "是否仅限团队成员访问。"
          },
          "no_ip": {
            "type": "boolean",
            "description": "不采集 IP 地址。"
          },
          "no_geo": {
            "type": "boolean",
            "description": "不推断地理位置。"
          },
          "alerting": {
            "$ref": "#/components/schemas/RumApplicationAlerting"
          },
          "tracing": {
            "$ref": "#/components/schemas/RumApplicationTracing"
          },
          "links": {
            "$ref": "#/components/schemas/RumApplicationLinks"
          }
        }
      },
      "RumApplicationCreateResponse": {
        "type": "object",
        "description": "创建 RUM 应用的结果。",
        "properties": {
          "application_id": {
            "type": "string",
            "description": "自动生成的唯一应用 ID。"
          },
          "application_name": {
            "type": "string",
            "description": "应用显示名称。"
          },
          "client_token": {
            "type": "string",
            "description": "用于 RUM SDK 初始化的令牌。"
          }
        }
      },
      "RumApplicationUpdateRequest": {
        "type": "object",
        "required": [
          "application_id"
        ],
        "description": "更新 RUM 应用的参数，除 `application_id` 外均为可选。",
        "properties": {
          "application_id": {
            "type": "string",
            "description": "要更新的应用 ID。"
          },
          "application_name": {
            "type": "string",
            "description": "新的应用名称。"
          },
          "type": {
            "type": "string",
            "enum": [
              "browser",
              "ios",
              "android",
              "react-native",
              "flutter",
              "kotlin-multiplatform",
              "roku",
              "unity"
            ]
          },
          "team_id": {
            "type": "integer",
            "format": "int64"
          },
          "is_private": {
            "type": "boolean"
          },
          "no_ip": {
            "type": "boolean"
          },
          "no_geo": {
            "type": "boolean"
          },
          "alerting": {
            "$ref": "#/components/schemas/RumApplicationAlerting"
          },
          "tracing": {
            "$ref": "#/components/schemas/RumApplicationTracing"
          },
          "links": {
            "$ref": "#/components/schemas/RumApplicationLinks"
          }
        }
      },
      "RumIssueItem": {
        "type": "object",
        "description": "单个 RUM 异常追踪 Issue。",
        "properties": {
          "team_id": {
            "type": "integer",
            "format": "int64"
          },
          "issue_id": {
            "type": "string",
            "description": "唯一 Issue ID。"
          },
          "application_id": {
            "type": "string"
          },
          "application_name": {
            "type": "string"
          },
          "service": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "for_review",
              "reviewed",
              "ignored",
              "resolved"
            ]
          },
          "error_count": {
            "type": "integer",
            "format": "int64",
            "description": "错误总发生次数。"
          },
          "session_count": {
            "type": "integer",
            "format": "int64",
            "description": "受影响的用户会话数。"
          },
          "is_crash": {
            "type": "boolean",
            "description": "是否导致应用崩溃。"
          },
          "age": {
            "type": "integer",
            "format": "int64"
          },
          "resolved_at": {
            "type": "integer",
            "format": "int64"
          },
          "resolved_by": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "first_seen": {
            "type": "object",
            "properties": {
              "timestamp": {
                "type": "integer",
                "format": "int64"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "last_seen": {
            "type": "object",
            "properties": {
              "timestamp": {
                "type": "integer",
                "format": "int64"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "error": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            }
          },
          "suspected_cause": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string",
                "enum": [
                  "auto",
                  "user"
                ]
              },
              "value": {
                "type": "string",
                "enum": [
                  "api.failed_request",
                  "network.error",
                  "code.exception",
                  "code.invalid_object_access",
                  "code.invalid_argument",
                  "unknown"
                ]
              },
              "reason": {
                "type": "string"
              },
              "person_id": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          "regression": {
            "type": "object",
            "description": "回溯元数据，仅在已解决的 Issue 再次出现时存在。",
            "properties": {
              "regressed_at": {
                "type": "integer",
                "format": "int64",
                "description": "检测到回溯的时间戳。"
              },
              "regressed_at_version": {
                "type": "string",
                "description": "出现回溯的应用版本。"
              },
              "resolved_at": {
                "type": "integer",
                "format": "int64",
                "description": "回溯前的上次解决时间。"
              }
            }
          },
          "versions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "severity": {
            "type": "string",
            "description": "Issue 严重性级别。"
          }
        }
      },
      "RumIssueListRequest": {
        "type": "object",
        "required": [
          "start_time",
          "end_time"
        ],
        "description": "查询 Issue 列表的过滤参数。",
        "properties": {
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "时间范围起始，毫秒时间戳。"
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "时间范围结束，毫秒时间戳，最大范围 183 天。"
          },
          "application_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "按应用 ID 过滤。"
          },
          "dql": {
            "type": "string",
            "description": "DQL 高级过滤查询，不能与 `sql` 同时使用。"
          },
          "sql": {
            "type": "string",
            "description": "SQL 式高级过滤查询，不能与 `dql` 同时使用。"
          },
          "statuses": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "for_review",
                "reviewed",
                "ignored",
                "resolved"
              ]
            },
            "description": "按状态过滤。"
          },
          "suspected_causes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "按疑似原因过滤。"
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "按团队 ID 过滤。"
          },
          "p": {
            "type": "integer",
            "description": "页码，默认 1。"
          },
          "limit": {
            "type": "integer",
            "description": "每页条数，范围 1–100，默认 20。"
          },
          "orderby": {
            "type": "string",
            "enum": [
              "created_at",
              "updated_at",
              "session_count",
              "error_count"
            ]
          },
          "asc": {
            "type": "boolean"
          },
          "error_required": {
            "type": "boolean",
            "description": "为 `true` 时仅返回有关联错误事件的 Issue。"
          },
          "by_intersection": {
            "type": "boolean"
          }
        }
      },
      "RumIssueListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RumIssueItem"
            }
          },
          "has_next_page": {
            "type": "boolean"
          },
          "total": {
            "type": "integer"
          }
        }
      },
      "RumIssueIDRequest": {
        "type": "object",
        "required": [
          "issue_id"
        ],
        "properties": {
          "issue_id": {
            "type": "string",
            "description": "Issue ID。"
          }
        }
      },
      "RumIssueUpdateRequest": {
        "type": "object",
        "required": [
          "issue_id"
        ],
        "description": "更新 Issue 的参数。",
        "properties": {
          "issue_id": {
            "type": "string",
            "description": "要更新的 Issue ID。"
          },
          "status": {
            "type": "string",
            "enum": [
              "for_review",
              "reviewed",
              "ignored",
              "resolved"
            ],
            "description": "新状态。"
          },
          "suspected_cause": {
            "type": "string",
            "enum": [
              "api.failed_request",
              "network.error",
              "code.exception",
              "code.invalid_object_access",
              "code.invalid_argument",
              "unknown"
            ],
            "description": "疑似原因。"
          }
        }
      },
      "SourcemapListRequest": {
        "type": "object",
        "description": "Sourcemap 列表的分页过滤条件。",
        "required": [
          "start_time",
          "end_time"
        ],
        "properties": {
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "上传时间范围起始，Unix 毫秒时间戳。需大于 0 且小于 `end_time`。"
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "上传时间范围结束，Unix 毫秒时间戳。最大时间跨度 365 天。"
          },
          "type": {
            "type": "string",
            "description": "平台类型。省略时默认为 `browser`。",
            "enum": [
              "browser",
              "android",
              "ios"
            ]
          },
          "services": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "按服务名称过滤，最多 100 个值。"
          },
          "versions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "按版本字符串过滤，最多 100 个值。"
          },
          "query": {
            "type": "string",
            "description": "对 minified URL（browser）或 build_id（android）做子串匹配。最多 200 个字符。"
          },
          "build_id": {
            "type": "string",
            "description": "仅 Android。按 Gradle 插件构建标识过滤。最多 200 个字符。"
          },
          "uuid": {
            "type": "string",
            "description": "仅 iOS。按 dSYM bundle UUID 过滤。最多 200 个字符。"
          },
          "p": {
            "type": "integer",
            "description": "页码，从 1 开始。",
            "minimum": 1,
            "default": 1,
            "example": 1
          },
          "limit": {
            "type": "integer",
            "description": "每页条数，最大 100，默认 20。",
            "maximum": 100,
            "default": 20,
            "example": 20
          },
          "orderby": {
            "type": "string",
            "description": "排序字段。",
            "enum": [
              "created_at",
              "updated_at"
            ]
          },
          "asc": {
            "type": "boolean",
            "description": "升序排序。默认 false（降序）。",
            "default": false
          }
        }
      },
      "SourcemapItem": {
        "type": "object",
        "description": "单条已上传的 Sourcemap 记录。",
        "properties": {
          "key": {
            "type": "string",
            "description": "唯一标识该 Sourcemap 文件的存储键。"
          },
          "type": {
            "type": "string",
            "description": "平台类型：`browser`、`android` 或 `ios`。",
            "enum": [
              "browser",
              "android",
              "ios"
            ]
          },
          "service": {
            "type": "string",
            "description": "应用或服务名称。"
          },
          "version": {
            "type": "string",
            "description": "应用版本字符串。"
          },
          "size": {
            "type": "integer",
            "format": "int64",
            "description": "文件大小（字节）。"
          },
          "git_repository_url": {
            "type": "string",
            "description": "与此构建关联的 Git 仓库 URL。"
          },
          "git_commit_sha": {
            "type": "string",
            "description": "此构建的 Git commit SHA。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "上传时间，Unix 秒时间戳。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最后更新时间，Unix 秒时间戳。"
          },
          "metadata": {
            "type": "object",
            "description": "附加在 sourcemap 上的自由格式键值元数据。具体结构取决于上传客户端，常见键包括 `git_repository_url` 和 `git_commit_sha`（这两个字段同时也会提升为顶层字段）。",
            "additionalProperties": true
          }
        }
      },
      "SourcemapListResponse": {
        "type": "object",
        "description": "Sourcemap 记录的分页列表。",
        "required": [
          "total",
          "items"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "匹配记录总数。",
            "example": 3
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourcemapItem"
            }
          }
        }
      },
      "MemberEmptyObject": {
        "type": "object",
        "description": "空响应",
        "properties": {}
      },
      "MemberInfoRequest": {
        "type": "object",
        "description": "获取成员信息请求",
        "properties": {}
      },
      "MemberInfoResponse": {
        "type": "object",
        "description": "当前成员资料",
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "账户 ID"
          },
          "account_name": {
            "type": "string",
            "description": "账户名称"
          },
          "account_avatar": {
            "type": "string",
            "description": "账户头像 URL"
          },
          "account_email": {
            "type": "string",
            "description": "账户邮箱"
          },
          "account_role_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "授予的角色 ID 列表"
          },
          "account_locale": {
            "type": "string",
            "description": "账户级语言偏好（如 zh-CN 或 en-US）"
          },
          "account_time_zone": {
            "type": "string",
            "description": "账户级时区（如 Asia/Shanghai）"
          },
          "domain": {
            "type": "string",
            "description": "账户域名"
          },
          "member_id": {
            "type": "integer",
            "format": "uint64",
            "description": "成员 ID"
          },
          "member_name": {
            "type": "string",
            "description": "成员显示名称"
          },
          "phone": {
            "type": "string",
            "description": "脱敏手机号"
          },
          "phone_verified": {
            "type": "boolean",
            "description": "手机号是否已验证"
          },
          "email": {
            "type": "string",
            "description": "邮箱地址"
          },
          "email_verified": {
            "type": "boolean",
            "description": "邮箱是否已验证"
          },
          "country_code": {
            "type": "string",
            "description": "手机国家区号"
          },
          "avatar": {
            "type": "string",
            "description": "成员头像 URL"
          },
          "locale": {
            "type": "string",
            "description": "语言偏好"
          },
          "time_zone": {
            "type": "string",
            "description": "时区"
          },
          "is_external": {
            "type": "boolean",
            "description": "是否通过 SSO 创建"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "pending",
              "deleted"
            ],
            "description": "成员状态。`enabled` — 已激活成员；`pending` — 已邀请但尚未接受；`deleted` — 已从组织移除。"
          }
        }
      },
      "MemberListRequest": {
        "type": "object",
        "description": "查询成员列表请求",
        "properties": {
          "role_id": {
            "type": "integer",
            "format": "uint64",
            "description": "按角色 ID 过滤"
          },
          "p": {
            "type": "integer",
            "minimum": 1,
            "description": "页码"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "每页条数"
          },
          "orderby": {
            "type": "string",
            "enum": [
              "created_at",
              "updated_at"
            ],
            "description": "排序字段"
          },
          "asc": {
            "type": "boolean",
            "description": "是否升序"
          },
          "query": {
            "type": "string",
            "description": "搜索关键词"
          }
        }
      },
      "MemberItem": {
        "type": "object",
        "description": "成员条目",
        "required": [
          "account_id",
          "member_id",
          "member_name",
          "country_code",
          "phone",
          "email",
          "phone_verified",
          "email_verified",
          "avatar",
          "status",
          "account_role_ids",
          "created_at",
          "updated_at",
          "ref_id",
          "is_external"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "账户 ID"
          },
          "member_id": {
            "type": "integer",
            "format": "uint64",
            "description": "成员 ID"
          },
          "member_name": {
            "type": "string",
            "description": "显示名称"
          },
          "country_code": {
            "type": "string",
            "description": "手机国家区号"
          },
          "phone": {
            "type": "string",
            "description": "脱敏手机号"
          },
          "email": {
            "type": "string",
            "description": "邮箱地址"
          },
          "locale": {
            "type": "string",
            "description": "语言"
          },
          "time_zone": {
            "type": "string",
            "description": "时区"
          },
          "phone_verified": {
            "type": "boolean",
            "description": "手机已验证"
          },
          "email_verified": {
            "type": "boolean",
            "description": "邮箱已验证"
          },
          "avatar": {
            "type": "string",
            "description": "头像 URL"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "pending",
              "deleted"
            ],
            "description": "成员状态。`enabled` — 已激活成员；`pending` — 已邀请但尚未接受；`deleted` — 已从组织移除。"
          },
          "account_role_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "角色 ID 列表"
          },
          "is_external": {
            "type": "boolean",
            "description": "是否通过 SSO 创建"
          },
          "ref_id": {
            "type": "string",
            "description": "外部引用 ID"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间（Unix 秒）"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "更新时间（Unix 秒）"
          }
        }
      },
      "MemberListResponse": {
        "type": "object",
        "description": "成员列表响应",
        "properties": {
          "p": {
            "type": "integer",
            "description": "当前页码"
          },
          "limit": {
            "type": "integer",
            "description": "每页条数"
          },
          "total": {
            "type": "integer",
            "description": "总数"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemberItem"
            },
            "description": "成员列表"
          }
        }
      },
      "MemberDeleteRequest": {
        "type": "object",
        "description": "删除成员请求（提供其中一个查找字段）",
        "properties": {
          "member_id": {
            "type": "integer",
            "format": "uint64",
            "description": "成员 ID"
          },
          "member_name": {
            "type": "string",
            "description": "成员名称"
          },
          "email": {
            "type": "string",
            "description": "邮箱地址"
          },
          "phone": {
            "type": "string",
            "description": "手机号"
          },
          "country_code": {
            "type": "string",
            "description": "国家区号，配合 phone 使用"
          },
          "ref_id": {
            "type": "string",
            "description": "外部引用 ID"
          },
          "is_force": {
            "type": "boolean",
            "description": "是否强制删除。默认 false，会检查成员是否被分派策略、值班表等资源引用；设为 true 则跳过引用检查直接删除",
            "default": false
          }
        }
      },
      "InviteMemberItem": {
        "type": "object",
        "description": "待邀请成员",
        "properties": {
          "member_name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 39,
            "description": "显示名称"
          },
          "email": {
            "type": "string",
            "description": "邮箱地址"
          },
          "phone": {
            "type": "string",
            "description": "手机号"
          },
          "country_code": {
            "type": "string",
            "description": "国家区号"
          },
          "role_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "授予的角色 ID 列表"
          },
          "locale": {
            "type": "string",
            "enum": [
              "zh-CN",
              "en-US"
            ],
            "description": "语言"
          },
          "time_zone": {
            "type": "string",
            "description": "时区"
          },
          "ref_id": {
            "type": "string",
            "description": "外部引用 ID"
          }
        }
      },
      "MemberInviteRequest": {
        "type": "object",
        "description": "邀请成员请求",
        "required": [
          "members"
        ],
        "properties": {
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InviteMemberItem"
            },
            "description": "待邀请成员列表（最多 20 个）"
          },
          "from": {
            "type": "string",
            "description": "邀请来源上下文"
          }
        }
      },
      "NewMemberItem": {
        "type": "object",
        "description": "新建成员信息",
        "properties": {
          "member_id": {
            "type": "integer",
            "format": "uint64",
            "description": "成员 ID"
          },
          "member_name": {
            "type": "string",
            "description": "成员显示名称"
          }
        }
      },
      "MemberInviteResponse": {
        "type": "object",
        "description": "邀请成员响应",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NewMemberItem"
            },
            "description": "新建的成员列表"
          }
        }
      },
      "MemberRoleGrantRequest": {
        "type": "object",
        "description": "授予成员角色请求",
        "required": [
          "member_id",
          "role_ids"
        ],
        "properties": {
          "member_id": {
            "type": "integer",
            "format": "uint64",
            "description": "成员 ID"
          },
          "role_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "要授予的角色 ID 列表，将追加到成员现有角色集合（自动去重）。"
          }
        }
      },
      "MemberRoleRevokeRequest": {
        "type": "object",
        "description": "解除成员角色请求",
        "required": [
          "member_id",
          "role_ids"
        ],
        "properties": {
          "member_id": {
            "type": "integer",
            "format": "uint64",
            "description": "成员 ID"
          },
          "role_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "要从成员处撤销的角色 ID 列表。"
          }
        }
      },
      "MemberRoleUpdateRequest": {
        "type": "object",
        "description": "更新成员角色请求",
        "required": [
          "member_id",
          "role_ids"
        ],
        "properties": {
          "member_id": {
            "type": "integer",
            "format": "uint64",
            "description": "成员 ID"
          },
          "role_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "新的角色 ID 集合"
          }
        }
      },
      "MemberResetInfoRequest": {
        "type": "object",
        "description": "重置成员信息请求",
        "required": [
          "member_id"
        ],
        "properties": {
          "member_id": {
            "type": "integer",
            "format": "uint64",
            "description": "要更新的成员 ID"
          },
          "member_name": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 2,
            "maxLength": 39,
            "description": "显示名称"
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "邮箱地址"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "description": "手机号"
          },
          "country_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "国家区号"
          },
          "avatar": {
            "type": [
              "string",
              "null"
            ],
            "description": "头像 URL"
          },
          "locale": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "zh-CN",
              "en-US"
            ],
            "description": "语言"
          },
          "time_zone": {
            "type": [
              "string",
              "null"
            ],
            "description": "时区"
          }
        }
      },
      "PersonInfosRequest": {
        "type": "object",
        "description": "批量获取人员信息请求",
        "required": [
          "person_ids"
        ],
        "properties": {
          "person_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "人员 ID 列表"
          }
        }
      },
      "PersonItem": {
        "type": "object",
        "description": "人员资料",
        "required": [
          "account_id",
          "person_id",
          "phone_verified",
          "email_verified"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "账户 ID"
          },
          "person_id": {
            "type": "integer",
            "format": "uint64",
            "description": "人员 ID"
          },
          "person_name": {
            "type": "string",
            "description": "显示名称"
          },
          "avatar": {
            "type": "string",
            "description": "头像 URL"
          },
          "locale": {
            "type": "string",
            "description": "语言"
          },
          "time_zone": {
            "type": "string",
            "description": "时区"
          },
          "email": {
            "type": "string",
            "description": "邮箱地址"
          },
          "phone": {
            "type": "string",
            "description": "手机号"
          },
          "phone_verified": {
            "type": "boolean",
            "description": "手机已验证"
          },
          "email_verified": {
            "type": "boolean",
            "description": "邮箱已验证"
          },
          "as": {
            "type": "string",
            "description": "登录角色（account/member）"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "pending",
              "deleted"
            ],
            "description": "人员状态。`enabled` — 已激活；`pending` — 已邀请但尚未接受；`deleted` — 已移除。"
          }
        }
      },
      "PersonInfosResponse": {
        "type": "object",
        "description": "批量人员信息响应",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PersonItem"
            },
            "description": "人员资料列表"
          }
        }
      },
      "TeamItem": {
        "type": "object",
        "description": "团队及其成员信息。",
        "required": [
          "account_id",
          "team_id",
          "team_name",
          "description",
          "status",
          "updated_by_name",
          "updated_by",
          "creator_id",
          "creator_name",
          "created_at",
          "updated_at",
          "person_ids",
          "ref_id"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "所属账户 ID。"
          },
          "team_id": {
            "type": "integer",
            "format": "uint64",
            "description": "唯一团队 ID。"
          },
          "team_name": {
            "type": "string",
            "description": "团队显示名称，1–39 个字符，账户内唯一。"
          },
          "description": {
            "type": "string",
            "description": "自定义描述。"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ],
            "description": "团队状态。"
          },
          "updated_by_name": {
            "type": "string",
            "description": "最后修改人显示名称。"
          },
          "updated_by": {
            "type": "integer",
            "format": "uint64",
            "description": "最后修改人成员 ID。"
          },
          "creator_id": {
            "type": "integer",
            "format": "uint64",
            "description": "创建人成员 ID。"
          },
          "creator_name": {
            "type": "string",
            "description": "创建人显示名称。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间（Unix 秒）。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最近更新时间（Unix 秒）。"
          },
          "person_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "团队成员的成员 ID 列表。"
          },
          "ref_id": {
            "type": "string",
            "description": "外部引用 ID，用于与第三方 HR 系统集成。"
          }
        }
      },
      "TeamInfoRequest": {
        "type": "object",
        "description": "通过 ID、名称或外部引用标识团队的请求。",
        "properties": {
          "team_id": {
            "type": "integer",
            "format": "uint64",
            "description": "团队 ID。"
          },
          "team_name": {
            "type": "string",
            "description": "团队名称。"
          },
          "ref_id": {
            "type": "string",
            "description": "外部引用 ID。"
          }
        }
      },
      "TeamInfosRequest": {
        "type": "object",
        "required": [
          "team_ids"
        ],
        "description": "按 ID 列表批量查询团队的请求。",
        "properties": {
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "要查询的团队 ID 列表，最多 100 个。"
          }
        }
      },
      "TeamBriefItem": {
        "type": "object",
        "description": "批量响应中的团队简要信息。",
        "properties": {
          "team_id": {
            "type": "integer",
            "format": "uint64"
          },
          "team_name": {
            "type": "string"
          },
          "person_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            }
          }
        }
      },
      "TeamInfosResponse": {
        "type": "object",
        "description": "批量团队查询结果。",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamBriefItem"
            }
          }
        }
      },
      "TeamListRequest": {
        "type": "object",
        "description": "查询团队列表的过滤参数。",
        "properties": {
          "p": {
            "type": "integer",
            "description": "页码，从 1 开始，默认 1。",
            "minimum": 1,
            "default": 1
          },
          "limit": {
            "type": "integer",
            "description": "分页大小，最大 100，默认 20。",
            "minimum": 1,
            "maximum": 100,
            "default": 20
          },
          "orderby": {
            "type": "string",
            "description": "排序字段。",
            "enum": [
              "created_at",
              "updated_at",
              "team_name"
            ]
          },
          "asc": {
            "type": "boolean",
            "description": "升序排序。"
          },
          "person_id": {
            "type": "integer",
            "format": "uint64",
            "description": "按成员 ID 过滤，只返回该成员所属的团队。"
          },
          "query": {
            "type": "string",
            "description": "按团队名称做子串匹配。"
          }
        }
      },
      "TeamListResponse": {
        "type": "object",
        "description": "分页团队列表。",
        "required": [
          "p",
          "limit",
          "total",
          "items"
        ],
        "properties": {
          "p": {
            "type": "integer",
            "description": "当前页码。"
          },
          "limit": {
            "type": "integer",
            "description": "本次使用的分页大小。"
          },
          "total": {
            "type": "integer",
            "description": "符合过滤条件的团队总数。"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamItem"
            }
          }
        }
      },
      "TeamUpsertRequest": {
        "type": "object",
        "required": [
          "team_name"
        ],
        "description": "创建或更新团队的参数。",
        "properties": {
          "team_id": {
            "type": "integer",
            "format": "uint64",
            "description": "团队 ID，省略或置为 0 表示创建新团队。"
          },
          "team_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39,
            "description": "团队显示名称，1–39 个字符。"
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "自定义描述。"
          },
          "person_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "设置为团队成员的成员 ID 列表，会替换现有成员列表。"
          },
          "emails": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "email"
            },
            "description": "要邀请为成员的邮箱地址。"
          },
          "phones": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "要邀请为成员的手机号码。"
          },
          "countryCode": {
            "type": "string",
            "description": "默认国家区号，用于 `phones` 中未采用 E.164 格式的手机号。"
          },
          "ref_id": {
            "type": "string",
            "description": "供 HR 系统集成使用的外部引用 ID。"
          },
          "reset_if_name_exist": {
            "type": "boolean",
            "description": "若为 true，当同名团队已存在时重置其成员列表为传入的 person_ids。"
          }
        }
      },
      "TeamUpsertResponse": {
        "type": "object",
        "description": "创建或更新团队的结果。",
        "required": [
          "team_id",
          "team_name"
        ],
        "properties": {
          "team_id": {
            "type": "integer",
            "format": "uint64",
            "description": "创建或更新的团队 ID。"
          },
          "team_name": {
            "type": "string",
            "description": "从请求中回显的团队名称。"
          }
        }
      },
      "TeamDeleteRequest": {
        "type": "object",
        "description": "标识要删除的团队的请求。",
        "properties": {
          "team_id": {
            "type": "integer",
            "format": "uint64",
            "description": "团队 ID。"
          },
          "team_name": {
            "type": "string",
            "description": "团队名称。"
          },
          "ref_id": {
            "type": "string",
            "description": "外部引用 ID。"
          }
        }
      },
      "PlatformEmptyObject": {
        "type": "object",
        "description": "成功时返回的空对象，适用于无实质 payload 的操作。",
        "additionalProperties": false
      },
      "RoleItem": {
        "type": "object",
        "description": "角色及其权限集合。",
        "required": [
          "role_id",
          "role_name",
          "description",
          "status",
          "permission_ids",
          "editable",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "role_id": {
            "type": "integer",
            "format": "uint64",
            "description": "唯一角色 ID。"
          },
          "role_name": {
            "type": "string",
            "description": "角色显示名称。"
          },
          "description": {
            "type": "string",
            "description": "角色描述。"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ],
            "description": "角色状态。"
          },
          "permission_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "该角色授予的权限 ID 列表。"
          },
          "editable": {
            "type": "boolean",
            "description": "内置角色为 false，不可修改。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间（Unix 秒）。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最近更新时间（Unix 秒）。"
          }
        }
      },
      "RoleInfoRequest": {
        "type": "object",
        "required": [
          "role_id"
        ],
        "properties": {
          "role_id": {
            "type": "integer",
            "format": "uint64",
            "description": "角色 ID。"
          }
        }
      },
      "RoleIDRequest": {
        "type": "object",
        "required": [
          "role_id"
        ],
        "properties": {
          "role_id": {
            "type": "integer",
            "format": "uint64",
            "description": "角色 ID。"
          }
        }
      },
      "RoleListRequest": {
        "type": "object",
        "description": "查询角色列表的过滤参数。",
        "properties": {
          "orderby": {
            "type": "string",
            "enum": [
              "created_at",
              "updated_at"
            ],
            "description": "排序字段。"
          },
          "asc": {
            "type": "boolean",
            "description": "升序排序。"
          }
        }
      },
      "RoleListResponse": {
        "type": "object",
        "description": "角色列表结果。",
        "required": [
          "total",
          "items"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "description": "角色总数。"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoleItem"
            }
          }
        }
      },
      "RoleUpsertRequest": {
        "type": "object",
        "required": [
          "role_name"
        ],
        "description": "创建或更新自定义角色的参数。",
        "properties": {
          "role_id": {
            "type": "integer",
            "format": "uint64",
            "description": "角色 ID，省略或置为 0 表示创建。"
          },
          "role_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39,
            "description": "角色显示名称，1–39 个字符。"
          },
          "description": {
            "type": "string",
            "maxLength": 499,
            "description": "角色描述。"
          },
          "permission_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "要授予的权限 ID 列表，会替换现有权限集合。"
          }
        }
      },
      "RoleUpsertResponse": {
        "type": "object",
        "description": "角色创建/更新结果。",
        "required": [
          "role_id",
          "role_name"
        ],
        "properties": {
          "role_id": {
            "type": "integer",
            "format": "uint64",
            "description": "创建或更新的角色 ID。"
          },
          "role_name": {
            "type": "string",
            "description": "从请求中回显的角色名称。"
          }
        }
      },
      "RolePermissionListRequest": {
        "type": "object",
        "description": "查询权限列表的过滤参数。",
        "properties": {
          "role_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "按角色 ID 过滤，只返回这些角色已授予的权限。"
          },
          "with_all": {
            "type": "boolean",
            "description": "若为 true，返回所有权限并用 is_granted 标记哪些已授予。"
          }
        }
      },
      "PermissionItem": {
        "type": "object",
        "description": "一个权限条目。",
        "required": [
          "id",
          "permission_name",
          "permission_type",
          "description",
          "class",
          "scope",
          "status"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "唯一权限 ID。"
          },
          "permission_name": {
            "type": "string",
            "description": "权限显示名称。"
          },
          "permission_type": {
            "type": "string",
            "enum": [
              "read",
              "manage"
            ],
            "description": "查看权限或管理权限。"
          },
          "description": {
            "type": "string",
            "description": "权限的用户可读描述。"
          },
          "class": {
            "type": "string",
            "description": "权限分类（如 'On-call'、'Organization'）。"
          },
          "scope": {
            "type": "string",
            "description": "权限范围（如 'on-call'、'organization'）。"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ],
            "description": "权限状态。"
          },
          "is_granted": {
            "type": "boolean",
            "description": "当 with_all 为 true 时存在，表示该权限是否已授予所请求的角色。"
          }
        }
      },
      "RolePermissionListResponse": {
        "type": "object",
        "description": "权限列表结果。",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PermissionItem"
            }
          }
        }
      },
      "PermissionFactorListRequest": {
        "type": "object",
        "description": "查询权限因子列表的过滤参数。",
        "properties": {
          "factor_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "api",
                "button",
                "visit",
                "menu",
                "url"
              ]
            },
            "description": "按因子类型过滤。"
          }
        }
      },
      "PermissionFactorItem": {
        "type": "object",
        "description": "一个权限因子。",
        "required": [
          "factor_name",
          "factor_type"
        ],
        "properties": {
          "factor_name": {
            "type": "string",
            "description": "因子标识符（如 'template:read:info'）。"
          },
          "factor_type": {
            "type": "string",
            "enum": [
              "api",
              "button",
              "visit",
              "menu",
              "url"
            ],
            "description": "因子类型。"
          }
        }
      },
      "PermissionFactorListResponse": {
        "type": "array",
        "description": "权限因子列表。",
        "items": {
          "$ref": "#/components/schemas/PermissionFactorItem"
        }
      },
      "RoleGrantRequest": {
        "type": "object",
        "required": [
          "member_ids",
          "role_id"
        ],
        "description": "向成员授予或撤销角色的请求。",
        "properties": {
          "member_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "要授予/撤销角色的成员 ID 列表，最多 100 个。"
          },
          "role_id": {
            "type": "integer",
            "format": "uint64",
            "description": "要授予或撤销的角色 ID。"
          }
        }
      },
      "AuditSearchRequest": {
        "type": "object",
        "description": "审计日志检索的过滤条件，时间范围必填。",
        "required": [
          "start_time",
          "end_time"
        ],
        "properties": {
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "检索窗口开始时间，Unix 时间戳（秒）。",
            "example": 1712620800
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "检索窗口结束时间，Unix 时间戳（秒）。必须晚于 `start_time`，最大跨度 90 天。",
            "example": 1712707200
          },
          "limit": {
            "type": "integer",
            "description": "每页条数。最小 0，最大 99。",
            "minimum": 0,
            "maximum": 99,
            "example": 20
          },
          "request_id": {
            "type": "string",
            "description": "按唯一请求 ID 过滤到单条记录。"
          },
          "search_after_ctx": {
            "type": "string",
            "description": "上次响应返回的不透明分页游标。首页留空。"
          },
          "operations": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "按操作名称过滤。合法值可通过 `POST /audit/operation/list` 获取。"
          },
          "person_id": {
            "type": "integer",
            "format": "uint64",
            "description": "按操作人成员 ID 过滤。"
          },
          "is_dangerous": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "为 true 时只返回高危操作。"
          },
          "is_write": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "为 true 时只返回写操作；为 false 时只返回读操作。"
          }
        }
      },
      "AuditLog": {
        "type": "object",
        "description": "单条审计日志。",
        "required": [
          "created_at",
          "account_id",
          "member_id",
          "member_name",
          "request_id",
          "ip",
          "operation",
          "operation_name",
          "body",
          "params",
          "is_dangerous",
          "is_write"
        ],
        "properties": {
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "操作时间，Unix 毫秒时间戳。"
          },
          "account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "账户 ID。"
          },
          "member_id": {
            "type": "integer",
            "format": "uint64",
            "description": "操作人的成员 ID。"
          },
          "member_name": {
            "type": "string",
            "description": "操作人的显示名称。"
          },
          "request_id": {
            "type": "string",
            "description": "用于关联的唯一请求 ID。"
          },
          "ip": {
            "type": "string",
            "description": "调用者的客户端 IP 地址。"
          },
          "operation": {
            "type": "string",
            "description": "稳定的机器可读操作名称，如 `template:write:create`。"
          },
          "operation_name": {
            "type": "string",
            "description": "按账户语种显示的人类可读操作标签。"
          },
          "body": {
            "type": "string",
            "description": "JSON 编码的请求体（可能截断至 10 KB）。"
          },
          "params": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "Key": {
                  "type": "string"
                },
                "Value": {
                  "type": "string"
                }
              }
            },
            "description": "URL 路径参数的键值对数组，无参数时为空数组。"
          },
          "is_dangerous": {
            "type": "boolean",
            "description": "是否被标记为高危操作。"
          },
          "is_write": {
            "type": "boolean",
            "description": "是否为写操作；false 表示只读操作。"
          }
        }
      },
      "AuditSearchResponse": {
        "type": "object",
        "description": "游标分页的审计日志检索结果。",
        "required": [
          "total",
          "search_after_ctx"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "检索窗口内符合条件的总条数。",
            "example": 2
          },
          "search_after_ctx": {
            "type": "string",
            "description": "用于获取下一页的不透明游标。没有更多结果时为空字符串。"
          },
          "docs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditLog"
            },
            "description": "当前页的审计日志条目。"
          }
        }
      },
      "AuditOperationListRequest": {
        "type": "object",
        "description": "不需要任何参数。",
        "additionalProperties": false
      },
      "AuditOperationTypeItem": {
        "type": "object",
        "description": "一条可审计的操作类型。",
        "required": [
          "name",
          "name_cn"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "用于过滤的稳定机器可读操作名称。",
            "example": "template:write:create"
          },
          "name_cn": {
            "type": "string",
            "description": "控制台显示的中文标签。",
            "example": "创建模板"
          }
        }
      },
      "AuditOperationListResponse": {
        "type": "object",
        "description": "可审计操作类型列表。",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditOperationTypeItem"
            }
          }
        }
      },
      "FieldItem": {
        "type": "object",
        "description": "故障自定义字段配置。",
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属账号 ID。"
          },
          "field_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{24}$",
            "description": "字段 ID，24 位十六进制 ObjectID。"
          },
          "field_name": {
            "type": "string",
            "pattern": "^[a-zA-Z_][a-zA-Z0-9_]{0,39}$",
            "maxLength": 39,
            "description": "机器名，写入故障 `fields.<field_name>`，创建后不可更改。"
          },
          "display_name": {
            "type": "string",
            "maxLength": 39,
            "description": "界面展示名。"
          },
          "description": {
            "type": "string",
            "maxLength": 499,
            "description": "可选描述。"
          },
          "field_type": {
            "type": "string",
            "enum": [
              "checkbox",
              "multi_select",
              "single_select",
              "text"
            ],
            "description": "字段类型。"
          },
          "value_type": {
            "type": "string",
            "enum": [
              "string",
              "bool",
              "float"
            ],
            "description": "取值类型。`checkbox` 固定为 `bool`；`single_select`/`multi_select`/`text` 固定为 `string`。"
          },
          "options": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "`single_select`/`multi_select` 的候选项（非空、元素唯一）；`checkbox`/`text` 为 `null` 或空。"
          },
          "default_value": {
            "description": "默认值，类型取决于 `field_type`：`checkbox` 为 `bool`；`single_select`/`text` 为 `string`；`multi_select` 为 `string[]`；无默认值时可为 `null`。",
            "oneOf": [
              {
                "type": "boolean"
              },
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "description": "字段状态，如 `enabled`、`deleted`。"
          },
          "creator_id": {
            "type": "integer",
            "format": "int64",
            "description": "创建人成员 ID。"
          },
          "updated_by": {
            "type": "integer",
            "format": "int64",
            "description": "最近更新人成员 ID。"
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64",
            "description": "删除时间，Unix 秒；仅在软删除字段上出现。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间，Unix 秒。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最近更新时间，Unix 秒。"
          }
        },
        "required": [
          "account_id",
          "field_id",
          "field_name",
          "display_name",
          "field_type",
          "value_type",
          "status",
          "creator_id",
          "updated_by",
          "created_at",
          "updated_at"
        ]
      },
      "FieldInfoRequest": {
        "type": "object",
        "required": [
          "field_id"
        ],
        "properties": {
          "field_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{24}$",
            "description": "字段 ID，24 位十六进制 ObjectID。"
          }
        }
      },
      "FieldListRequest": {
        "type": "object",
        "properties": {
          "orderby": {
            "type": "string",
            "enum": [
              "created_at",
              "updated_at"
            ],
            "description": "排序键，未传时使用后端默认顺序。"
          },
          "asc": {
            "type": "boolean",
            "description": "`true` 升序，`false` 降序。"
          },
          "creator_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "按创建人成员 ID 过滤，不传或传 `null` 不过滤。"
          },
          "query": {
            "type": "string",
            "description": "对 `field_name` 与 `display_name` 进行正则过滤；非法正则会回退为字面量子串匹配。"
          }
        }
      },
      "FieldListResponse": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldItem"
            },
            "description": "账号下所有未删除的自定义字段，无分页。"
          }
        }
      },
      "CreateFieldRequest": {
        "type": "object",
        "required": [
          "field_name",
          "display_name",
          "field_type",
          "value_type"
        ],
        "properties": {
          "field_name": {
            "type": "string",
            "pattern": "^[a-zA-Z_][a-zA-Z0-9_]{0,39}$",
            "maxLength": 39,
            "description": "机器名。必须以字母或下划线开头，长度 1–40，由 `[a-zA-Z0-9_]` 组成；创建后不可更改。"
          },
          "display_name": {
            "type": "string",
            "maxLength": 39,
            "description": "展示名，账号内须唯一。"
          },
          "description": {
            "type": "string",
            "maxLength": 499,
            "description": "可选描述。"
          },
          "field_type": {
            "type": "string",
            "enum": [
              "checkbox",
              "multi_select",
              "single_select",
              "text"
            ],
            "description": "字段类型，创建后不可更改。"
          },
          "value_type": {
            "type": "string",
            "enum": [
              "string",
              "bool",
              "float"
            ],
            "description": "取值类型。`checkbox` 须为 `bool`；其他类型须为 `string`。创建后不可更改。"
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "`single_select`/`multi_select` 必填且非空，元素唯一、每个 1–200 字符；`checkbox`/`text` 必须省略或为空。"
          },
          "default_value": {
            "description": "可选默认值，类型须与 `field_type` 匹配：`checkbox` 为 `bool`；`single_select` 为 `options` 中之一；`multi_select` 为 `options` 的子集；`text` 为不超过 3000 字符的字符串。",
            "oneOf": [
              {
                "type": "boolean"
              },
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UpdateFieldRequest": {
        "type": "object",
        "required": [
          "field_id"
        ],
        "properties": {
          "field_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{24}$",
            "description": "字段 ID，24 位十六进制 ObjectID。"
          },
          "display_name": {
            "type": "string",
            "maxLength": 39,
            "description": "新的展示名，账号内仍须唯一。"
          },
          "description": {
            "type": "string",
            "description": "新描述。"
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "替换后的候选项，规则同创建接口。"
          },
          "default_value": {
            "description": "替换后的默认值，类型须与字段当前 `field_type` 匹配。",
            "oneOf": [
              {
                "type": "boolean"
              },
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "DeleteFieldRequest": {
        "type": "object",
        "required": [
          "field_id"
        ],
        "properties": {
          "field_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{24}$",
            "description": "字段 ID，24 位十六进制 ObjectID。"
          }
        }
      },
      "CreateFieldResponse": {
        "type": "object",
        "required": [
          "field_id",
          "field_name"
        ],
        "properties": {
          "field_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{24}$",
            "description": "新建字段 ID，24 位十六进制 ObjectID。"
          },
          "field_name": {
            "type": "string",
            "description": "回显的 `field_name`。"
          }
        }
      },
      "QueryRowsRequest": {
        "type": "object",
        "required": [
          "ds_type",
          "ds_name",
          "expr"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "可选的一致性校验。若提供,必须等于已认证账户;不一致将被拒绝。业务执行始终使用已认证账户。"
          },
          "ds_type": {
            "type": "string",
            "description": "数据源类型;必须匹配租户下已配置的数据源。示例:`prometheus`、`loki`、`victorialogs`、`sls`、`elasticsearch`、`mysql`、`postgres`、`oracle`、`clickhouse`。"
          },
          "ds_name": {
            "type": "string",
            "description": "数据源名称;必须匹配租户下已配置的数据源。"
          },
          "expr": {
            "type": "string",
            "description": "查询表达式。语法取决于 `ds_type`,由对应的 monit-edge 客户端解释(Prometheus 用 PromQL,Loki 用 LogQL,SQL 类数据源用 SQL,等等)。"
          },
          "delay_seconds": {
            "type": "integer",
            "description": "应用于点查询(Prometheus、Loki stats、VictoriaLogs stats)的回看偏移,单位秒。明细 / raw 查询忽略该字段。",
            "default": 0
          },
          "args": {
            "type": "object",
            "description": "多态键值扩展参数,原样转发给 monit-edge。所有值必须为字符串。语义取决于 `ds_type`:SLS 需要 `sls.project` + `sls.logstore`;Loki / VictoriaLogs 原始模式需要通过 `<source>.start`/`<source>.end` 或 `<source>.timespan.value` + `<source>.timespan.unit` 指定时间范围;Prometheus 与 SQL 类数据源忽略该字段。键务必按数据源命名空间区分(如 `sls.project`、`loki.type`)。",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "QueryRowsResponse": {
        "type": "array",
        "description": "结果行。不同数据源对 `fields` 与 `values` 的填充方式不同——指标类数据源(Prometheus、*-stats)将数字放入 `values`;明细类数据源(SQL、SLS、原始日志)将数据放入 `fields`,`values` 可能为 `null`。",
        "items": {
          "$ref": "#/components/schemas/QueryRow"
        }
      },
      "QueryRow": {
        "type": "object",
        "properties": {
          "fields": {
            "type": "object",
            "description": "字符串值字段(标签、日志字段、SQL 列)。",
            "additionalProperties": {
              "type": "string"
            }
          },
          "values": {
            "type": "object",
            "nullable": true,
            "description": "数值字段。对于指标查询,规范键名为 `__value__`。对于明细类数据源可能为 `null`。",
            "additionalProperties": {
              "type": "number"
            }
          }
        }
      },
      "DiagnoseRequest": {
        "type": "object",
        "required": [
          "ds_type",
          "ds_name",
          "input"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "可选的一致性校验。若提供,必须等于已认证账户。"
          },
          "ds_type": {
            "type": "string",
            "description": "数据源类型。`log_patterns` 支持 `loki` 与 `victorialogs`;`metric_trends` 支持 `prometheus`。"
          },
          "ds_name": {
            "type": "string",
            "description": "租户下已配置的数据源名称。"
          },
          "operation": {
            "type": "string",
            "enum": [
              "log_patterns",
              "metric_trends"
            ],
            "description": "诊断操作类型。省略时根据 `ds_type` 推断(loki / victorialogs → `log_patterns`,prometheus → `metric_trends`)。其他数据源必须显式指定。"
          },
          "time_range": {
            "type": "object",
            "description": "诊断窗口,Unix 秒。缺失或无效时默认最近 15 分钟;窗口宽度超过 6 小时将被拒绝。",
            "properties": {
              "start": {
                "type": "integer",
                "format": "int64",
                "description": "窗口起点,Unix 秒。"
              },
              "end": {
                "type": "integer",
                "format": "int64",
                "description": "窗口终点,Unix 秒。"
              }
            }
          },
          "methods": {
            "type": "array",
            "description": "要执行的诊断方法。省略时,`log_patterns` 默认为 `pattern_snapshot + pattern_compare(previous_window)`,`metric_trends` 默认为 `single_window_shape + window_compare(previous_window)`。",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "`log_patterns` 支持 `pattern_snapshot`、`pattern_compare`。`metric_trends` 支持 `single_window_shape`、`window_compare`。"
                },
                "baseline": {
                  "type": "string",
                  "enum": [
                    "previous_window",
                    "same_window_yesterday",
                    "same_window_last_week"
                  ],
                  "description": "仅对 compare 类方法有意义。默认 `previous_window`。"
                }
              }
            }
          },
          "input": {
            "type": "object",
            "required": [
              "query"
            ],
            "properties": {
              "query": {
                "type": "string",
                "description": "查询表达式。`log_patterns` 使用 LogQL / VictoriaLogs 查询语法;`metric_trends` 使用 PromQL。"
              }
            }
          },
          "options": {
            "type": "object",
            "description": "执行选项,所有值均受 monit-edge 上限约束。",
            "properties": {
              "max_logs_scanned": {
                "type": "integer",
                "description": "单窗口日志扫描上限。默认 10 000,硬上限 50 000。"
              },
              "max_patterns": {
                "type": "integer",
                "description": "返回的最大模式数。默认 20,硬上限 50。"
              },
              "examples_per_pattern": {
                "type": "integer",
                "description": "每个模式返回的脱敏样例最大条数。默认 2,硬上限 3。"
              },
              "step_seconds": {
                "type": "integer",
                "description": "`metric_trends` 的 query_range 步长。默认 60,取值范围 [15, 300]。"
              },
              "max_series": {
                "type": "integer",
                "description": "`metric_trends` 考察的最大序列数。默认 50,硬上限 200。"
              },
              "topk": {
                "type": "integer",
                "description": "`metric_trends` 返回的显著序列最大数量。默认 10,硬上限 50。"
              },
              "timeout_seconds": {
                "type": "integer",
                "description": "边缘侧诊断超时,单位秒。默认 25,硬上限 30。"
              }
            }
          }
        }
      },
      "DiagnoseResponse": {
        "type": "object",
        "description": "按 operation 区分的诊断结果。请先检查 `operation`,再处理 `results[]`。`results[].patterns`(对应 `log_patterns`)与 `results[].series`(对应 `metric_trends`)的结构因 operation 不同而不同;完整 schema 见 monit-webapi diagnose-api 文档。",
        "properties": {
          "operation": {
            "type": "string",
            "enum": [
              "log_patterns",
              "metric_trends"
            ]
          },
          "ds_type": {
            "type": "string"
          },
          "ds_name": {
            "type": "string"
          },
          "query": {
            "type": "string",
            "description": "从请求中回显的查询字符串。"
          },
          "window": {
            "type": "object",
            "properties": {
              "start": {
                "type": "integer",
                "format": "int64"
              },
              "end": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          "results": {
            "type": "array",
            "description": "与请求中的 `methods[]` 一一对应,顺序一致。",
            "items": {
              "type": "object",
              "properties": {
                "method": {
                  "type": "string",
                  "description": "`log_patterns` 对应 `pattern_snapshot` / `pattern_compare`;`metric_trends` 对应 `single_window_shape` / `window_compare`。"
                },
                "baseline": {
                  "type": "string",
                  "description": "仅在 compare 类方法中出现。"
                },
                "window": {
                  "type": "object",
                  "properties": {
                    "start": {
                      "type": "integer",
                      "format": "int64"
                    },
                    "end": {
                      "type": "integer",
                      "format": "int64"
                    }
                  }
                },
                "baseline_window": {
                  "type": "object",
                  "description": "仅在 compare 类方法中出现。",
                  "properties": {
                    "start": {
                      "type": "integer",
                      "format": "int64"
                    },
                    "end": {
                      "type": "integer",
                      "format": "int64"
                    }
                  }
                },
                "summary": {
                  "type": "object",
                  "description": "该方法的聚合摘要。结构因方法而异:`log_patterns` 包含 logs_scanned、patterns_total、surging_threshold 等;`metric_trends` 包含 series_total、data_quality、observations 等。"
                },
                "patterns": {
                  "type": "array",
                  "description": "仅 `log_patterns` 返回。按 RCA 优先级排序;每项包含 pattern_hash、template、count、severity、sources、examples,以及(compare 情形下)baseline_count、change_ratio、is_new、is_gone。",
                  "items": {
                    "type": "object"
                  }
                },
                "series": {
                  "type": "array",
                  "description": "仅 `metric_trends` 返回。显著序列,带 current / baseline / change / notable_period 字段。",
                  "items": {
                    "type": "object"
                  }
                },
                "warnings": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "单方法的提示信息(如 `examples redacted`、采样提示等)。"
                }
              }
            }
          }
        }
      },
      "ToolCatalogRequest": {
        "type": "object",
        "required": [
          "target_locator"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "可选的一致性校验。若提供,必须等于已认证账户。"
          },
          "target_locator": {
            "type": "string",
            "description": "监控对象标识(主机名、MySQL 地址等)。最长 256 字节;不允许空白、控制字符或 `|`。"
          },
          "target_kind": {
            "type": "string",
            "description": "可选的 target kind。省略时 webapi 在当前已知的 kind 中自动推断。内置 kind:`host`、`mysql`。上次返回 `ambiguous_target_kind` 时,重试必须传入此字段。"
          },
          "include_output_shape": {
            "type": "boolean",
            "description": "为 true 时,每个工具条目额外返回其 `output_shape` JSON Schema。默认 false,以便为 LLM 消费保持响应精简。",
            "default": false
          }
        }
      },
      "ToolCatalogResponse": {
        "type": "object",
        "properties": {
          "target": {
            "type": "object",
            "nullable": true,
            "description": "解析出的监控对象。若 locator 无法唯一解析,则为 `null`。",
            "properties": {
              "kind": {
                "type": "string"
              },
              "locator": {
                "type": "string"
              }
            }
          },
          "tools": {
            "type": "array",
            "description": "工具能力清单条目。当 `error` 不为空时为空。",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "工具名;作为 `/monit/tools/invoke` 的 `tools[].tool` 传入。"
                },
                "target_kind": {
                  "type": "string",
                  "description": "该工具适用的 target kind。"
                },
                "description": {
                  "type": "string",
                  "description": "工具能力描述,供 UI / AI-SRE 使用。"
                },
                "input_schema": {
                  "type": "object",
                  "description": "用于 `tools[].params` 的 JSON Schema。"
                },
                "output_shape": {
                  "type": "object",
                  "description": "可选的输出 JSON Schema;仅当 `include_output_shape=true` 时返回。"
                }
              }
            }
          },
          "error": {
            "type": "object",
            "nullable": true,
            "description": "业务错误。成功时为 `null`。",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "target_unavailable",
                  "unknown_toolset_hash",
                  "ambiguous_target_kind"
                ]
              },
              "message": {
                "type": "string"
              },
              "target_kinds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "在 `ambiguous_target_kind` 时返回;列出候选的 kind。"
              }
            }
          }
        }
      },
      "ToolInvokeRequest": {
        "type": "object",
        "required": [
          "target_locator",
          "tools"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "可选的一致性校验。若提供,必须等于已认证账户。"
          },
          "target_locator": {
            "type": "string",
            "description": "监控对象标识。校验规则与 `/monit/tools/catalog` 相同。"
          },
          "target_kind": {
            "type": "string",
            "description": "可选的 target kind;省略时自动推断。"
          },
          "tools": {
            "type": "array",
            "minItems": 1,
            "maxItems": 8,
            "description": "至多 8 个工具调用;webapi 会并发执行,并按入参顺序返回结果。",
            "items": {
              "type": "object",
              "required": [
                "tool"
              ],
              "properties": {
                "tool": {
                  "type": "string",
                  "description": "工具名,通常来自 `/monit/tools/catalog`。"
                },
                "params": {
                  "type": "object",
                  "description": "符合工具能力清单中 `input_schema` 的参数。无参工具请显式传 `{}`。",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      },
      "ToolInvokeResponse": {
        "type": "object",
        "properties": {
          "target": {
            "type": "object",
            "nullable": true,
            "description": "解析出的监控对象。",
            "properties": {
              "kind": {
                "type": "string"
              },
              "locator": {
                "type": "string"
              }
            }
          },
          "results": {
            "type": "array",
            "description": "按入参 `tools[]` 顺序对齐的单工具结果。当 `error` 不为空时为空。",
            "items": {
              "type": "object",
              "properties": {
                "tool": {
                  "type": "string"
                },
                "tool_version": {
                  "type": "string",
                  "description": "Agent 执行的工具版本。若执行在 Agent 选定版本之前就失败了,则为空。"
                },
                "data": {
                  "type": "object",
                  "nullable": true,
                  "description": "工具执行成功时的负载——monit-agent `ToolResultPayload.data` 的透传(通常包含 `data` / `summary` / `truncated`)。当单工具 `error` 被设置时为 `null`。"
                },
                "error": {
                  "type": "object",
                  "nullable": true,
                  "description": "单工具错误。与 `data` 互斥。",
                  "properties": {
                    "code": {
                      "type": "string",
                      "description": "常见取值:`timeout`、`target_unavailable`、`edge_unsupported`、`invalid_tool_result`、`internal`、`invalid_args`、`unknown_tool`、`unknown_tool_version`、`unknown_toolset_hash`、`target_not_owned`、`wrong_agent`、`overloaded`、`denied`、`permission_denied`、`credential_unavailable`、`target_unreachable`。"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "agent_elapsed_ms": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Agent 自报的工具执行耗时,单位毫秒,不含网络。当失败发生在 Agent 开始执行之前时可能为 0。"
                },
                "e2e_elapsed_ms": {
                  "type": "integer",
                  "format": "int64",
                  "description": "webapi 观测的端到端耗时,单位毫秒(webapi → ws → edge → agent → ws → webapi)。与 `agent_elapsed_ms` 差距较大表示网络 / 边缘侧慢。"
                }
              }
            }
          },
          "error": {
            "type": "object",
            "nullable": true,
            "description": "请求级业务错误。成功时为 `null`。",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "target_unavailable",
                  "unknown_toolset_hash",
                  "forward_failed",
                  "invalid_tool_result",
                  "ambiguous_target_kind"
                ]
              },
              "message": {
                "type": "string"
              },
              "target_kinds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "TargetsListRequest": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "可选的一致性校验。若提供,必须等于已认证账户。"
          },
          "keyword": {
            "type": "string",
            "description": "对 `target_locator` 的前缀匹配。仅 ASCII,不含空白,不含 `|`,最长 256 字节。不支持子串搜索。"
          },
          "limit": {
            "type": "integer",
            "description": "分页大小。默认 50,最大 200。",
            "default": 50,
            "maximum": 200
          },
          "cursor": {
            "type": "string",
            "description": "来自上次响应的 `next_cursor` 的不透明游标。首页请省略或传空串。变更 `keyword`、`limit` 或租户时必须重置。"
          }
        }
      },
      "TargetsListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "target_kind": {
                  "type": "string",
                  "description": "Target kind,如 `host`、`mysql`。v1 不支持按 kind 过滤。"
                },
                "target_locator": {
                  "type": "string",
                  "description": "监控对象标识;列表按此字段升序排序。"
                },
                "agent_version": {
                  "type": "string",
                  "description": "最近一次观测到的 Agent 版本。"
                },
                "cluster_name": {
                  "type": "string",
                  "description": "边缘集群名。"
                },
                "edge_ipport": {
                  "type": "string",
                  "description": "边缘实例地址(`ip:port`),供排障使用。"
                },
                "updated_at": {
                  "type": "integer",
                  "format": "int64",
                  "description": "最近一次路由投影写入时间,Unix 秒。视为\"最近一次被观测到\",而非实时在线指标。"
                }
              }
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "当前 `(account_id, keyword)` 组合下的匹配总数,与 `cursor` 无关。"
          },
          "next_cursor": {
            "type": "string",
            "description": "下一页的不透明游标。缺失 / 为空表示已到末页。"
          }
        }
      },
      "ListChangeResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "匹配的变更总数。",
            "format": "int64"
          },
          "has_next_page": {
            "type": "boolean",
            "description": "当前页之后是否还有更多页。"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChangeItem"
            },
            "description": "当前页的变更列表。"
          }
        }
      },
      "ChangeItem": {
        "type": "object",
        "properties": {
          "change_id": {
            "type": "string",
            "description": "变更 ID，MongoDB ObjectID 十六进制字符串。"
          },
          "account_id": {
            "type": "integer",
            "description": "变更所属账户。",
            "format": "int64"
          },
          "channel_id": {
            "type": "integer",
            "description": "变更所属协作通道。",
            "format": "int64"
          },
          "channel_name": {
            "type": "string",
            "description": "协作通道名称。"
          },
          "channel_status": {
            "type": "string",
            "description": "协作通道状态。"
          },
          "integration_id": {
            "type": "integer",
            "description": "上报该变更的集成。",
            "format": "int64"
          },
          "integration_name": {
            "type": "string",
            "description": "上报集成的名称。"
          },
          "title": {
            "type": "string",
            "description": "变更标题。"
          },
          "description": {
            "type": "string",
            "description": "变更描述。"
          },
          "change_key": {
            "type": "string",
            "description": "用于聚合同一变更下事件的稳定键。"
          },
          "change_status": {
            "type": "string",
            "description": "变更当前的生命周期状态。"
          },
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "变更开始时的 Unix 时间戳（秒）。"
          },
          "last_time": {
            "type": "integer",
            "format": "int64",
            "description": "变更最近活动的 Unix 时间戳（秒）。"
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "变更结束时的 Unix 时间戳（秒）。"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "附加到变更上的键值标签。"
          },
          "link": {
            "type": "string",
            "description": "指向源变更记录的外部链接。"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChangeEventItem"
            },
            "description": "底层变更事件，仅在 include_events 为 true 时返回。"
          }
        }
      },
      "ChangeEventItem": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "description": "变更事件 ID，MongoDB ObjectID 十六进制字符串。"
          },
          "account_id": {
            "type": "integer",
            "description": "变更事件所属账户。",
            "format": "int64"
          },
          "channel_id": {
            "type": "integer",
            "description": "变更事件所属协作通道。",
            "format": "int64"
          },
          "integration_id": {
            "type": "integer",
            "description": "上报该变更事件的集成。",
            "format": "int64"
          },
          "title": {
            "type": "string",
            "description": "变更事件标题。"
          },
          "description": {
            "type": "string",
            "description": "变更事件描述。"
          },
          "change_key": {
            "type": "string",
            "description": "用于聚合同一变更下事件的稳定键。"
          },
          "change_status": {
            "type": "string",
            "description": "变更事件的生命周期状态。",
            "enum": [
              "Planned",
              "Ready",
              "Processing",
              "Canceled",
              "Done"
            ]
          },
          "link": {
            "type": "string",
            "description": "指向源变更记录的外部链接。"
          },
          "event_time": {
            "type": "integer",
            "format": "int64",
            "description": "变更事件发生时的 Unix 时间戳（秒）。"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "附加到变更事件上的键值标签。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "变更事件创建时的 Unix 时间戳（秒）。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "变更事件最近更新时的 Unix 时间戳（秒）。"
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64",
            "description": "变更事件删除时的 Unix 时间戳（秒）。"
          }
        }
      },
      "GetWarRoomDefaultObserversResponse": {
        "type": "object",
        "properties": {
          "observers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WarRoomPersonItem"
            },
            "description": "建议作为作战室默认观察者的历史响应人。"
          }
        }
      },
      "WarRoomPersonItem": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "integer",
            "description": "该人员所属账户。",
            "format": "int64"
          },
          "person_id": {
            "type": "integer",
            "description": "人员 ID。",
            "format": "int64"
          },
          "person_name": {
            "type": "string",
            "description": "人员显示名称。"
          },
          "avatar": {
            "type": "string",
            "description": "人员头像图片 URL。"
          },
          "email": {
            "type": "string",
            "description": "人员邮箱地址。"
          },
          "phone": {
            "type": "string",
            "description": "人员电话号码。"
          },
          "locale": {
            "type": "string",
            "description": "人员偏好的语言区域。"
          },
          "time_zone": {
            "type": "string",
            "description": "人员所在时区。"
          },
          "as": {
            "type": "string",
            "description": "人员在相关上下文中担任的角色。"
          },
          "status": {
            "type": "string",
            "description": "人员当前状态。"
          }
        }
      },
      "GetWarRoomDefaultObserversRequest": {
        "type": "object",
        "properties": {
          "incident_id": {
            "type": "string",
            "description": "故障 ID，MongoDB ObjectID 十六进制字符串。"
          }
        },
        "required": [
          "incident_id"
        ]
      },
      "PreviewTemplateResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "模板是否渲染成功。"
          },
          "content": {
            "type": "string",
            "description": "渲染后的模板输出，success 为 true 时返回。"
          },
          "message": {
            "type": "string",
            "description": "渲染失败的错误说明，success 为 false 时返回。"
          }
        }
      },
      "ResponseEnvelope": {
        "type": "object",
        "description": "Standard response envelope used by every Flashduty public API. On success `data` contains the endpoint-specific payload and `error` is absent. On failure `error` is present and `data` is absent. `request_id` is always present and is also mirrored in the `Flashcat-Request-Id` response header.",
        "properties": {
          "request_id": {
            "type": "string",
            "description": "Unique ID for this request. Mirrored in the Flashcat-Request-Id header. Include it when reporting issues.",
            "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
          },
          "error": {
            "$ref": "#/components/schemas/DutyError"
          },
          "data": {
            "description": "Endpoint-specific payload. See each operation's 200 response schema."
          }
        },
        "required": [
          "request_id"
        ]
      },
      "ListChangeRequest": {
        "type": "object",
        "properties": {
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "查询窗口起始的 Unix 时间戳（秒）。"
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "查询窗口结束的 Unix 时间戳（秒）。"
          },
          "p": {
            "type": "integer",
            "description": "页码，从 1 开始。",
            "format": "int64",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "description": "每页条数。",
            "format": "int64",
            "minimum": 1,
            "maximum": 100,
            "default": 10
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "description": "",
              "format": "int64"
            },
            "description": "按协作通道 ID 过滤。"
          },
          "integration_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "description": "",
              "format": "int64"
            },
            "description": "按上报集成 ID 过滤。"
          },
          "orderby": {
            "type": "string",
            "description": "结果排序字段。",
            "enum": [
              "start_time",
              "last_time"
            ]
          },
          "asc": {
            "type": "boolean",
            "description": "为 true 时升序排序。"
          },
          "include_events": {
            "type": "boolean",
            "description": "为 true 时返回每个变更的底层变更事件。"
          },
          "query": {
            "type": "string",
            "description": "对变更字段进行全文或正则搜索。"
          }
        }
      },
      "ListWarRoomEnabledResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WarRoomDataSourceItem"
            },
            "description": "已开启作战室功能的 IM 集成。"
          }
        }
      },
      "WarRoomDataSourceItem": {
        "type": "object",
        "properties": {
          "data_source_id": {
            "type": "integer",
            "description": "集成 ID。",
            "format": "int64"
          },
          "account_id": {
            "type": "integer",
            "description": "该集成所属账户。",
            "format": "int64"
          },
          "team_id": {
            "type": "integer",
            "description": "拥有该集成的团队。",
            "format": "int64"
          },
          "plugin_id": {
            "type": "integer",
            "description": "该集成对应的插件 ID。",
            "format": "int64"
          },
          "name": {
            "type": "string",
            "description": "集成名称。"
          },
          "status": {
            "type": "string",
            "description": "集成当前状态。"
          },
          "category": {
            "type": "string",
            "description": "集成插件的类别。"
          },
          "plugin_type": {
            "type": "string",
            "description": "集成插件的类型标识。"
          },
          "plugin_type_name": {
            "type": "string",
            "description": "集成插件类型的本地化显示名称。"
          },
          "description": {
            "type": "string",
            "description": "集成描述。"
          },
          "integration_key": {
            "type": "string",
            "description": "告警源向该集成推送时使用的推送密钥。"
          },
          "ref_id": {
            "type": "string",
            "description": "集成的外部引用 ID。"
          },
          "settings": {
            "type": "object",
            "additionalProperties": true,
            "description": "集成的插件特定配置。"
          },
          "no_editable": {
            "type": "boolean",
            "description": "集成是否为只读。"
          },
          "creator_id": {
            "type": "integer",
            "description": "创建该集成的人员。",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer",
            "description": "最近更新该集成的人员。",
            "format": "int64"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "集成创建时的 Unix 时间戳（秒）。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "集成最近更新时的 Unix 时间戳（秒）。"
          },
          "last_time": {
            "type": "integer",
            "format": "int64",
            "description": "集成最近活动的 Unix 时间戳（秒）。"
          },
          "exclusive_data_source_id": {
            "type": "integer",
            "description": "与该集成关联的专属集成 ID。",
            "format": "int64"
          },
          "integration_id": {
            "type": "integer",
            "description": "集成 ID，data_source_id 的别名。",
            "format": "int64"
          }
        }
      },
      "AddWarRoomMemberRequest": {
        "type": "object",
        "properties": {
          "integration_id": {
            "type": "integer",
            "description": "承载作战室的 IM 集成。",
            "format": "int64"
          },
          "chat_id": {
            "type": "string",
            "description": "IM 平台中作战室的群聊 ID。"
          },
          "member_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "description": "",
              "format": "int64"
            },
            "description": "要加入作战室的人员 ID 列表。"
          }
        },
        "required": [
          "integration_id",
          "chat_id",
          "member_ids"
        ]
      },
      "AccountInfo": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "integer",
            "description": "主体（账户）标识。"
          },
          "account_name": {
            "type": "string",
            "description": "主体名称。"
          },
          "domain": {
            "type": "string",
            "description": "主体主域名（登录子域名）。"
          },
          "extra_domains": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "主体的附加域名。"
          },
          "phone": {
            "type": "string",
            "description": "主体联系电话，已做隐私脱敏处理。"
          },
          "country_code": {
            "type": "string",
            "description": "联系电话的国家区号。"
          },
          "email": {
            "type": "string",
            "description": "主体联系邮箱。"
          },
          "avatar": {
            "type": "string",
            "description": "主体头像 URL。"
          },
          "locale": {
            "type": "string",
            "description": "主体语言偏好（例如 zh-CN、en-US）。"
          },
          "time_zone": {
            "type": "string",
            "description": "主体默认时区（IANA 名称，例如 Asia/Shanghai）。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "主体创建时间，Unix 时间戳（秒）。"
          },
          "restrictions": {
            "type": "object",
            "description": "主体访问限制（仅在已配置时返回）。",
            "properties": {
              "ips": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "允许的来源 IP/CIDR 白名单。"
              },
              "email_domains": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "允许的登录邮箱域名。"
              },
              "allow_subdomain": {
                "type": "boolean",
                "description": "是否同时接受允许邮箱域名的子域名。"
              }
            }
          },
          "mp_plat": {
            "type": "string",
            "description": "主体所属的云市场平台（仅云市场来源的主体返回）。"
          },
          "mp_account_id": {
            "type": "string",
            "description": "主体在云市场平台上的账户标识（仅云市场来源的主体返回）。"
          }
        }
      },
      "PreviewTemplateRequest": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "description": "要渲染的模板内容。"
          },
          "type": {
            "type": "string",
            "description": "决定渲染引擎的模板通道类型。"
          },
          "incident_id": {
            "type": "string",
            "description": "用于渲染模板的故障 ID，省略时使用模拟数据。MongoDB ObjectID 十六进制字符串。"
          }
        },
        "required": [
          "content",
          "type"
        ]
      },
      "ListStatusPageResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusPageItem"
            },
            "description": "账户拥有的状态页。"
          }
        }
      },
      "StatusPageItem": {
        "type": "object",
        "properties": {
          "page_id": {
            "type": "integer",
            "description": "状态页 ID。",
            "format": "int64"
          },
          "name": {
            "type": "string",
            "description": "状态页显示名称。"
          },
          "url_name": {
            "type": "string",
            "description": "URL 安全的别名，在账户内唯一。"
          },
          "type": {
            "type": "string",
            "description": "状态页可见性类型。",
            "enum": [
              "public",
              "internal"
            ]
          },
          "custom_domain": {
            "type": "string",
            "description": "指向状态页的自定义域名。"
          },
          "logo": {
            "type": "string",
            "description": "状态页 Logo 图片。"
          },
          "dark_logo": {
            "type": "string",
            "description": "状态页暗色模式 Logo 图片。"
          },
          "logo_url": {
            "type": "string",
            "description": "点击 Logo 时跳转的 URL。"
          },
          "favicon": {
            "type": "string",
            "description": "状态页的网站图标。"
          },
          "page_header": {
            "type": "string",
            "description": "状态页头部内容。"
          },
          "page_footer": {
            "type": "string",
            "description": "状态页底部内容。"
          },
          "date_view": {
            "type": "string",
            "description": "时间线的展示方式。",
            "enum": [
              "calendar",
              "list"
            ]
          },
          "display_uptime_mode": {
            "type": "string",
            "description": "可用率的展示方式。",
            "enum": [
              "chart_and_percentage",
              "chart",
              "none"
            ]
          },
          "custom_links": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            },
            "description": "状态页上展示的自定义导航链接。"
          },
          "contact_info": {
            "type": "string",
            "description": "联系方式，mailto 或网站 URL。"
          },
          "components": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusPageComponentItem"
            },
            "description": "状态页跟踪的组件。"
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusPageSectionItem"
            },
            "description": "对组件进行分组的分组列表。"
          },
          "subscription": {
            "$ref": "#/components/schemas/StatusPageSubscriptionItem"
          },
          "template_preference": {
            "type": "string",
            "description": "偏好的变更事件模板类型。"
          }
        }
      },
      "StatusPageSubscriptionItem": {
        "type": "object",
        "properties": {
          "email": {
            "type": "boolean",
            "description": "是否开启邮件订阅。"
          },
          "im": {
            "type": "boolean",
            "description": "是否开启 IM 订阅。"
          }
        }
      },
      "StatusPageSectionItem": {
        "type": "object",
        "properties": {
          "section_id": {
            "type": "string",
            "description": "分组 ID。"
          },
          "name": {
            "type": "string",
            "description": "分组名称。"
          },
          "description": {
            "type": "string",
            "description": "分组描述。"
          },
          "order_id": {
            "type": "integer",
            "description": "分组的展示顺序。",
            "format": "int64"
          },
          "hide_uptime": {
            "type": "boolean",
            "description": "是否在汇总响应中隐藏可用率数据。"
          },
          "hide_all": {
            "type": "boolean",
            "description": "是否在汇总接口中隐藏该分组及其组件。"
          }
        }
      },
      "DeletePostMortemTemplateRequest": {
        "type": "object",
        "description": "删除故障复盘模板的参数。",
        "required": [
          "template_id"
        ],
        "properties": {
          "template_id": {
            "type": "string",
            "description": "模板 ID。"
          }
        }
      },
      "InitPostMortemRequest": {
        "type": "object",
        "description": "从故障初始化复盘报告的参数。",
        "required": [
          "incident_ids",
          "template_id"
        ],
        "properties": {
          "incident_ids": {
            "type": "array",
            "minItems": 1,
            "maxItems": 10,
            "items": {
              "type": "string"
            },
            "description": "要关联到复盘报告的故障 ID，1-10 个。"
          },
          "template_id": {
            "type": "string",
            "description": "用于初始化报告的模板 ID。"
          }
        }
      },
      "ListPostMortemTemplatesRequest": {
        "type": "object",
        "description": "故障复盘模板的分页与排序参数。",
        "properties": {
          "order_by": {
            "type": "string",
            "enum": [
              "created_at_seconds"
            ],
            "description": "排序字段。"
          },
          "asc": {
            "type": "boolean",
            "description": "为 true 时按升序排序。"
          },
          "p": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "页码，从 1 开始。"
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 100,
            "default": 20,
            "description": "每页数量，最多 100。"
          },
          "search_after_ctx": {
            "type": "string",
            "description": "上一页响应返回的向后分页游标。"
          }
        }
      },
      "ListPostMortemTemplatesResponse": {
        "type": "object",
        "description": "分页后的故障复盘模板列表。",
        "required": [
          "items",
          "total",
          "has_next_page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostMortemTemplate"
            },
            "description": "当前页的模板。"
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "匹配的模板总数。"
          },
          "has_next_page": {
            "type": "boolean",
            "description": "为 true 表示还有下一页。"
          },
          "search_after_ctx": {
            "type": "string",
            "description": "向后分页游标。"
          }
        }
      },
      "PostMortemTemplate": {
        "type": "object",
        "description": "故障复盘报告模板。",
        "required": [
          "account_id",
          "template_id",
          "name",
          "description",
          "content",
          "content_markdown",
          "team_id",
          "created_at_seconds",
          "updated_at_seconds"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "模板所属账号 ID。内置模板为 0。"
          },
          "template_id": {
            "type": "string",
            "description": "模板 ID。内置模板使用稳定的 `post_mortem_default_tmpl_*` ID。"
          },
          "name": {
            "type": "string",
            "description": "控制台展示的模板名称。"
          },
          "description": {
            "type": "string",
            "description": "模板描述。"
          },
          "content": {
            "type": "string",
            "description": "用于初始化复盘正文的 BlockNote JSON 内容。"
          },
          "content_markdown": {
            "type": "string",
            "description": "模板内容的 Markdown 版本，供 AI 生成使用。"
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "管理团队 ID。内置模板为 0。"
          },
          "created_at_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "模板创建时间的 Unix 秒级时间戳。"
          },
          "updated_at_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "模板最近更新时间的 Unix 秒级时间戳。"
          }
        }
      },
      "PreviewSyncRequest": {
        "type": "object",
        "required": [
          "ds_type",
          "ds_name",
          "expr"
        ],
        "description": "同步数据源查询预览的参数。",
        "properties": {
          "ds_type": {
            "type": "string",
            "description": "数据源类型，如 `prometheus`、`loki`、`elasticsearch`。"
          },
          "ds_name": {
            "type": "string",
            "description": "账户中配置的数据源显示名称。"
          },
          "expr": {
            "type": "string",
            "description": "查询表达式，格式因 `ds_type` 而异（Prometheus 为 PromQL，Loki 为 LogQL 等）。"
          },
          "delay_seconds": {
            "type": "integer",
            "description": "将查询窗口向前偏移的秒数，用于补偿数据摄入延迟。"
          },
          "args": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "特定类型的额外查询参数。"
          }
        }
      },
      "PreviewSyncResponse": {
        "type": "object",
        "description": "数据源返回的原始 JSON，结构随数据源类型而异。"
      },
      "ResetPostMortemBasicsRequest": {
        "type": "object",
        "description": "写回复盘报告的故障基础信息。",
        "required": [
          "post_mortem_id",
          "incidents_highest_severity",
          "incidents_earliest_start_seconds"
        ],
        "properties": {
          "post_mortem_id": {
            "type": "string",
            "description": "复盘 ID。"
          },
          "incidents_highest_severity": {
            "type": "string",
            "description": "关联故障中的最高严重级别。"
          },
          "incidents_earliest_start_seconds": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "description": "最早关联故障开始时间的 Unix 秒级时间戳。"
          },
          "incidents_latest_close_seconds": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "最晚关联故障关闭时间的 Unix 秒级时间戳；仍未关闭时为 0。"
          },
          "incidents_total_duration_seconds": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "故障总持续时间，单位秒。"
          },
          "responder_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "写入报告的响应人成员 ID。"
          }
        }
      },
      "ResetPostMortemFollowUpsRequest": {
        "type": "object",
        "description": "替换复盘后续行动项的参数。",
        "required": [
          "post_mortem_id"
        ],
        "properties": {
          "post_mortem_id": {
            "type": "string",
            "description": "复盘 ID。"
          },
          "follow_ups": {
            "type": "string",
            "description": "自由文本格式的后续行动项。"
          }
        }
      },
      "ResetPostMortemStatusRequest": {
        "type": "object",
        "description": "更新复盘报告状态的参数。",
        "required": [
          "post_mortem_id",
          "status"
        ],
        "properties": {
          "post_mortem_id": {
            "type": "string",
            "description": "复盘 ID。"
          },
          "status": {
            "type": "string",
            "enum": [
              "drafting",
              "published"
            ],
            "description": "目标报告状态。"
          }
        }
      },
      "ResetPostMortemTitleRequest": {
        "type": "object",
        "description": "更新复盘报告标题的参数。",
        "required": [
          "post_mortem_id",
          "title"
        ],
        "properties": {
          "post_mortem_id": {
            "type": "string",
            "description": "复盘 ID。"
          },
          "title": {
            "type": "string",
            "description": "新的报告标题。"
          }
        }
      },
      "RumWebhookTestRequest": {
        "type": "object",
        "description": "发送 RUM 告警样例 Webhook 的参数。",
        "required": [
          "application_id",
          "webhook_url"
        ],
        "properties": {
          "application_id": {
            "type": "string",
            "description": "RUM 应用 ID。"
          },
          "webhook_url": {
            "type": "string",
            "format": "uri",
            "description": "接收样例告警事件的 Webhook URL。"
          }
        }
      },
      "RumWebhookTestResponse": {
        "type": "object",
        "description": "Webhook 测试投递结果。",
        "required": [
          "ok",
          "status_code",
          "message"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "description": "Webhook 端点是否接受了样例事件。"
          },
          "status_code": {
            "type": "integer",
            "description": "Webhook 端点返回的 HTTP 状态码。未收到响应时为 0。"
          },
          "message": {
            "type": "string",
            "description": "成功时为 `ok`，失败时为投递错误信息。"
          }
        }
      },
      "TryLinkPersonRequest": {
        "type": "object",
        "description": "尝试自动关联 IM 账号的参数。",
        "required": [
          "integration_id"
        ],
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "IM 集成 ID。"
          }
        }
      },
      "TryLinkPersonResponse": {
        "type": "object",
        "description": "本次尝试关联成功的人员。",
        "required": [
          "new_linked_person_ids"
        ],
        "properties": {
          "new_linked_person_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "本次调用中新关联成功的人员 ID。"
          }
        }
      },
      "UpsertPostMortemTemplateRequest": {
        "type": "object",
        "description": "创建或更新故障复盘模板的参数。",
        "required": [
          "name",
          "content"
        ],
        "properties": {
          "template_id": {
            "type": "string",
            "description": "模板 ID。创建新模板时省略；更新已有模板时传入。"
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "管理团队 ID。创建自定义模板时必填。"
          },
          "name": {
            "type": "string",
            "description": "模板名称。"
          },
          "description": {
            "type": "string",
            "description": "模板描述。"
          },
          "content": {
            "type": "string",
            "description": "BlockNote JSON 模板内容。"
          },
          "content_markdown": {
            "type": "string",
            "description": "模板内容的 Markdown 版本。"
          }
        }
      },
      "DeleteStatusPageComponentRequest": {
        "type": "object",
        "description": "删除状态页服务组件的请求参数。",
        "required": [
          "page_id",
          "component_ids"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "状态页 ID。"
          },
          "component_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "要删除的组件 ID 列表。"
          }
        }
      },
      "DeleteStatusPageSectionRequest": {
        "type": "object",
        "description": "删除状态页区域的请求参数。",
        "required": [
          "page_id",
          "section_ids"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "状态页 ID。"
          },
          "section_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "要删除的区域 ID 列表。"
          }
        }
      },
      "DeleteStatusPageTemplateRequest": {
        "type": "object",
        "description": "删除状态页模板的请求参数。",
        "required": [
          "page_id",
          "type",
          "template_id"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "状态页 ID。"
          },
          "type": {
            "type": "string",
            "enum": [
              "pre_defined",
              "message"
            ],
            "description": "模板分类。"
          },
          "template_id": {
            "type": "string",
            "description": "要删除的模板 ID。"
          }
        }
      },
      "UpsertStatusPageComponentRequest": {
        "type": "object",
        "description": "创建或更新状态页服务组件的请求参数。",
        "required": [
          "page_id",
          "components"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "状态页 ID。"
          },
          "components": {
            "type": "array",
            "description": "要创建或更新的组件列表。",
            "items": {
              "type": "object",
              "required": [
                "name"
              ],
              "properties": {
                "component_id": {
                  "type": "string",
                  "description": "组件 ID。省略则创建新组件；提供则更新已有组件。"
                },
                "section_id": {
                  "type": "string",
                  "description": "所属区域 ID。省略则将组件置于顶层。"
                },
                "name": {
                  "type": "string",
                  "description": "组件显示名称。"
                },
                "description": {
                  "type": "string",
                  "description": "组件描述。"
                },
                "order_id": {
                  "type": "integer",
                  "format": "int64",
                  "description": "在所属区域中的显示顺序。"
                },
                "hide_uptime": {
                  "type": "boolean",
                  "description": "为 true 时，在汇总接口中隐藏该组件的可用率数据。"
                },
                "hide_all": {
                  "type": "boolean",
                  "description": "为 true 时，在汇总接口中完全隐藏该组件。"
                }
              }
            }
          }
        }
      },
      "UpsertStatusPageComponentResponse": {
        "type": "object",
        "description": "创建或更新状态页组件的结果。",
        "required": [
          "component_ids"
        ],
        "properties": {
          "component_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "创建或更新的组件 ID 列表，顺序与请求一致。"
          }
        }
      },
      "UpsertStatusPageSectionRequest": {
        "type": "object",
        "description": "创建或更新状态页区域的请求参数。",
        "required": [
          "page_id",
          "sections"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "状态页 ID。"
          },
          "sections": {
            "type": "array",
            "description": "要创建或更新的区域列表。",
            "items": {
              "type": "object",
              "required": [
                "name"
              ],
              "properties": {
                "section_id": {
                  "type": "string",
                  "description": "区域 ID。省略则创建新区域；提供则更新已有区域。"
                },
                "name": {
                  "type": "string",
                  "description": "区域显示名称。"
                },
                "description": {
                  "type": "string",
                  "description": "区域描述。"
                },
                "order_id": {
                  "type": "integer",
                  "format": "int64",
                  "description": "显示顺序。"
                },
                "hide_uptime": {
                  "type": "boolean",
                  "description": "为 true 时，隐藏该区域下所有组件的可用率数据。"
                },
                "hide_all": {
                  "type": "boolean",
                  "description": "为 true 时，在汇总接口中完全隐藏该区域。"
                }
              }
            }
          }
        }
      },
      "UpsertStatusPageSectionResponse": {
        "type": "object",
        "description": "创建或更新状态页区域的结果。",
        "required": [
          "section_ids"
        ],
        "properties": {
          "section_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "创建或更新的区域 ID 列表，顺序与请求一致。"
          }
        }
      },
      "UpsertStatusPageTemplateRequest": {
        "type": "object",
        "description": "创建或更新状态页模板的请求参数。",
        "required": [
          "page_id",
          "type",
          "template"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "状态页 ID。"
          },
          "type": {
            "type": "string",
            "enum": [
              "pre_defined",
              "message"
            ],
            "description": "模板分类。`pre_defined` 为预定义事件模板；`message` 为通知消息模板。"
          },
          "template": {
            "type": "object",
            "description": "模板内容。",
            "required": [
              "title",
              "event_type",
              "status"
            ],
            "properties": {
              "template_id": {
                "type": "string",
                "description": "模板 ID。省略则创建；提供则更新。"
              },
              "title": {
                "type": "string",
                "description": "模板标题。"
              },
              "event_type": {
                "type": "string",
                "enum": [
                  "incident",
                  "maintenance"
                ],
                "description": "本模板适用的事件类型。"
              },
              "status": {
                "type": "string",
                "enum": [
                  "investigating",
                  "identified",
                  "monitoring",
                  "resolved",
                  "scheduled",
                  "ongoing",
                  "completed"
                ],
                "description": "本模板对应的事件状态。"
              },
              "description": {
                "type": "string",
                "description": "模板正文（Markdown）。"
              }
            }
          }
        }
      },
      "UpsertStatusPageTemplateResponse": {
        "type": "object",
        "description": "创建或更新状态页模板的结果。",
        "required": [
          "template_id"
        ],
        "properties": {
          "template_id": {
            "type": "string",
            "description": "创建或更新的模板 ID。"
          }
        }
      },
      "FacetCountItem": {
        "type": "object",
        "description": "一个分面值及其出现次数。",
        "required": [
          "facet_value",
          "count"
        ],
        "properties": {
          "facet_value": {
            "description": "分面值，类型与字段的 `value_type` 一致。"
          },
          "count": {
            "type": "integer",
            "format": "int64",
            "description": "该时间范围内具有此分面值的事件数量。",
            "example": 1523
          }
        }
      },
      "RumDataAggregateFunction": {
        "type": "object",
        "description": "采样引擎使用的聚合函数元信息。",
        "required": [
          "type",
          "column_name",
          "column_index"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "聚合函数类型。"
          },
          "column_name": {
            "type": "string",
            "description": "聚合函数使用的列名。"
          },
          "column_index": {
            "type": "integer",
            "description": "聚合函数使用的列下标。"
          }
        }
      },
      "RumDataFieldMeta": {
        "type": "object",
        "description": "单个返回列的元信息。",
        "required": [
          "name",
          "type",
          "nullable"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "列名。"
          },
          "type": {
            "type": "string",
            "description": "该列的后端数据库类型名称。"
          },
          "nullable": {
            "type": "boolean",
            "description": "该列的值是否可能为 null。"
          }
        }
      },
      "RumDataQueryDefinition": {
        "type": "object",
        "description": "单个 RUM 数据查询定义。",
        "required": [
          "id",
          "sql",
          "format"
        ],
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 64,
            "description": "调用方提供的查询 ID；响应对象会使用同一值作为 key。"
          },
          "sql": {
            "type": "string",
            "description": "要执行的 RUM SQL 查询。"
          },
          "dql": {
            "type": "string",
            "description": "可选的 RUM DQL 过滤表达式，会和 SQL 校验一起使用。"
          },
          "format": {
            "type": "string",
            "enum": [
              "time_series",
              "table"
            ],
            "description": "输出格式。`table` 返回行数据；`time_series` 返回按时间桶聚合的时序数据。"
          },
          "interval": {
            "type": "integer",
            "format": "int64",
            "exclusiveMinimum": 0,
            "default": 3600,
            "description": "`time_series` 查询的时间桶间隔，单位秒。"
          },
          "max_points": {
            "type": "integer",
            "format": "int64",
            "exclusiveMinimum": 0,
            "default": 1226,
            "description": "`time_series` 查询最多返回的点数。"
          },
          "time_zone": {
            "type": "string",
            "description": "计算时间函数时使用的 IANA 时区名称，例如 `Asia/Shanghai`。"
          },
          "search_after_ctx": {
            "type": "string",
            "description": "上一次表格查询返回的不透明游标，用于继续分页。"
          },
          "disable_sampling": {
            "type": "boolean",
            "description": "为 true 时，请求查询引擎尽可能避免采样。"
          }
        }
      },
      "RumDataQueryOutput": {
        "type": "object",
        "description": "单个查询的结果。失败的子查询填充 `error`；成功的子查询填充 `data`。",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/DutyError"
          },
          "data": {
            "$ref": "#/components/schemas/RumDataQueryResult"
          }
        }
      },
      "RumDataQueryRequest": {
        "type": "object",
        "description": "指定时间范围内的一组 RUM 数据查询。",
        "required": [
          "start_time",
          "end_time",
          "queries"
        ],
        "properties": {
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "查询窗口起始时间，Unix 毫秒时间戳。",
            "example": 1712620800000
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "查询窗口结束时间，Unix 毫秒时间戳。最大跨度 31 天。",
            "example": 1712707200000
          },
          "queries": {
            "type": "array",
            "description": "并发执行的查询列表，允许 1 到 10 个。",
            "minItems": 1,
            "maxItems": 10,
            "items": {
              "$ref": "#/components/schemas/RumDataQueryDefinition"
            }
          }
        }
      },
      "RumDataQueryResponse": {
        "type": "object",
        "description": "从请求中的查询 ID 到该查询结果或错误的映射。",
        "additionalProperties": {
          "$ref": "#/components/schemas/RumDataQueryOutput"
        }
      },
      "RumDataQueryResult": {
        "type": "object",
        "description": "单个 RUM 数据查询返回的行数据和元信息。",
        "required": [
          "fields",
          "values"
        ],
        "properties": {
          "search_after_ctx": {
            "type": "string",
            "description": "用于继续表格查询分页的不透明游标。"
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RumDataFieldMeta"
            },
            "description": "返回值矩阵的列元信息。"
          },
          "values": {
            "type": "array",
            "description": "查询返回的行数据。每一行按下标与 `fields` 对齐。",
            "items": {
              "type": "array",
              "items": {}
            }
          },
          "interval": {
            "type": "integer",
            "format": "int64",
            "description": "时序查询实际使用的时间桶间隔，单位秒。"
          },
          "sampling": {
            "$ref": "#/components/schemas/RumDataSamplingDecision"
          }
        }
      },
      "RumDataSamplingDecision": {
        "type": "object",
        "description": "查询引擎使用采样数据时返回的采样元信息。",
        "required": [
          "enabled",
          "scale_factor"
        ],
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "是否应用了采样。"
          },
          "scale_factor": {
            "type": "number",
            "description": "将采样计数放大为全量估算值时使用的倍率。"
          },
          "selected_tablets": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "采样查询选中的存储 tablet。"
          },
          "aggregate_funcs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RumDataAggregateFunction"
            },
            "description": "受采样影响的聚合函数。"
          }
        }
      },
      "RumFacetCountRequest": {
        "type": "object",
        "description": "分面值分布统计的请求参数。",
        "required": [
          "scope",
          "facet_key",
          "start_time",
          "end_time"
        ],
        "properties": {
          "scope": {
            "type": "string",
            "description": "要查询的 RUM 数据 scope。",
            "enum": [
              "session",
              "view",
              "action",
              "error",
              "resource",
              "long_task",
              "vital",
              "issue",
              "sourcemap"
            ]
          },
          "facet_key": {
            "type": "string",
            "description": "要统计值分布的字段键。"
          },
          "facet_value": {
            "description": "设置后，统计前会先过滤 `facet_key` 等于该值的事件。接受字符串、数字或布尔值。"
          },
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "时间范围起始，Unix 毫秒时间戳。",
            "example": 1712620800000
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "时间范围结束，Unix 毫秒时间戳。最大跨度 31 天。",
            "example": 1712707200000
          },
          "dql": {
            "type": "string",
            "description": "统计前应用的 RUM DQL 过滤表达式。"
          },
          "sql": {
            "type": "string",
            "description": "仅含 WHERE 子句（无 SELECT）的 SQL 附加过滤条件。"
          },
          "limit": {
            "type": "integer",
            "description": "返回的最大 Top N 值数量。默认 100，最大 100。",
            "maximum": 100,
            "default": 100
          }
        }
      },
      "RumFacetCountResponse": {
        "type": "object",
        "description": "按计数降序排列的 Top N 分面值。",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FacetCountItem"
            }
          }
        }
      },
      "RumFacetListRequest": {
        "type": "object",
        "description": "RUM 字段定义列表的过滤参数。",
        "properties": {
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "按 RUM 数据 scope 过滤。合法值：`session`、`view`、`action`、`error`、`resource`、`long_task`、`vital`、`issue`、`sourcemap`。"
          },
          "is_facet": {
            "type": "boolean",
            "description": "为 true 时只返回支持分面查询的字段；为 false 或不传时返回所有字段。"
          }
        }
      },
      "RumFacetListResponse": {
        "type": "object",
        "description": "RUM 字段定义列表。",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RumFieldItem"
            }
          }
        }
      },
      "RumFieldItem": {
        "type": "object",
        "description": "一条 RUM 字段定义。",
        "required": [
          "account_id",
          "field_key",
          "field_name",
          "group",
          "description",
          "value_type",
          "show_type",
          "unit_family",
          "unit_name",
          "edit_able",
          "is_facet",
          "enum_values",
          "scopes",
          "status",
          "queryable"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "账户 ID。内置字段为 0。"
          },
          "field_key": {
            "type": "string",
            "description": "唯一字段键，如 `error.type`。"
          },
          "field_name": {
            "type": "string",
            "description": "人类可读的字段名称。"
          },
          "group": {
            "type": "string",
            "description": "字段的展示分组。"
          },
          "description": {
            "type": "string",
            "description": "该字段捕获内容的描述。"
          },
          "value_type": {
            "type": "string",
            "description": "字段值的数据类型。",
            "enum": [
              "string",
              "number",
              "boolean",
              "array<string>",
              "array<number>",
              "array<boolean>"
            ]
          },
          "show_type": {
            "type": "string",
            "description": "在分析 UI 中的展示类型。",
            "enum": [
              "list",
              "range"
            ]
          },
          "unit_family": {
            "type": "string",
            "description": "计量单位族，如 `time`、`bytes`。无量纲字段为空。"
          },
          "unit_name": {
            "type": "string",
            "description": "具体计量单位，如 `millisecond`、`byte`。"
          },
          "edit_able": {
            "type": "boolean",
            "description": "是否为用户可编辑的自定义字段。"
          },
          "is_facet": {
            "type": "boolean",
            "description": "是否支持值分布统计查询。"
          },
          "enum_values": {
            "type": "array",
            "description": "该字段的预定义枚举值。元素类型与 `value_type` 对应：字符串类型为 `string`，数字类型为 `number`，布尔类型为 `boolean`。无固定值集合时为空数组。",
            "items": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            }
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "该字段所属的 RUM scope 列表。"
          },
          "status": {
            "type": "string",
            "description": "字段状态，如 `active`。"
          },
          "queryable": {
            "type": "boolean",
            "description": "是否可在 DQL/SQL 查询中使用。"
          }
        }
      },
      "RumFieldListRequest": {
        "type": "object",
        "description": "RUM 字段定义列表的过滤参数。",
        "properties": {
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "按 RUM 数据 scope 过滤。合法值：`session`、`view`、`action`、`error`、`resource`、`long_task`、`vital`、`issue`、`sourcemap`。"
          },
          "is_facet": {
            "type": "boolean",
            "description": "为 true 时只返回支持分面查询的字段；为 false 或不传时返回所有字段。"
          }
        }
      },
      "RumFieldListResponse": {
        "type": "object",
        "description": "RUM 字段定义列表。",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RumFieldItem"
            }
          }
        }
      },
      "SourcemapBinaryImage": {
        "type": "object",
        "description": "崩溃报告中的已加载 binary image。",
        "required": [
          "uuid",
          "name",
          "is_system"
        ],
        "properties": {
          "uuid": {
            "type": "string",
            "description": "标识 binary 或 dSYM 的 build UUID。"
          },
          "name": {
            "type": "string",
            "description": "Binary image 名称。"
          },
          "is_system": {
            "type": "boolean",
            "description": "是否为操作系统自带 binary。"
          },
          "load_address": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "integer",
                "format": "int64"
              }
            ],
            "description": "运行时地址。接受 `0x100000000` 这样的十六进制字符串，也接受十进制整数。"
          },
          "max_address": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "integer",
                "format": "int64"
              }
            ],
            "description": "运行时地址。接受 `0x100000000` 这样的十六进制字符串，也接受十进制整数。"
          },
          "arch": {
            "type": "string",
            "description": "该 binary image 的 CPU 架构。"
          }
        }
      },
      "SourcemapCodeSnippet": {
        "type": "object",
        "description": "enrich 后栈帧附近的一行源码。",
        "required": [
          "line",
          "code"
        ],
        "properties": {
          "line": {
            "type": "integer",
            "description": "源码行号。"
          },
          "code": {
            "type": "string",
            "description": "该行源码内容。"
          }
        }
      },
      "SourcemapEnrichedFrame": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SourcemapStackFrame"
          },
          {
            "type": "object",
            "required": [
              "converted"
            ],
            "properties": {
              "converted": {
                "type": "boolean",
                "description": "该栈帧是否成功符号化或反混淆。"
              },
              "code_snippets": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SourcemapCodeSnippet"
                },
                "description": "该栈帧附近的源码片段。"
              },
              "original_frame": {
                "$ref": "#/components/schemas/SourcemapStackFrame"
              },
              "third_party": {
                "type": "boolean",
                "description": "该栈帧是否来自第三方或系统库。"
              }
            }
          }
        ]
      },
      "SourcemapStackEnrichRequest": {
        "type": "object",
        "description": "错误栈 enrich 请求。",
        "required": [
          "service",
          "version"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "browser",
              "android",
              "ios",
              "miniprogram",
              "harmony"
            ],
            "description": "来源平台。省略时默认按 `browser` 处理。"
          },
          "service": {
            "type": "string",
            "description": "上传 Sourcemap 时使用的应用或服务名称。"
          },
          "version": {
            "type": "string",
            "description": "上传 Sourcemap 时使用的应用版本。"
          },
          "stack": {
            "type": "string",
            "description": "待解析和 enrich 的原始错误栈。"
          },
          "near": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20,
            "description": "在转换后的栈帧附近返回的有效源码行数。"
          },
          "no_cache": {
            "type": "boolean",
            "description": "跳过缓存的 enrich 结果，主要用于调试。"
          },
          "build_id": {
            "type": "string",
            "description": "Gradle 插件 1.13.0 及以后版本使用的 Android build ID。"
          },
          "variant": {
            "type": "string",
            "description": "旧版 Gradle 插件使用的 Android build variant。"
          },
          "arch": {
            "type": "string",
            "description": "Android NDK 架构，例如 `arm`、`arm64`、`x86` 或 `x64`。"
          },
          "source_type": {
            "type": "string",
            "description": "Android 错误来源类型；native 符号化时配合 `arch` 传入 `ndk`。"
          },
          "binary_images": {
            "type": "array",
            "description": "iOS 崩溃报告中的已加载 binary image 列表。",
            "items": {
              "$ref": "#/components/schemas/SourcemapBinaryImage"
            }
          }
        }
      },
      "SourcemapStackEnrichResponse": {
        "type": "object",
        "description": "enrich 后的错误栈帧。",
        "required": [
          "frames"
        ],
        "properties": {
          "frames": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourcemapEnrichedFrame"
            }
          }
        }
      },
      "SourcemapStackFrame": {
        "type": "object",
        "description": "跨平台通用的已解析栈帧字段。",
        "properties": {
          "function": {
            "type": "string",
            "description": "函数或方法名称。"
          },
          "file": {
            "type": "string",
            "description": "源文件、URL 或模块路径。"
          },
          "line": {
            "type": "integer",
            "description": "行号。"
          },
          "column": {
            "type": "integer",
            "description": "JavaScript 或 Flutter 栈帧中的列号。"
          },
          "class_name": {
            "type": "string",
            "description": "Android Java/Kotlin 类名。"
          },
          "method_name": {
            "type": "string",
            "description": "不带类名前缀的 Android Java/Kotlin 方法名。"
          },
          "module": {
            "type": "string",
            "description": "iOS Swift/Objective-C 模块名。"
          },
          "address": {
            "type": "string",
            "description": "iOS 或 native 内存地址。"
          },
          "offset": {
            "type": "integer",
            "description": "相对函数起始位置的符号偏移。"
          },
          "native_address": {
            "type": "string",
            "description": "Unity IL native 地址。"
          }
        }
      },
      "CreateStatusPageRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "状态页展示名称。",
            "maxLength": 255
          },
          "url_name": {
            "type": "string",
            "description": "URL 安全的状态页路径，在账户和状态页类型内唯一。",
            "maxLength": 255
          },
          "type": {
            "type": "string",
            "description": "状态页可见性类型。",
            "enum": [
              "public",
              "internal"
            ]
          },
          "custom_domain": {
            "type": "string",
            "description": "公开状态页使用的自定义域名。",
            "maxLength": 255
          },
          "page_title": {
            "type": "string",
            "description": "状态页浏览器标题。"
          },
          "page_header": {
            "type": "string",
            "description": "状态页页头内容。"
          },
          "page_footer": {
            "type": "string",
            "description": "状态页页脚内容。"
          },
          "date_view": {
            "type": "string",
            "description": "事件日期展示方式。",
            "enum": [
              "calendar",
              "list"
            ]
          },
          "display_uptime_mode": {
            "type": "string",
            "description": "可用率展示方式。",
            "enum": [
              "chart_and_percentage",
              "chart",
              "none"
            ]
          },
          "custom_links": {
            "type": "array",
            "description": "状态页展示的自定义导航链接。",
            "items": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          "contact_info": {
            "type": "string",
            "description": "联系信息，例如 mailto 或网站 URL。"
          },
          "subscription": {
            "$ref": "#/components/schemas/StatusPageSubscriptionItem"
          }
        },
        "required": [
          "name",
          "url_name",
          "type",
          "date_view",
          "display_uptime_mode"
        ]
      },
      "CreateStatusPageResponse": {
        "type": "object",
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "创建的状态页 ID。"
          },
          "page_name": {
            "type": "string",
            "description": "创建的状态页名称。"
          },
          "page_url_name": {
            "type": "string",
            "description": "最终分配给状态页的 URL 安全路径。"
          }
        },
        "required": [
          "page_id",
          "page_name",
          "page_url_name"
        ]
      },
      "A2AAgentCreateRequest": {
        "type": "object",
        "description": "新建 A2A 智能体的注册参数。",
        "properties": {
          "agent_name": {
            "type": "string",
            "description": "智能体显示名称。",
            "maxLength": 128
          },
          "instructions": {
            "type": "string",
            "description": "远程智能体的自然语言指令。必填 —— 已弃用的 `description` 字段仍保留以兼容旧客户端，若两者同时传入则必须与 `instructions` 完全一致。",
            "maxLength": 2000
          },
          "card_url": {
            "type": "string",
            "description": "远程智能体卡片的 URL。必须是 host 非空的绝对 `http` 或 `https` URL；可达性由执行环境在运行时验证，创建时不检查。"
          },
          "auth_type": {
            "type": "string",
            "description": "访问远程智能体的认证类型：`none`、`api_key` 或 `bearer`。"
          },
          "auth_config": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "认证配置键值对，如 API Key 或 Bearer Token。敏感键（`api_key`、`token`、`client_secret`）的值在返回时会被挖码。"
          },
          "streaming": {
            "type": "boolean",
            "description": "远程智能体是否支持流式响应。"
          },
          "team_id": {
            "type": "integer",
            "description": "团队范围：0 = 账户级；>0 = 团队。在账户级创建需要 owner/admin 角色；创建到某个团队需要真实属于该团队。",
            "format": "int64"
          },
          "environment_kind": {
            "type": "string",
            "enum": [
              "",
              "byoc"
            ],
            "description": "执行环境绑定。省略或传空字符串表示自动路由；`byoc` 将智能体固定到 `environment_id` 指定的 Runner。不接受 `cloud` —— 已配置的 A2A 智能体需要持久 Runner，而非一次性云沙箱。"
          },
          "environment_id": {
            "type": "string",
            "description": "BYOC Runner ID。当 `environment_kind=byoc` 时必填；该 Runner 必须属于账户或调用者所属的团队。"
          },
          "auth_mode": {
            "type": "string",
            "description": "认证模式：`shared`（默认）所有用户共享一份凭证；`per_user_secret` 需要 `secret_schema.header_name`；`per_user_oauth` 为每个用户单独进行 OAuth。"
          },
          "secret_schema": {
            "type": "string",
            "description": "JSON 编码的密钥 schema，例如 `{\"header_name\":\"X-Api-Key\"}`；`auth_mode=per_user_secret` 时必填。"
          },
          "oauth_metadata": {
            "type": "string",
            "description": "JSON 编码的 OAuth 元数据；由 `per_user_oauth` 模式的 OAuth 发现流程填充。"
          },
          "allow_insecure_oauth_http": {
            "type": "boolean",
            "description": "允许该智能体使用非回环的 HTTP OAuth 发现/元数据端点，而非强制 HTTPS。默认为 false。"
          },
          "allow_insecure_tls_skip_verify": {
            "type": "boolean",
            "description": "连接到该智能体端点时跳过 TLS 证书验证（自签/私有证书）。默认为 false。"
          }
        },
        "required": [
          "agent_name",
          "instructions",
          "card_url"
        ]
      },
      "A2AAgentCreateResponse": {
        "type": "object",
        "description": "注册 A2A 智能体的结果。",
        "properties": {
          "agent_id": {
            "type": "string",
            "description": "新建智能体的 ID。"
          }
        },
        "required": [
          "agent_id"
        ]
      },
      "A2AAgentIDRequest": {
        "type": "object",
        "description": "按 ID 查找 A2A 智能体。",
        "properties": {
          "agent_id": {
            "type": "string",
            "description": "目标智能体 ID。"
          }
        },
        "required": [
          "agent_id"
        ]
      },
      "A2AAgentItem": {
        "type": "object",
        "description": "一个已注册的 A2A（智能体间通信）远程智能体。",
        "properties": {
          "agent_id": {
            "type": "string",
            "description": "唯一的 A2A 智能体 ID（前缀 `a2a_`）。"
          },
          "account_id": {
            "type": "integer",
            "description": "所属账户 ID。",
            "format": "int64"
          },
          "team_id": {
            "type": "integer",
            "description": "团队范围：0 = 账户级；>0 = 所属团队。",
            "format": "int64"
          },
          "can_edit": {
            "type": "boolean",
            "description": "调用者是否可以编辑该智能体。"
          },
          "environment_kind": {
            "type": "string",
            "enum": [
              "",
              "byoc"
            ],
            "description": "执行环境绑定。空字符串表示自动路由；`byoc` 表示固定到 `environment_id` 指定的 Runner。"
          },
          "environment_id": {
            "type": "string",
            "description": "BYOC Runner ID。仅在 `environment_kind=byoc` 时设置，否则为空。"
          },
          "agent_name": {
            "type": "string",
            "description": "智能体显示名称。"
          },
          "instructions": {
            "type": "string",
            "description": "远程智能体的自然语言指令（旧名 `description`）。",
            "maxLength": 2000
          },
          "card_url": {
            "type": "string",
            "description": "远程智能体卡片的 URL。"
          },
          "auth_type": {
            "type": "string",
            "description": "访问远程智能体的认证类型：`none`、`api_key` 或 `bearer`。"
          },
          "auth_config": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "认证配置；敏感值（`api_key`、`token`、`client_secret`）会被挖码。"
          },
          "streaming": {
            "type": "boolean",
            "description": "远程智能体是否支持流式响应。"
          },
          "status": {
            "type": "string",
            "description": "智能体状态。",
            "enum": [
              "enabled",
              "disabled"
            ]
          },
          "agent_card_name": {
            "type": "string",
            "description": "从远程卡片解析得到的智能体名称。"
          },
          "agent_card_skills": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "远程卡片宣告的技能。"
          },
          "card_resolve_timeout": {
            "type": "integer",
            "description": "卡片解析超时时间（秒）。目前恒为 0 —— API 尚未提供设置方式。"
          },
          "task_timeout": {
            "type": "integer",
            "description": "单个任务执行超时时间（秒）。目前恒为 0 —— API 尚未提供设置方式。"
          },
          "auth_mode": {
            "type": "string",
            "description": "认证模式。",
            "enum": [
              "shared",
              "per_user_secret",
              "per_user_oauth"
            ]
          },
          "secret_schema": {
            "type": "string",
            "description": "JSON 编码的密钥 schema（per_user_secret 模式）。"
          },
          "oauth_metadata": {
            "type": "string",
            "description": "JSON 编码的 OAuth 元数据（per_user_oauth 模式）。"
          },
          "allow_insecure_oauth_http": {
            "type": "boolean",
            "description": "允许该智能体使用非回环的 HTTP OAuth 发现/元数据端点，而非强制 HTTPS。"
          },
          "allow_insecure_tls_skip_verify": {
            "type": "boolean",
            "description": "连接到该智能体端点时跳过 TLS 证书验证。"
          },
          "created_by": {
            "type": "integer",
            "description": "创建该智能体的成员 ID。",
            "format": "int64"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间。Unix 时间戳（毫秒）。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最后更新时间。Unix 时间戳（毫秒）。"
          }
        },
        "required": [
          "agent_id",
          "account_id",
          "team_id",
          "can_edit",
          "environment_kind",
          "environment_id",
          "agent_name",
          "instructions",
          "card_url",
          "auth_type",
          "streaming",
          "status",
          "card_resolve_timeout",
          "task_timeout",
          "created_by",
          "created_at",
          "updated_at"
        ]
      },
      "A2AAgentListRequest": {
        "type": "object",
        "description": "查询 A2A 智能体列表的分页、范围与搜索过滤参数。",
        "properties": {
          "offset": {
            "type": "integer",
            "description": "分页偏移量。",
            "default": 0
          },
          "limit": {
            "type": "integer",
            "description": "页面大小。",
            "default": 20
          },
          "scope": {
            "type": "string",
            "enum": [
              "all",
              "account",
              "team"
            ],
            "default": "all",
            "description": "可见范围：`all`（账户级加上调用者可见的团队）、`account`（仅账户级）或 `team`（调用者可见团队中的团队级记录）。"
          },
          "query": {
            "type": "string",
            "description": "在智能体名称、指令、卡片 URL、智能体 ID 以及解析得到的卡片名称中进行不区分大小写的子串搜索。",
            "maxLength": 128
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "限定在这些团队 ID 内；留空表示使用调用者可见的团队集合。"
          },
          "include_account": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "是否包含账户级（team_id=0）记录。默认为 true。"
          }
        }
      },
      "A2AAgentListResponse": {
        "type": "object",
        "description": "分页的 A2A 智能体列表。",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/A2AAgentItem"
            },
            "description": "本页的 A2A 智能体。"
          },
          "total": {
            "type": "integer",
            "description": "符合条件的智能体总数。",
            "format": "int64"
          }
        },
        "required": [
          "items",
          "total"
        ]
      },
      "A2AAgentUpdateRequest": {
        "type": "object",
        "description": "对 A2A 智能体执行部分更新。字段为 null 或省略时保持不变。",
        "properties": {
          "agent_id": {
            "type": "string",
            "description": "目标智能体 ID。"
          },
          "agent_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "新的显示名称。省略则保持不变。",
            "maxLength": 128
          },
          "instructions": {
            "type": [
              "string",
              "null"
            ],
            "description": "新的指令。省略则保持不变。已弃用的 `description` 字段仍可传入，若两者同时传入则必须一致。",
            "maxLength": 2000
          },
          "card_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "新的卡片 URL。省略则保持不变。"
          },
          "auth_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "新的认证类型。省略则保持不变。"
          },
          "auth_config": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "替换认证配置。省略则保持不变。对敏感键回传挖码值（或空字符串）将保留已存储的密钥而非覆盖。"
          },
          "streaming": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "切换流式支持。省略则保持不变。"
          },
          "team_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "重新分配团队范围。省略则保持不变。重新分配需要对目标团队的权限；若团队变更且未同时传入新的环境绑定，则现有 Runner 绑定必须对调用者仍可选，否则更新将被拒绝。",
            "format": "int64"
          },
          "environment_kind": {
            "type": [
              "string",
              "null"
            ],
            "description": "新的执行环境绑定：空字符串表示自动，`byoc` 表示指定 Runner。不接受 `cloud`。省略则保持不变。"
          },
          "environment_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "新的 BYOC Runner ID。与 `environment_kind=byoc` 一同传入。省略则保持不变。"
          },
          "auth_mode": {
            "type": [
              "string",
              "null"
            ],
            "description": "新的认证模式：shared、per_user_secret 或 per_user_oauth。变更时会一并重写 secret_schema。"
          },
          "secret_schema": {
            "type": [
              "string",
              "null"
            ],
            "description": "新的 JSON 密钥 schema。"
          },
          "oauth_metadata": {
            "type": [
              "string",
              "null"
            ],
            "description": "新的 JSON OAuth 元数据。若 auth_mode 变更但未传入此字段，将被清空。"
          },
          "allow_insecure_oauth_http": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "切换该智能体的非回环 HTTP OAuth 发现开关。省略则保持不变。"
          },
          "allow_insecure_tls_skip_verify": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "切换该智能体的 TLS 证书验证跳过开关。省略则保持不变。"
          }
        },
        "required": [
          "agent_id"
        ]
      },
      "AutomationRuleCreateRequest": {
        "type": "object",
        "description": "创建自动化规则。",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "规则名称。"
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "作用域团队 ID。0 或省略表示个人规则；>0 表示账户下某团队。创建后不可修改。"
          },
          "enabled": {
            "type": "boolean",
            "description": "规则创建后是否启用。API 省略时为 false；Chat/CLI 入口会默认发送 true，除非用户要求禁用。"
          },
          "cron_expr": {
            "type": "string",
            "description": "运行周期。支持 4 段 `hour day month weekday`，会补 `minute=0`；也支持 5 段 `minute hour day month weekday`。分钟必须是固定整数，秒级 6 段不支持。同时设置日期和星期几的 cron 会被拒绝。创建 API 当前要求该字段，即使只启用 HTTP POST trigger，也要提供一个有效 cron 并把 `schedule_trigger_enabled` 设为 false。",
            "example": "15 9 * * *"
          },
          "timezone": {
            "type": "string",
            "description": "`cron_expr` 计算所用的 IANA 时区，例如 `Asia/Shanghai`。必须是服务端可加载的合法时区名，非法值会被拒绝。省略时依次回退到调用者的成员时区、账户时区，最后是 UTC。"
          },
          "schedule_trigger_enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "是否启用 schedule trigger。省略时为 true；HTTP-POST-only 规则应传 false。"
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "description": "每次运行发给 AI SRE Agent 的任务提示词。"
          },
          "environment_kind": {
            "type": "string",
            "description": "运行环境类型。省略或空字符串表示自动选择。",
            "enum": [
              "",
              "cloud",
              "byoc"
            ]
          },
          "environment_id": {
            "type": "string",
            "description": "BYOC Runner ID。仅 `environment_kind=byoc` 时使用。"
          },
          "http_post_trigger_enabled": {
            "type": "boolean",
            "description": "是否创建并启用 HTTP POST trigger。启用时响应里会返回一次性 token。"
          },
          "oncall_incident_trigger_enabled": {
            "type": "boolean",
            "description": "是否启用 On-call 故障触发器。"
          },
          "oncall_incident_channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            },
            "description": "监听的 On-call 集成 ID 列表；创建或启用该触发器时至少需要一个有效 ID。"
          },
          "oncall_incident_severities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Critical",
                "Warning",
                "Info"
              ]
            },
            "description": "监听的故障严重程度，支持 Critical、Warning 和 Info；创建或启用该触发器时至少需要一个值。"
          }
        },
        "required": [
          "name",
          "cron_expr",
          "prompt"
        ]
      },
      "AutomationRuleIDRequest": {
        "type": "object",
        "properties": {
          "rule_id": {
            "type": "string",
            "description": "规则 ID。"
          }
        },
        "required": [
          "rule_id"
        ]
      },
      "AutomationRuleItem": {
        "type": "object",
        "description": "自动化规则。",
        "properties": {
          "rule_id": {
            "type": "string",
            "description": "规则 ID。"
          },
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "账户 ID。"
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "作用域团队 ID；0 表示个人规则。"
          },
          "owner_id": {
            "type": "integer",
            "format": "int64",
            "description": "创建者 person ID。"
          },
          "name": {
            "type": "string",
            "description": "规则名称。"
          },
          "enabled": {
            "type": "boolean",
            "description": "规则是否启用。"
          },
          "run_scope": {
            "type": "string",
            "enum": [
              "person",
              "team"
            ],
            "description": "运行会话作用域。"
          },
          "cron_expr": {
            "type": "string",
            "description": "规范化后的 5 段 cron 表达式。"
          },
          "timezone": {
            "type": "string",
            "description": "`cron_expr` 计算所用的 IANA 时区。该字段上线后创建的规则始终会有值；上线前创建的旧数据可能为空，此时调度仍按 UTC 解析。"
          },
          "prompt": {
            "type": "string",
            "description": "任务提示词。"
          },
          "environment_kind": {
            "type": "string",
            "description": "运行环境类型。省略或空字符串表示自动选择。",
            "enum": [
              "",
              "cloud",
              "byoc"
            ]
          },
          "environment_id": {
            "type": "string",
            "description": "BYOC Runner ID。"
          },
          "schedule_trigger_id": {
            "type": "string",
            "description": "Schedule trigger ID。"
          },
          "schedule_trigger_enabled": {
            "type": "boolean",
            "description": "Schedule trigger 是否启用。"
          },
          "http_post_trigger_id": {
            "type": "string",
            "description": "HTTP POST trigger ID。"
          },
          "http_post_trigger_url": {
            "type": "string",
            "description": "HTTP POST 触发路径。"
          },
          "http_post_trigger_enabled": {
            "type": "boolean",
            "description": "HTTP POST trigger 是否启用。"
          },
          "oncall_incident_trigger_id": {
            "type": "string",
            "description": "On-call 故障触发器 ID。"
          },
          "oncall_incident_trigger_enabled": {
            "type": "boolean",
            "description": "是否启用 On-call 故障触发器。"
          },
          "oncall_incident_channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            },
            "description": "监听的 On-call 集成 ID 列表；创建或启用该触发器时至少需要一个有效 ID。"
          },
          "oncall_incident_severities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Critical",
                "Warning",
                "Info"
              ]
            },
            "description": "监听的故障严重程度，支持 Critical、Warning 和 Info；创建或启用该触发器时至少需要一个值。"
          },
          "http_post_token": {
            "type": "string",
            "description": "HTTP POST trigger token。只在创建或轮换 token 的响应中返回；请立即保存。"
          },
          "can_edit": {
            "type": "boolean",
            "description": "当调用者可管理该规则时为 true：个人规则仅限创建者；团队规则限账户管理员或规则所属团队成员。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间，Unix 毫秒。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "更新时间，Unix 毫秒。"
          },
          "schedule_next_fire_at_ms": {
            "type": "integer",
            "format": "int64",
            "description": "下一次计划触发时间，Unix 毫秒；0 表示暂无可用的下一次计划触发。"
          }
        },
        "required": [
          "rule_id",
          "account_id",
          "team_id",
          "owner_id",
          "name",
          "enabled",
          "run_scope",
          "cron_expr",
          "timezone",
          "prompt",
          "environment_kind",
          "environment_id",
          "schedule_trigger_enabled",
          "http_post_trigger_enabled",
          "can_edit",
          "created_at",
          "updated_at",
          "schedule_next_fire_at_ms",
          "oncall_incident_trigger_enabled"
        ]
      },
      "AutomationRuleListRequest": {
        "type": "object",
        "description": "列出当前调用者可见的自动化规则。`all` 包含调用者自己的个人规则和可访问团队的团队规则；账户管理员在列表中不可见他人的个人规则。",
        "properties": {
          "p": {
            "type": "integer",
            "default": 1,
            "description": "页码，从 1 开始。"
          },
          "limit": {
            "type": "integer",
            "default": 20,
            "maximum": 100,
            "description": "每页数量。"
          },
          "scope": {
            "type": "string",
            "enum": [
              "all",
              "personal",
              "team"
            ],
            "description": "作用域过滤：`all`（自己的个人规则 + 可访问团队规则）、`personal` 或 `team`；默认 `all`。"
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "过滤到这些团队 ID；该字段只会收窄结果，不会扩大访问范围。"
          },
          "include_person": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "兼容字段；scope 为空且为 false 时等同于 team。"
          },
          "enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "按启用状态过滤。"
          },
          "keyword": {
            "type": "string",
            "maxLength": 64,
            "description": "按名称关键字过滤。"
          }
        }
      },
      "AutomationRuleListResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "总数。"
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AutomationRuleItem"
            }
          }
        },
        "required": [
          "total",
          "rules"
        ]
      },
      "AutomationRuleUpdateRequest": {
        "type": "object",
        "description": "更新自动化规则。字段省略或传 null 表示不修改。",
        "properties": {
          "rule_id": {
            "type": "string",
            "description": "目标规则 ID。"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "description": "新规则名称。"
          },
          "team_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0,
            "description": "只允许传当前值；创建后 personal / team scope 不可修改。"
          },
          "enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "是否启用规则。"
          },
          "cron_expr": {
            "type": [
              "string",
              "null"
            ],
            "description": "运行周期。支持 4 段 `hour day month weekday`，会补 `minute=0`；也支持 5 段 `minute hour day month weekday`。分钟必须是固定整数，秒级 6 段不支持。",
            "example": "15 9 * * *"
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "更新 `cron_expr` 所用的 IANA 时区。省略或传 null 表示保持当前时区不变。"
          },
          "schedule_trigger_enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "是否启用 schedule trigger。"
          },
          "prompt": {
            "type": [
              "string",
              "null"
            ],
            "description": "新的任务提示词。"
          },
          "environment_kind": {
            "type": [
              "string",
              "null"
            ],
            "description": "运行环境类型。省略或空字符串表示自动选择。",
            "enum": [
              "",
              "cloud",
              "byoc"
            ]
          },
          "environment_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "BYOC Runner ID。"
          },
          "http_post_trigger_enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "是否启用 HTTP POST trigger。不存在时设为 true 会创建。"
          },
          "oncall_incident_trigger_enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "是否启用 On-call 故障触发器。"
          },
          "oncall_incident_channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            },
            "description": "监听的 On-call 集成 ID 列表；创建或启用该触发器时至少需要一个有效 ID。"
          },
          "oncall_incident_severities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Critical",
                "Warning",
                "Info"
              ]
            },
            "description": "监听的故障严重程度，支持 Critical、Warning 和 Info；创建或启用该触发器时至少需要一个值。"
          },
          "rotate_http_post_trigger_token": {
            "type": "boolean",
            "description": "是否轮换 HTTP POST trigger token。新 token 只会在本次响应中返回。"
          }
        },
        "required": [
          "rule_id"
        ]
      },
      "AutomationRunItem": {
        "type": "object",
        "properties": {
          "run_id": {
            "type": "string",
            "description": "运行 ID。"
          },
          "kind": {
            "type": "string",
            "description": "运行类型。"
          },
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "账户 ID。"
          },
          "rule_id": {
            "type": "string",
            "description": "规则 ID。"
          },
          "trigger_kind": {
            "type": "string",
            "enum": [
              "schedule",
              "debug",
              "manual",
              "http_post",
              "oncall_incident"
            ],
            "description": "触发来源。"
          },
          "occurrence_key": {
            "type": "string",
            "description": "幂等键。"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "retrying",
              "succeeded",
              "partial",
              "failed",
              "skipped",
              "abandoned"
            ],
            "description": "运行状态。"
          },
          "attempts": {
            "type": "integer",
            "description": "尝试次数。"
          },
          "started_at": {
            "type": "integer",
            "format": "int64",
            "description": "开始时间，Unix 毫秒。"
          },
          "completed_at": {
            "type": "integer",
            "format": "int64",
            "description": "完成时间，Unix 毫秒。0 表示尚未完成。"
          },
          "duration_ms": {
            "type": "integer",
            "format": "int64",
            "description": "运行耗时，毫秒。"
          },
          "error_code": {
            "type": "string",
            "description": "错误码。"
          },
          "error_message": {
            "type": "string",
            "description": "错误消息。"
          },
          "stats_json": {
            "description": "统计 JSON。"
          },
          "result_json": {
            "description": "结果 JSON。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间，Unix 毫秒。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "更新时间，Unix 毫秒。"
          }
        },
        "required": [
          "run_id",
          "kind",
          "account_id",
          "rule_id",
          "trigger_kind",
          "occurrence_key",
          "status",
          "attempts",
          "started_at",
          "completed_at",
          "duration_ms",
          "created_at",
          "updated_at"
        ]
      },
      "AutomationRunListRequest": {
        "type": "object",
        "properties": {
          "rule_id": {
            "type": "string",
            "description": "目标规则 ID。"
          },
          "p": {
            "type": "integer",
            "default": 1,
            "description": "页码，从 1 开始。"
          },
          "limit": {
            "type": "integer",
            "default": 20,
            "maximum": 100,
            "description": "每页数量。"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "retrying",
              "succeeded",
              "partial",
              "failed",
              "skipped",
              "abandoned"
            ],
            "description": "运行状态过滤。"
          },
          "trigger_kind": {
            "type": "string",
            "enum": [
              "schedule",
              "debug",
              "manual",
              "http_post",
              "oncall_incident"
            ],
            "description": "触发来源过滤条件。"
          },
          "started_after_ms": {
            "type": "integer",
            "format": "int64",
            "description": "开始时间下界，Unix 毫秒。"
          },
          "started_before_ms": {
            "type": "integer",
            "format": "int64",
            "description": "开始时间上界，Unix 毫秒。"
          }
        },
        "required": [
          "rule_id"
        ]
      },
      "AutomationRunListResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "总数。"
          },
          "runs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AutomationRunItem"
            }
          }
        },
        "required": [
          "total",
          "runs"
        ]
      },
      "AutomationRunView": {
        "type": "object",
        "description": "手动触发所创建运行的引用。",
        "properties": {
          "run_id": {
            "type": "string",
            "description": "运行 ID，运行创建后始终会有值。"
          },
          "session_id": {
            "type": "string",
            "description": "本次运行对应的 AI SRE 会话 ID。由于调用只会在会话启动后才返回，因此在 200 响应中始终会有值。"
          }
        },
        "required": [
          "run_id"
        ]
      },
      "AutomationTemplateItem": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "模板名称。"
          },
          "description": {
            "type": "string",
            "description": "模板说明。"
          },
          "icon": {
            "type": "string",
            "description": "图标标识。"
          },
          "enabled": {
            "type": "boolean",
            "description": "模板是否可用。"
          },
          "prompt": {
            "type": "string",
            "description": "模板提示词。"
          }
        },
        "required": [
          "name",
          "description",
          "icon",
          "enabled",
          "prompt"
        ]
      },
      "AutomationTemplateListRequest": {
        "type": "object",
        "properties": {
          "locale": {
            "type": "string",
            "maxLength": 16,
            "description": "模板语言，例如 zh-CN 或 en-US。省略时按请求语言自动选择。"
          }
        }
      },
      "AutomationTemplateListResponse": {
        "type": "object",
        "properties": {
          "templates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AutomationTemplateItem"
            }
          }
        },
        "required": [
          "templates"
        ]
      },
      "ContextResolvedItem": {
        "type": "object",
        "description": "该会话三层知识包解析结果的快照。",
        "properties": {
          "account_pack_id": {
            "type": "string",
            "description": "解析出的账户级知识包 ID。"
          },
          "team_pack_id": {
            "type": "string",
            "description": "解析出的团队级知识包 ID。"
          },
          "incident_id": {
            "type": "string",
            "description": "作战室来源时绑定的故障 ID。"
          },
          "resolved_at_ms": {
            "type": "integer",
            "format": "int64",
            "description": "知识包解析时间，Unix 毫秒时间戳。"
          },
          "versions": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            },
            "description": "各知识包解析版本映射。"
          }
        },
        "required": [
          "resolved_at_ms"
        ]
      },
      "EnvironmentBinding": {
        "type": "object",
        "description": "会话绑定的 runner 或云沙箱。首条消息前为 null。",
        "properties": {
          "kind": {
            "type": "string",
            "description": "会话当前绑定的环境类型：`cloud`（托管沙箱）或 `byoc`（自建 runner）。",
            "enum": [
              "cloud",
              "byoc"
            ]
          },
          "id": {
            "type": "string",
            "description": "环境标识：`cloud` 绑定为云沙箱 ID，`byoc` 绑定为 runner/环境 ID。"
          },
          "name": {
            "type": "string",
            "description": "可读的环境名称；cloud 绑定使用默认允许列表时为空。"
          },
          "status": {
            "type": "string",
            "description": "绑定的实时健康状态，按类型分命名空间：BYOC 使用 online/pending/offline/deleted；cloud 使用 available/rebuilding/expired。",
            "enum": [
              "online",
              "pending",
              "offline",
              "deleted",
              "available",
              "rebuilding",
              "expired"
            ]
          }
        },
        "required": [
          "kind",
          "id"
        ]
      },
      "EventItem": {
        "type": "object",
        "description": "单条已持久化的会话事件。content/actions/usage_metadata 携带原始 ADK 信封，请将其视为不透明的结构化负载。",
        "properties": {
          "event_id": {
            "type": "string",
            "description": "事件标识。"
          },
          "session_id": {
            "type": "string",
            "description": "所属会话 ID。"
          },
          "invocation_id": {
            "type": "string",
            "description": "标识一轮的 ADK 调用 ID。"
          },
          "author": {
            "type": "string",
            "description": "事件作者（如 user 或智能体名称）。"
          },
          "branch": {
            "type": "string",
            "description": "嵌套智能体的 ADK 分支路径。"
          },
          "content": {
            "type": "object",
            "additionalProperties": true,
            "description": "ADK content 信封 {role, parts:[...]}。"
          },
          "actions": {
            "type": "object",
            "additionalProperties": true,
            "description": "ADK actions 信封（状态增量、转移、升级）。"
          },
          "usage_metadata": {
            "type": "object",
            "additionalProperties": true,
            "description": "单轮 token 用量元数据。"
          },
          "partial": {
            "type": "boolean",
            "description": "流式部分分片时为 true。"
          },
          "turn_complete": {
            "type": "boolean",
            "description": "一轮的终止事件上为 true。"
          },
          "error_code": {
            "type": "string",
            "description": "当该事件表示失败时的错误码。"
          },
          "error_message": {
            "type": "string",
            "description": "可读的错误信息（如有）。"
          },
          "status": {
            "type": "string",
            "description": "事件状态。",
            "enum": [
              "normal",
              "compressed"
            ]
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "事件写入时间，Unix 毫秒时间戳。"
          }
        },
        "required": [
          "event_id",
          "session_id",
          "partial",
          "turn_complete",
          "created_at"
        ]
      },
      "MCPServerCreateRequest": {
        "type": "object",
        "description": "新建 MCP 服务器的配置。",
        "properties": {
          "server_name": {
            "type": "string",
            "description": "MCP 服务器名称，在账户内唯一。",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "服务器描述。",
            "minLength": 1,
            "maxLength": 1024
          },
          "transport": {
            "type": "string",
            "description": "传输协议。",
            "enum": [
              "stdio",
              "sse",
              "streamable-http"
            ]
          },
          "command": {
            "type": "string",
            "description": "可执行命令（stdio 传输）。"
          },
          "args": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "命令参数（stdio 传输）。"
          },
          "env": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "环境变量（stdio 传输）。"
          },
          "url": {
            "type": "string",
            "description": "服务器 URL（sse / streamable-http 传输）。"
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "HTTP 头（sse / streamable-http）。"
          },
          "connect_timeout": {
            "type": "integer",
            "description": "连接超时，单位秒。0 表示默认（10 秒）。"
          },
          "call_timeout": {
            "type": "integer",
            "description": "工具调用超时，单位秒。0 表示默认（60 秒）。"
          },
          "auth_mode": {
            "type": "string",
            "description": "认证模式：shared（默认）、per_user_secret 或 per_user_oauth。"
          },
          "secret_schema": {
            "type": "string",
            "description": "JSON 密钥 schema；auth_mode=per_user_secret 时必填。"
          },
          "oauth_metadata": {
            "type": "string",
            "description": "JSON OAuth 元数据；为 per_user_oauth 预留。"
          },
          "status": {
            "type": "string",
            "description": "初始状态。",
            "enum": [
              "enabled",
              "disabled"
            ],
            "default": "enabled"
          },
          "team_id": {
            "type": "integer",
            "description": "团队范围：0 表示账户级；>0 表示团队。",
            "format": "int64"
          },
          "environment_kind": {
            "type": "string",
            "description": "绑定到指定 BYOC 运行器（需同时提供 environment_id）。省略或留空表示自动选择；MCP 服务器不支持 cloud。",
            "enum": [
              "byoc"
            ]
          },
          "environment_id": {
            "type": "string",
            "description": "运行器 ID；environment_kind 为 byoc 时必填。"
          },
          "allow_insecure_oauth_http": {
            "type": "boolean",
            "description": "允许该服务器的 OAuth 令牌交换使用明文 HTTP，仅用于测试，默认 false。"
          },
          "allow_insecure_tls_skip_verify": {
            "type": "boolean",
            "description": "连接该服务器时跳过 TLS 证书校验，仅用于测试，默认 false。"
          },
          "source_template_name": {
            "type": "string",
            "description": "从连接器模板创建时的市场模板名称。"
          }
        },
        "required": [
          "server_name",
          "description",
          "transport"
        ]
      },
      "MCPServerDeleteRequest": {
        "type": "object",
        "description": "按 ID 删除 MCP 服务器。",
        "properties": {
          "server_id": {
            "type": "string",
            "description": "目标 MCP 服务器 ID。"
          }
        },
        "required": [
          "server_id"
        ]
      },
      "MCPServerGetRequest": {
        "type": "object",
        "description": "按 ID 查询 MCP 服务器。",
        "properties": {
          "server_id": {
            "type": "string",
            "description": "目标 MCP 服务器 ID。"
          }
        },
        "required": [
          "server_id"
        ]
      },
      "MCPServerItem": {
        "type": "object",
        "description": "账户下注册的 MCP 服务器（连接器）。",
        "properties": {
          "server_id": {
            "type": "string",
            "description": "MCP 服务器唯一 ID（前缀 `mcp_`）。"
          },
          "account_id": {
            "type": "integer",
            "description": "所属账户 ID。",
            "format": "int64"
          },
          "team_id": {
            "type": "integer",
            "description": "团队范围：0 表示账户级；>0 表示所属团队。",
            "format": "int64"
          },
          "can_edit": {
            "type": "boolean",
            "description": "调用者是否可编辑该服务器。"
          },
          "environment_kind": {
            "type": "string",
            "description": "运行环境类型：留空表示自动选择，`byoc` 表示绑定到指定运行器；MCP 服务器不支持绑定 `cloud`。",
            "enum": [
              "",
              "byoc"
            ]
          },
          "environment_id": {
            "type": "string",
            "description": "environment_kind 为 byoc 时对应的运行器 ID；否则为空。"
          },
          "server_name": {
            "type": "string",
            "description": "MCP 服务器名称，在账户内唯一。"
          },
          "description": {
            "type": "string",
            "description": "服务器描述。"
          },
          "ai_description": {
            "type": "string",
            "description": "LLM 生成的描述，存在时优先于 `description`。"
          },
          "transport": {
            "type": "string",
            "description": "传输协议。",
            "enum": [
              "stdio",
              "sse",
              "streamable-http"
            ]
          },
          "command": {
            "type": "string",
            "description": "可执行命令（仅 stdio 传输）。"
          },
          "args": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "命令参数（stdio 传输）。"
          },
          "env": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "环境变量（stdio 传输）；密钥值已脱敏。"
          },
          "url": {
            "type": "string",
            "description": "服务器 URL（sse / streamable-http 传输）。"
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "HTTP 头（sse / streamable-http）；密钥值已脱敏。"
          },
          "proxy_url": {
            "type": "string",
            "description": "访问服务器使用的出站代理 URL。"
          },
          "status": {
            "type": "string",
            "description": "服务器状态。",
            "enum": [
              "enabled",
              "disabled"
            ]
          },
          "connect_timeout": {
            "type": "integer",
            "description": "连接超时，单位秒（0 表示默认 10 秒）。"
          },
          "call_timeout": {
            "type": "integer",
            "description": "工具调用超时，单位秒（0 表示默认 60 秒）。"
          },
          "allow_insecure_oauth_http": {
            "type": "boolean",
            "description": "允许该服务器的 OAuth 令牌交换使用明文 HTTP；仅用于测试。"
          },
          "allow_insecure_tls_skip_verify": {
            "type": "boolean",
            "description": "连接该服务器时跳过 TLS 证书校验；仅用于测试。"
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MCPToolInfo"
            },
            "description": "实时工具列表；由 get/test 接口填充。"
          },
          "tool_count": {
            "type": "integer",
            "description": "实时工具列表的数量。"
          },
          "list_error": {
            "type": "string",
            "description": "实时获取工具列表失败时的错误信息。"
          },
          "auth_mode": {
            "type": "string",
            "description": "认证模式。",
            "enum": [
              "shared",
              "per_user_secret",
              "per_user_oauth"
            ]
          },
          "secret_schema": {
            "type": "string",
            "description": "JSON 编码的密钥 schema（per_user_secret 模式）。"
          },
          "oauth_metadata": {
            "type": "string",
            "description": "JSON 编码的 OAuth 元数据（per_user_oauth 模式）。"
          },
          "source_template_name": {
            "type": "string",
            "description": "该连接器安装来源的市场模板名称；自建为空。"
          },
          "created_by": {
            "type": "integer",
            "description": "创建该服务器的成员 ID。",
            "format": "int64"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间，Unix 毫秒时间戳。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最近更新时间，Unix 毫秒时间戳。"
          }
        },
        "required": [
          "server_id",
          "account_id",
          "team_id",
          "can_edit",
          "environment_kind",
          "environment_id",
          "server_name",
          "description",
          "transport",
          "status",
          "connect_timeout",
          "call_timeout",
          "created_by",
          "created_at",
          "updated_at"
        ]
      },
      "MCPServerListRequest": {
        "type": "object",
        "description": "MCP 服务器列表的分页、范围与搜索过滤条件。",
        "properties": {
          "p": {
            "type": "integer",
            "description": "页码，从 1 开始。",
            "default": 1
          },
          "limit": {
            "type": "integer",
            "description": "每页数量。",
            "default": 20
          },
          "scope": {
            "type": "string",
            "description": "结果范围：account 仅返回账户级记录，team 仅返回调用者可见的团队级记录，省略则默认为 all（返回两者，仍受 team_ids/include_account 约束）。",
            "enum": [
              "all",
              "account",
              "team"
            ]
          },
          "query": {
            "type": "string",
            "maxLength": 128,
            "description": "对名称、描述、AI 生成描述、服务器 ID、传输协议、URL、命令、市场模板名称进行不区分大小写的子串搜索。"
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "按团队 ID 过滤；为空则使用调用者可见范围。"
          },
          "include_account": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "是否包含账户级（team_id=0）记录，默认 true。"
          }
        }
      },
      "MCPServerListResponse": {
        "type": "object",
        "description": "分页的 MCP 服务器列表。",
        "properties": {
          "total": {
            "type": "integer",
            "description": "匹配的服务器总数。",
            "format": "int64"
          },
          "servers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MCPServerItem"
            },
            "description": "当前页的 MCP 服务器。"
          }
        },
        "required": [
          "total",
          "servers"
        ]
      },
      "MCPServerStatusRequest": {
        "type": "object",
        "description": "按 ID 启用/禁用 MCP 服务器。",
        "properties": {
          "server_id": {
            "type": "string",
            "description": "目标 MCP 服务器 ID。"
          }
        },
        "required": [
          "server_id"
        ]
      },
      "MCPServerUpdateRequest": {
        "type": "object",
        "description": "MCP 服务器的部分更新；省略字段表示不变。",
        "properties": {
          "server_id": {
            "type": "string",
            "description": "目标 MCP 服务器 ID。"
          },
          "server_name": {
            "type": "string",
            "description": "新名称。",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "新描述。",
            "minLength": 1,
            "maxLength": 1024
          },
          "transport": {
            "type": "string",
            "description": "传输协议。",
            "enum": [
              "stdio",
              "sse",
              "streamable-http"
            ]
          },
          "command": {
            "type": "string",
            "description": "可执行命令（stdio 传输）。"
          },
          "args": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "命令参数（stdio 传输）。"
          },
          "env": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "环境变量（stdio 传输）。"
          },
          "url": {
            "type": "string",
            "description": "服务器 URL（sse / streamable-http 传输）。"
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "HTTP 头（sse / streamable-http）。"
          },
          "connect_timeout": {
            "type": "integer",
            "description": "连接超时，单位秒。0 表示默认（10 秒）。"
          },
          "call_timeout": {
            "type": "integer",
            "description": "工具调用超时，单位秒。0 表示默认（60 秒）。"
          },
          "auth_mode": {
            "type": "string",
            "description": "认证模式：shared（默认）、per_user_secret 或 per_user_oauth。"
          },
          "secret_schema": {
            "type": "string",
            "description": "JSON 密钥 schema；auth_mode=per_user_secret 时必填。"
          },
          "oauth_metadata": {
            "type": "string",
            "description": "JSON OAuth 元数据；为 per_user_oauth 预留。"
          },
          "team_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "重新分配团队范围：0 表示账户级；>0 表示团队。省略则不变。",
            "format": "int64"
          },
          "environment_kind": {
            "type": [
              "string",
              "null"
            ],
            "description": "重新指定运行器绑定：byoc（需同时提供 environment_id）或空字符串表示重置为自动选择。省略（null）表示保持当前绑定不变。"
          },
          "environment_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "与 environment_kind=byoc 配对的运行器 ID。省略（null）表示保持当前绑定不变。"
          },
          "allow_insecure_oauth_http": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "是否允许 OAuth 令牌交换使用明文 HTTP。省略表示不变。"
          },
          "allow_insecure_tls_skip_verify": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "是否跳过 TLS 证书校验。省略表示不变。"
          }
        },
        "required": [
          "server_id"
        ]
      },
      "MCPToolInfo": {
        "type": "object",
        "description": "MCP 服务器暴露的单个工具的元数据。",
        "properties": {
          "name": {
            "type": "string",
            "description": "工具名称。"
          },
          "description": {
            "type": "string",
            "description": "工具描述。"
          },
          "input_schema": {
            "type": "object",
            "additionalProperties": true,
            "description": "描述工具输入参数的 JSON Schema。"
          }
        },
        "required": [
          "name",
          "description"
        ]
      },
      "ManualRunRuleResult": {
        "type": "object",
        "description": "手动运行一次自动化规则（跳过其计划触发时间）的结果。",
        "properties": {
          "rule_id": {
            "type": "string",
            "description": "被运行的规则 ID。"
          },
          "trigger_kind": {
            "type": "string",
            "enum": [
              "manual"
            ],
            "description": "该操作固定为 manual。"
          },
          "preflight": {
            "$ref": "#/components/schemas/PreflightResult"
          },
          "run": {
            "$ref": "#/components/schemas/AutomationRunView"
          }
        },
        "required": [
          "rule_id",
          "trigger_kind",
          "preflight"
        ]
      },
      "PreflightResult": {
        "type": "object",
        "description": "在允许发起手动运行前计算出的就绪检查结果。",
        "properties": {
          "ok": {
            "type": "boolean",
            "description": "全部就绪检查是否通过。凡是能返回给调用者的响应中该值恒为 true——预检失败会直接返回 400/403 错误，而不是 ok=false 的响应体。"
          },
          "checks": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "按执行顺序列出的就绪检查项名称。当前固定为：rule_loaded、actor_authorized、app_allowed、runtime_scope_resolved、rule_config_valid。"
          },
          "scope": {
            "type": "string",
            "enum": [
              "person",
              "team"
            ],
            "description": "本次运行解析出的作用域，与规则的 run_scope 一致。"
          },
          "owner_id": {
            "type": "integer",
            "format": "int64",
            "description": "规则所有者 person ID。"
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "规则的作用域团队 ID；0 表示个人规则。"
          },
          "app_name": {
            "type": "string",
            "description": "规则所属的 App。当前始终为 ai-sre；手动运行目前仅支持该 App。"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "预检过程中给出的非致命警告。没有警告时省略或为空数组。"
          }
        },
        "required": [
          "ok",
          "checks",
          "scope",
          "owner_id",
          "team_id",
          "app_name"
        ]
      },
      "SessionDeleteRequest": {
        "type": "object",
        "description": "按 ID 删除会话。",
        "properties": {
          "session_id": {
            "type": "string",
            "description": "目标会话 ID。",
            "minLength": 1
          }
        },
        "required": [
          "session_id"
        ]
      },
      "SessionExportRequest": {
        "type": "object",
        "description": "以流式 NDJSON 导出单个会话的完整事件记录。",
        "properties": {
          "session_id": {
            "type": "string",
            "description": "目标会话 ID。"
          },
          "include_subagents": {
            "type": "boolean",
            "description": "为 true 时，每条 subagent_dispatch 行后会跟随子会话的完整事件流，并以其自身的 session_meta 包裹。默认 false。"
          }
        },
        "required": [
          "session_id"
        ]
      },
      "SessionGetRequest": {
        "type": "object",
        "description": "查询单个会话，并返回其最近事件的一页（向更早方向分页）。",
        "properties": {
          "session_id": {
            "type": "string",
            "description": "目标会话 ID。",
            "minLength": 1
          },
          "num_recent_events": {
            "type": "integer",
            "description": "旧版每页数量：返回的最近事件数。与 `limit` 同时设置时以 `limit` 为准；0 使用服务端默认值（100）。",
            "minimum": 0,
            "maximum": 1000
          },
          "limit": {
            "type": "integer",
            "description": "事件每页数量；优先于 `num_recent_events`。0 使用服务端默认值（100）。",
            "minimum": 0,
            "maximum": 1000
          },
          "search_after_ctx": {
            "type": "string",
            "description": "上一次响应返回的不透明游标；回传以获取更早的一页。",
            "maxLength": 4096
          }
        },
        "required": [
          "session_id"
        ]
      },
      "SessionGetResponse": {
        "type": "object",
        "description": "一个会话及其事件的一页（向更早方向分页）。",
        "properties": {
          "session": {
            "$ref": "#/components/schemas/SessionItem"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventItem"
            },
            "description": "最近事件，按 (created_at, event_id) 升序排列。"
          },
          "has_more_older": {
            "type": "boolean",
            "description": "当本页之外仍有更早的事件时为 true。"
          },
          "search_after_ctx": {
            "type": "string",
            "description": "不透明游标；作为 search_after_ctx 回传以获取更早的一页。has_more_older 为 false 时省略。"
          },
          "suggest_init": {
            "type": "boolean",
            "description": "账户级引导标志：当账户在任何范围内都没有知识包时为 true；并非该会话独有的属性。"
          }
        },
        "required": [
          "session",
          "events",
          "has_more_older",
          "suggest_init"
        ]
      },
      "SessionItem": {
        "type": "object",
        "description": "单条智能体会话记录。",
        "properties": {
          "session_id": {
            "type": "string",
            "description": "会话标识。"
          },
          "parent_session_id": {
            "type": "string",
            "description": "子智能体（子）会话的父会话 ID；否则为空。"
          },
          "session_name": {
            "type": "string",
            "description": "会话标题；未命名会话可能为空。"
          },
          "app_name": {
            "type": "string",
            "description": "拥有该会话的智能体应用。"
          },
          "entry_kind": {
            "type": "string",
            "description": "创建该会话的入口来源。",
            "enum": [
              "web",
              "im",
              "api",
              "automation",
              "subagent"
            ]
          },
          "person_id": {
            "type": "string",
            "description": "创建者人员 ID。"
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "所属团队 ID；0 表示未绑定团队。创建后不可变更。"
          },
          "team_name": {
            "type": "string",
            "description": "解析出的团队名称；未绑定或团队已删除时为空。"
          },
          "is_mine": {
            "type": "boolean",
            "description": "当该会话由调用者创建时为 true。"
          },
          "can_manage": {
            "type": "boolean",
            "description": "当调用者可重命名/归档/删除该会话时为 true；个人会话仅创建者可管理，团队会话允许创建者、账户管理员或团队成员管理。"
          },
          "status": {
            "type": "string",
            "description": "生命周期状态。",
            "enum": [
              "enabled",
              "deleted"
            ]
          },
          "incognito": {
            "type": "boolean",
            "description": "无痕（不持久化记忆）会话时为 true。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "会话创建时间，Unix 毫秒时间戳。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "会话最近更新时间，Unix 毫秒时间戳。"
          },
          "template_staging_round_id": {
            "type": "string",
            "description": "当前 save→validate 轮次 ID（仅 template-assistant）；否则为空。"
          },
          "state": {
            "type": "object",
            "additionalProperties": true,
            "description": "原始会话状态包（会话级键）。为空时省略。"
          },
          "bound_environment": {
            "$ref": "#/components/schemas/EnvironmentBinding"
          },
          "context_resolved": {
            "$ref": "#/components/schemas/ContextResolvedItem"
          },
          "token_usage": {
            "$ref": "#/components/schemas/SessionTokenUsage"
          },
          "current_context_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "截至最近一轮的 LLM 上下文窗口的 token 数。0 表示尚无已完成的轮次。"
          },
          "context_window": {
            "type": "integer",
            "format": "int64",
            "description": "所绑定模型的最大上下文 token 数。0 表示未知。"
          },
          "archived_at": {
            "type": "integer",
            "format": "int64",
            "description": "归档时间，Unix 毫秒时间戳；0 表示未归档。"
          },
          "pinned_at": {
            "type": "integer",
            "format": "int64",
            "description": "调用者的个人置顶时间，Unix 毫秒时间戳；0 表示未置顶。"
          },
          "last_event_at": {
            "type": "integer",
            "format": "int64",
            "description": "最近一条助手侧事件的时间，Unix 毫秒时间戳。"
          },
          "is_running": {
            "type": "boolean",
            "description": "当该会话当前有正在进行的智能体轮次时为 true。"
          },
          "has_unread": {
            "type": "boolean",
            "description": "当存在调用者尚未查看的助手输出时为 true。"
          },
          "current_turn_started_at": {
            "type": "integer",
            "format": "int64",
            "description": "本轮（当前或最近一轮）开始时间，Unix 毫秒时间戳；尚未开始任何轮次时为 0。"
          },
          "current_turn_active_ms": {
            "type": "integer",
            "format": "int64",
            "description": "本轮（当前或最近一轮）的实际工作时长（毫秒），不含等待 ask_user 的时间；每次新轮次开始时重置为 0。"
          },
          "current_turn_wait_ms": {
            "type": "integer",
            "format": "int64",
            "description": "当前轮次累计的 ask_user 人工等待时长（毫秒）；每次新轮次开始时重置为 0。"
          },
          "current_turn_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "当前进行中轮次的 token 总数（输入+输出+推理），涵盖父会话及其所有子智能体；仅由 session/get 在会话运行时计算，session/list 响应及空闲时恒为 0。"
          }
        },
        "required": [
          "session_id",
          "session_name",
          "app_name",
          "person_id",
          "team_id",
          "is_mine",
          "can_manage",
          "status",
          "incognito",
          "created_at",
          "updated_at",
          "current_context_tokens",
          "context_window",
          "archived_at",
          "pinned_at",
          "is_running",
          "has_unread",
          "current_turn_started_at",
          "current_turn_active_ms",
          "current_turn_wait_ms",
          "current_turn_tokens"
        ]
      },
      "SessionListRequest": {
        "type": "object",
        "description": "查询智能体会话列表的过滤条件。`all` 表示调用者自己的个人会话和可访问团队的团队会话；账户管理员不可见他人的个人会话。",
        "properties": {
          "app_name": {
            "type": "string",
            "description": "要查询其会话的智能体应用。",
            "enum": [
              "ask-ai",
              "support",
              "support-website",
              "support-flashcat",
              "ai-sre",
              "template-assistant",
              "swe"
            ]
          },
          "p": {
            "type": "integer",
            "description": "页码，从 1 开始。",
            "default": 1,
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "description": "每页数量，1–100。",
            "minimum": 1,
            "maximum": 100,
            "default": 20
          },
          "orderby": {
            "type": "string",
            "description": "排序字段。",
            "enum": [
              "created_at",
              "updated_at"
            ]
          },
          "asc": {
            "type": "boolean",
            "description": "为 true 时升序；仅在设置 `orderby` 时生效。"
          },
          "include_subagent_sessions": {
            "type": "boolean",
            "description": "是否在列表中包含子智能体派生的会话。"
          },
          "keyword": {
            "type": "string",
            "description": "按会话名称关键字过滤。",
            "maxLength": 64
          },
          "scope": {
            "type": "string",
            "description": "可见范围：`all`（自己的个人会话 + 可访问团队会话）、`personal` 或 `team`；默认 `all`。",
            "enum": [
              "all",
              "personal",
              "team"
            ]
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "可选的团队过滤；与 `scope` 取交集，且不会扩大访问范围。"
          },
          "entry_kinds": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "web",
                "im",
                "api",
                "automation"
              ]
            },
            "description": "仅返回由这些入口产生的会话；为空则返回所有类型。"
          },
          "status": {
            "type": "string",
            "description": "归档分桶：active（默认）返回未归档，archived 返回已归档，all 返回全部。",
            "enum": [
              "active",
              "archived",
              "all"
            ]
          }
        },
        "required": [
          "app_name"
        ]
      },
      "SessionListResponse": {
        "type": "object",
        "description": "一页智能体会话。",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "匹配过滤条件的会话总数（忽略分页）。"
          },
          "sessions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SessionItem"
            },
            "description": "当前页的会话。"
          },
          "suggest_init": {
            "type": "boolean",
            "description": "账户级引导标志：当账户在任何范围内都没有知识包时为 true；与本次调用的过滤条件无关。"
          }
        },
        "required": [
          "total",
          "sessions",
          "suggest_init"
        ]
      },
      "SessionTokenUsage": {
        "type": "object",
        "description": "跨所有轮次的会话级 token 累计汇总。账户计费的权威来源。",
        "properties": {
          "input_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "提示（输入）token 总数，含缓存部分。"
          },
          "cached_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "input_tokens 中由提示缓存命中的部分。"
          },
          "output_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "生成（输出）token 总数。"
          },
          "reasoning_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "推理/思考 token 总数。"
          }
        },
        "required": [
          "input_tokens",
          "cached_tokens",
          "output_tokens",
          "reasoning_tokens"
        ]
      },
      "SkillDeleteRequest": {
        "type": "object",
        "description": "按 ID 删除技能。",
        "properties": {
          "skill_id": {
            "type": "string",
            "description": "目标技能 ID。"
          }
        },
        "required": [
          "skill_id"
        ]
      },
      "SkillGetRequest": {
        "type": "object",
        "description": "按 ID 查询技能。",
        "properties": {
          "skill_id": {
            "type": "string",
            "description": "目标技能 ID。"
          }
        },
        "required": [
          "skill_id"
        ]
      },
      "SkillItem": {
        "type": "object",
        "description": "AI SRE 技能 —— 智能体可加载的 SKILL.md 打包资源。",
        "properties": {
          "skill_id": {
            "type": "string",
            "description": "技能唯一 ID（前缀 `skill_`）。"
          },
          "account_id": {
            "type": "integer",
            "description": "所属账户 ID。",
            "format": "int64"
          },
          "team_id": {
            "type": "integer",
            "description": "团队范围：0 表示账户级；>0 表示所属团队。",
            "format": "int64"
          },
          "skill_name": {
            "type": "string",
            "description": "技能名称，在账户内唯一。"
          },
          "description": {
            "type": "string",
            "description": "来自 SKILL.md frontmatter 的可读描述。"
          },
          "description_en": {
            "type": "string",
            "description": "可选的英文描述。英文语言环境下的界面响应优先使用该字段而非 `description`；当 `description` 被本地化展示时，技能目录也会用它作为稳定的选型信号。"
          },
          "content": {
            "type": "string",
            "description": "完整的 SKILL.md 内容；列表响应中省略。"
          },
          "version": {
            "type": "string",
            "description": "frontmatter 中的技能版本。"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "从 frontmatter 解析的标签。"
          },
          "author": {
            "type": "string",
            "description": "技能作者。"
          },
          "license": {
            "type": "string",
            "description": "技能许可证。"
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "所需工具（内置或 `mcp:server/tool`）。"
          },
          "s3_key": {
            "type": "string",
            "description": "技能压缩包在对象存储中的 key。"
          },
          "checksum": {
            "type": "string",
            "description": "技能压缩包的 SHA-256 校验和。"
          },
          "status": {
            "type": "string",
            "description": "技能状态。已删除的技能不会出现在任何 API 响应中，因此只会返回这两种状态。",
            "enum": [
              "enabled",
              "disabled"
            ]
          },
          "created_by": {
            "type": "integer",
            "description": "创建该技能的成员 ID。",
            "format": "int64"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间，Unix 毫秒时间戳。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最近更新时间，Unix 毫秒时间戳。"
          },
          "can_edit": {
            "type": "boolean",
            "description": "调用者是否可编辑该技能。"
          },
          "source_template_name": {
            "type": "string",
            "description": "该技能安装来源的市场模板名称；自建技能为空。"
          },
          "source_template_version": {
            "type": "string",
            "description": "安装时的模板版本。"
          },
          "update_available": {
            "type": "boolean",
            "description": "当市场存在更新版本时为 true。"
          },
          "is_modified": {
            "type": "boolean",
            "description": "当市场来源技能被本地修改时为 true（自动更新将跳过）。"
          },
          "created": {
            "type": "boolean",
            "description": "仅在“从会话安装”响应中出现：true 表示新建，false 表示原地更新。"
          }
        },
        "required": [
          "skill_id",
          "account_id",
          "team_id",
          "skill_name",
          "description",
          "status",
          "created_by",
          "created_at",
          "updated_at",
          "can_edit",
          "update_available",
          "is_modified"
        ]
      },
      "SkillListRequest": {
        "type": "object",
        "description": "技能列表的分页、搜索与团队过滤条件。",
        "properties": {
          "p": {
            "type": "integer",
            "description": "页码，从 1 开始。",
            "default": 1
          },
          "limit": {
            "type": "integer",
            "description": "每页数量。",
            "default": 20
          },
          "scope": {
            "type": "string",
            "description": "将结果限制为 `all`（默认）、仅 `account`（team_id=0）、或仅 `team`（排除账户级记录）；设置后会覆盖 `include_account`。",
            "enum": [
              "all",
              "account",
              "team"
            ]
          },
          "query": {
            "type": "string",
            "description": "跨技能名称、描述、英文描述、技能 ID、市场来源模板名称与作者的全文搜索。",
            "maxLength": 128
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "按团队 ID 过滤；为空则使用调用者可见范围。"
          },
          "include_account": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "是否包含账户级（team_id=0）记录，默认 true。当 `scope` 为 `account` 或 `team` 时该字段会被忽略。"
          }
        }
      },
      "SkillListResponse": {
        "type": "object",
        "description": "分页的技能列表。",
        "properties": {
          "total": {
            "type": "integer",
            "description": "匹配的技能总数。",
            "format": "int64"
          },
          "skills": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkillItem"
            },
            "description": "当前页的技能。"
          }
        },
        "required": [
          "total",
          "skills"
        ]
      },
      "SkillStatusRequest": {
        "type": "object",
        "description": "按 ID 启用/禁用技能。",
        "properties": {
          "skill_id": {
            "type": "string",
            "description": "目标技能 ID。"
          }
        },
        "required": [
          "skill_id"
        ]
      },
      "SkillUpdateRequest": {
        "type": "object",
        "description": "可编辑的技能元数据。",
        "properties": {
          "skill_id": {
            "type": "string",
            "description": "目标技能 ID。"
          },
          "description": {
            "type": "string",
            "description": "新的描述，不能包含 `<` 或 `>`。传入空字符串不会清空当前值 —— 该字段无法用于清空描述。",
            "maxLength": 1024
          },
          "description_en": {
            "type": [
              "string",
              "null"
            ],
            "description": "新的英文描述，不能包含 `<` 或 `>`。省略表示不变；传入空字符串可显式清空。",
            "maxLength": 1024
          },
          "team_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "重新分配团队范围：0 表示账户级；>0 表示团队。省略则不变。",
            "format": "int64"
          }
        },
        "required": [
          "skill_id"
        ]
      },
      "SkillUploadRequest": {
        "type": "object",
        "description": "上传技能压缩包的 multipart 表单。",
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "description": "技能压缩包（.skill / .zip / .tar.gz / .tgz），最大 100MB；超限文件会在读取正文前即被拒绝。"
          },
          "team_id": {
            "type": "integer",
            "description": "新建/upsert 技能的团队范围：0 表示账户级。通过 `skill_id` 定向替换时会忽略该字段。",
            "format": "int64"
          },
          "replace": {
            "type": "boolean",
            "description": "为 true 时覆盖已有技能而非在名称冲突时报错 —— 若提供 `skill_id` 则按其匹配，否则按技能名称匹配。"
          },
          "skill_id": {
            "type": "string",
            "description": "定向替换指定技能时的技能 ID（需配合 `replace=true`）。"
          }
        },
        "required": [
          "file"
        ]
      }
    }
  }
}