{
  "openapi": "3.1.0",
  "info": {
    "title": "Flashduty Open API",
    "description": "API documentation for Android device management and application updates.",
    "version": "1.0.0"
  },
  "tags": [
    {
      "name": "General"
    },
    {
      "name": "分析看板"
    },
    {
      "name": "成员管理"
    },
    {
      "name": "团队管理"
    },
    {
      "name": "值班管理"
    },
    {
      "name": "信息获取"
    },
    {
      "name": "偏好设置"
    },
    {
      "name": "协作空间"
    },
    {
      "name": "协作空间/分派策略"
    },
    {
      "name": "协作空间/排除规则"
    },
    {
      "name": "协作空间/静默策略"
    },
    {
      "name": "协作空间/抑制策略"
    },
    {
      "name": "模板管理"
    },
    {
      "name": "故障管理"
    },
    {
      "name": "故障管理/聚合视图"
    },
    {
      "name": "故障管理/故障复盘"
    },
    {
      "name": "告警管理"
    },
    {
      "name": "告警管理/聚合视图"
    },
    {
      "name": "告警事件"
    },
    {
      "name": "变更管理"
    },
    {
      "name": "自定义字段"
    },
    {
      "name": "服务日历"
    },
    {
      "name": "标签增强"
    },
    {
      "name": "标签增强/Mapping-Schema"
    },
    {
      "name": "标签增强/Mapping-Api"
    },
    {
      "name": "告警处理"
    },
    {
      "name": "集成中心"
    },
    {
      "name": "集成中心/告警集成"
    },
    {
      "name": "集成中心/Webhook"
    },
    {
      "name": "License管理"
    },
    {
      "name": "APP Key"
    },
    {
      "name": "RUM"
    },
    {
      "name": "RUM/应用管理"
    },
    {
      "name": "RUM/错误追踪"
    },
    {
      "name": "RUM/通用接口"
    },
    {
      "name": "RUM/Sourcemap"
    },
    {
      "name": "RUM/会话回放"
    },
    {
      "name": "账户设置"
    },
    {
      "name": "Monitors"
    },
    {
      "name": "Monitors/告警规则"
    },
    {
      "name": "Monitors/告警规则/管理"
    },
    {
      "name": "Monitors/告警规则/导入导出"
    },
    {
      "name": "Monitors/告警规则/审计日志"
    },
    {
      "name": "Monitors/告警规则/统计"
    },
    {
      "name": "Monitors/告警规则/数据源"
    }
  ],
  "paths": {
    "/member/invite": {
      "post": {
        "summary": "邀请成员",
        "deprecated": false,
        "description": "邀请即创建账号，登录可以完成激活，同时完成手机或邮件验证，对应通道才可以接收通知",
        "tags": [
          "成员管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "members": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "string",
                          "title": "邮件地址",
                          "description": "和手机号至少有一个，<span style=\"color: red;\">邮件地址必须经过验证才可以接收通知信息</span>，成员登录时系统将引导信息补全或验证"
                        },
                        "phone": {
                          "type": "string",
                          "title": "手机号",
                          "description": "和邮件地址至少有一个，<span style=\"color: red;\">手机号必须经过验证才可以接收通知信息</span>，成员登录时系统将引导信息补全或验证"
                        },
                        "country_code": {
                          "type": "string",
                          "title": "国家码",
                          "description": "默认为CN"
                        },
                        "member_name": {
                          "type": "string",
                          "title": "成员名称",
                          "description": "当传手机号时，必设置；当传email时，缺省使用email前缀。<span style=\"color: red;\">成员名称要求账户下唯一</span>"
                        },
                        "ref_id": {
                          "type": "string",
                          "title": "关联ID"
                        },
                        "role_ids": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "title": "账户角色ID列表",
                          "description": "不传不设置"
                        }
                      }
                    },
                    "title": "成员列表",
                    "description": "<span style=\"color: red;\">单次邀请最多20个，单日邀请最多200个</span>",
                    "maxItems": 20
                  },
                  "from": {
                    "type": "string",
                    "description": "跳过成员验证，需开通白名单",
                    "examples": [
                      "api"
                    ]
                  }
                },
                "required": [
                  "members"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MemberItemShort"
                      }
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/member/info/reset": {
      "post": {
        "summary": "重置信息",
        "deprecated": false,
        "description": "<span style=\"color: red;\">账户owner和admin可以修改所有成员信息，每个成员可以修改自己的信息</span>",
        "tags": [
          "成员管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "member_id": {
                    "type": "integer",
                    "title": "成员ID",
                    "description": "五者有且仅有一个"
                  },
                  "member_name": {
                    "type": "string",
                    "title": "成员名称",
                    "description": "五者有且仅有一个"
                  },
                  "phone": {
                    "type": "string",
                    "title": "成员手机号",
                    "description": "五者有且仅有一个"
                  },
                  "email": {
                    "type": "string",
                    "title": "成员邮件地址",
                    "description": "五者有且仅有一个"
                  },
                  "ref_id": {
                    "type": "string",
                    "title": "关联ID",
                    "description": "五者有且仅有一个"
                  },
                  "updates": {
                    "type": "object",
                    "properties": {
                      "phone": {
                        "type": "string",
                        "title": "新手机号",
                        "description": "不传不更新。请注意：<span style=\"color: red;\">旧手机号立即失效，新手机号必须经过验证才可以接收信息，谨慎操作！！</span>，成员登录时系统将引导信息补全或验证"
                      },
                      "country_code": {
                        "type": "string",
                        "title": "新国家码",
                        "description": "不传不更新。"
                      },
                      "email": {
                        "type": "string",
                        "title": "新邮件地址",
                        "description": "不传不更新。请注意：<span style=\"color: red;\">旧邮件地址立即失效，新邮件地址必须经过验证才可以接收信息，谨慎操作！！</span>，成员登录时系统将引导信息补全或验证"
                      },
                      "member_name": {
                        "type": "string",
                        "title": "新成员名称",
                        "description": "不传不更新。"
                      },
                      "time_zone": {
                        "type": "string",
                        "default": "Asia/Shanghai",
                        "description": "不传不更新。必须是 tzdata 格式。请参阅[此处](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)可接受的值列表。",
                        "title": "默认时区"
                      },
                      "locale": {
                        "type": "string",
                        "enum": [
                          "zh-CN",
                          "en-US"
                        ],
                        "title": "默认语言",
                        "description": "不传不更新。"
                      },
                      "ref_id": {
                        "type": "string",
                        "title": "关联ID"
                      }
                    },
                    "title": "更新内容",
                    "description": "以下字段，不传入时，不更新对应项"
                  }
                },
                "required": [
                  "updates"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/member/delete": {
      "post": {
        "summary": "删除成员",
        "deprecated": false,
        "description": "",
        "tags": [
          "成员管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "member_id": {
                    "type": "integer",
                    "title": "成员ID",
                    "description": "四者有且仅有一个"
                  },
                  "phone": {
                    "type": "string",
                    "title": "成员手机号",
                    "description": "四者有且仅有一个"
                  },
                  "email": {
                    "type": "string",
                    "title": "成员邮件地址",
                    "description": "四者有且仅有一个"
                  },
                  "ref_id": {
                    "type": "string",
                    "title": "关联ID",
                    "description": "四者有且仅有一个"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "refs": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Reference"
                          },
                          "title": "关联资源列表"
                        }
                      },
                      "required": [
                        "refs"
                      ],
                      "description": "仅code=ReferenceExist时存在"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/member/list": {
      "post": {
        "summary": "成员列表",
        "deprecated": false,
        "description": "",
        "tags": [
          "成员管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "p": {
                    "type": "integer",
                    "description": "页码，从1开始"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "分页条数"
                  },
                  "asc": {
                    "type": "boolean",
                    "description": "是否升序"
                  },
                  "orderby": {
                    "type": "string",
                    "description": "排序依据",
                    "enum": [
                      "created_at",
                      "updated_at"
                    ]
                  },
                  "role_id": {
                    "type": "integer",
                    "description": "角色ID，不传不查询"
                  },
                  "query": {
                    "type": "string",
                    "description": "查询关键词，模糊匹配member_name和email，如果识别为手机号，将严格匹配手机号"
                  }
                }
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅当出现错误时存在"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "p": {
                          "type": "integer",
                          "description": "当前查询页码"
                        },
                        "limit": {
                          "type": "integer",
                          "description": "查询每页内数据条数"
                        },
                        "total": {
                          "type": "integer",
                          "description": "匹配到总数据条数"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "properties": {
                              "member_id": {
                                "type": "integer",
                                "title": "id"
                              },
                              "member_name": {
                                "type": "string",
                                "title": "名称"
                              },
                              "phone": {
                                "type": "string",
                                "title": "加密的手机号"
                              },
                              "email": {
                                "type": "string",
                                "title": "明文邮件地址"
                              },
                              "account_role_ids": {
                                "type": "array",
                                "items": {
                                  "type": "integer"
                                },
                                "title": "角色ID列表"
                              },
                              "status": {
                                "type": "string",
                                "title": "状态"
                              },
                              "created_at": {
                                "type": "integer",
                                "title": "创建时间戳"
                              },
                              "updated_at": {
                                "type": "integer",
                                "title": "更新时间戳"
                              },
                              "phone_verified": {
                                "type": "string",
                                "title": "手机是否验证通过"
                              },
                              "email_verified": {
                                "type": "string",
                                "title": "邮件是否验证通过"
                              }
                            },
                            "required": [
                              "member_id",
                              "member_name",
                              "created_at",
                              "status",
                              "updated_at"
                            ],
                            "$ref": "#/components/schemas/MemberItem"
                          },
                          "description": "成员列表"
                        }
                      },
                      "required": [
                        "p",
                        "items",
                        "total",
                        "limit"
                      ],
                      "description": "响应数据"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/member/role/update": {
      "post": {
        "summary": "角色更新",
        "deprecated": false,
        "description": "",
        "tags": [
          "成员管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "member_id": {
                    "type": "integer",
                    "title": "成员ID"
                  },
                  "role_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "角色ID"
                  }
                }
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/member/role/grant": {
      "post": {
        "summary": "角色授予",
        "deprecated": false,
        "description": "",
        "tags": [
          "成员管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "member_id": {
                    "type": "integer",
                    "title": "成员ID"
                  },
                  "role_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "角色ID"
                  }
                }
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/member/role/revoke": {
      "post": {
        "summary": "角色撤销",
        "deprecated": false,
        "description": "",
        "tags": [
          "成员管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "member_id": {
                    "type": "integer",
                    "title": "成员ID"
                  },
                  "role_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "角色ID"
                  }
                }
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/team/list": {
      "post": {
        "summary": "团队列表",
        "deprecated": false,
        "description": "",
        "tags": [
          "团队管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "p": {
                    "type": "integer",
                    "description": "页码，从1开始"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "分页条数"
                  },
                  "asc": {
                    "type": "boolean",
                    "description": "是否升序"
                  },
                  "orderby": {
                    "type": "string",
                    "description": "排序字段"
                  },
                  "query": {
                    "type": "string",
                    "description": "查询语句，模糊匹配名称和描述"
                  },
                  "person_id": {
                    "type": "integer",
                    "description": "人员ID，查询包含此人员的团队，人员可以为account或member"
                  }
                }
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅出现错误时返回"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/TeamItem"
                          },
                          "description": "团队列表"
                        },
                        "p": {
                          "type": "integer",
                          "description": "当前查询页码"
                        },
                        "limit": {
                          "type": "integer",
                          "description": "每页内数据条数"
                        },
                        "total": {
                          "type": "integer",
                          "description": "匹配到的总数据条数"
                        }
                      },
                      "required": [
                        "items",
                        "p",
                        "total",
                        "limit"
                      ],
                      "description": "响应数据"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/team/info": {
      "post": {
        "summary": "基本信息",
        "deprecated": false,
        "description": "",
        "tags": [
          "团队管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "team_id": {
                    "type": "integer",
                    "title": "id",
                    "description": "三者至少有一个"
                  },
                  "team_name": {
                    "type": "string",
                    "title": "name",
                    "description": "三者至少有一个"
                  },
                  "ref_id": {
                    "type": "string",
                    "title": "ref_id",
                    "description": "三者至少有一个"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "team_id": {
                          "title": "id",
                          "type": "integer"
                        },
                        "team_name": {
                          "type": "string",
                          "title": "name"
                        },
                        "description": {
                          "type": "string",
                          "title": "描述"
                        },
                        "created_at": {
                          "title": "创建时间戳",
                          "type": "integer"
                        },
                        "updated_at": {
                          "title": "更新时间戳",
                          "type": "integer"
                        },
                        "updated_by": {
                          "title": "上次修改人",
                          "type": "integer"
                        },
                        "updated_by_name": {
                          "type": "string",
                          "title": "上次修改人名称"
                        },
                        "creator_id": {
                          "type": "integer",
                          "title": "创建人ID"
                        },
                        "ref_id": {
                          "type": "string",
                          "title": "gu关联ID"
                        },
                        "person_ids": {
                          "title": "人员列表",
                          "type": "array",
                          "items": {
                            "type": "integer"
                          }
                        }
                      },
                      "required": [
                        "team_id",
                        "01GB29AK833YTGER10DSPWDSW2",
                        "updated_by",
                        "updated_at",
                        "created_at",
                        "description",
                        "team_name",
                        "person_ids",
                        "updated_by_name",
                        "creator_id",
                        "ref_id"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/team/delete": {
      "post": {
        "summary": "团队删除",
        "deprecated": false,
        "description": "",
        "tags": [
          "团队管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "team_id": {
                    "type": "integer",
                    "title": "团队ID",
                    "description": "三者至少有一个"
                  },
                  "team_name": {
                    "type": "string",
                    "title": "团队名称",
                    "description": "三者至少有一个"
                  },
                  "ref_id": {
                    "type": "string",
                    "description": "三者至少有一个",
                    "title": "团队关联ID"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "refs": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Reference"
                          },
                          "title": "关联资源列表"
                        }
                      },
                      "required": [
                        "refs"
                      ],
                      "description": "仅code=ReferenceExist时存在"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/team/upsert": {
      "post": {
        "summary": "团队Upsert",
        "deprecated": false,
        "description": "",
        "tags": [
          "团队管理"
        ],
        "parameters": [
          {
            "name": "Content-MD5",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "team_id": {
                    "type": "integer",
                    "title": "团队ID"
                  },
                  "team_name": {
                    "type": "string",
                    "title": "团队名称",
                    "description": "<span style=\"color: red;\">团队名称要求账户下唯一</span>"
                  },
                  "reset_if_name_exist": {
                    "type": "boolean",
                    "title": "是否按名称更新",
                    "description": "如果没有传入团队ID，但团队名称已经存在，此值为true时，将更新同名团队，否则拒绝更新，提示存在同名团队"
                  },
                  "description": {
                    "type": "string",
                    "title": "团队描述"
                  },
                  "ref_id": {
                    "type": "string",
                    "description": "关联ID"
                  },
                  "person_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "成员ID列表",
                    "description": "邮件、手机和ID列表至少有一个，同时存在多个，系统会进行合并"
                  },
                  "emails": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "成员邮件列表",
                    "description": "邮件、手机和ID列表至少有一个，同时存在多个，系统会进行合并。<span style=\"color: red;\">当邮件同时被主体和成员使用，将同时邀请二人加入团队</span>"
                  },
                  "phones": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "成员手机列表",
                    "description": "邮件、手机和ID列表至少有一个，同时存在多个，系统会进行合并。<span style=\"color: red;\">当邮件同时被主体和成员使用，将同时邀请二人加入团队</span>"
                  }
                },
                "required": [
                  "team_name",
                  "description"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "team_id": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/schedule/create": {
      "post": {
        "summary": "创建值班表",
        "deprecated": false,
        "description": "",
        "tags": [
          "值班管理"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "layers": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "layer_name": {
                          "type": "string",
                          "title": "规则名"
                        },
                        "mode": {
                          "type": "integer",
                          "title": "模式(普通/临时)",
                          "enum": [
                            0,
                            1
                          ],
                          "description": "mode为1的规则放到为0的后面"
                        },
                        "groups": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "group_name": {
                                "type": "string",
                                "title": "分组名称"
                              },
                              "members": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role_id": {
                                      "type": "integer",
                                      "title": "角色id"
                                    },
                                    "person_ids": {
                                      "type": "array",
                                      "items": {
                                        "type": "integer"
                                      },
                                      "title": "人员id"
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "title": "值班分组"
                        },
                        "fair_rotation": {
                          "type": "boolean",
                          "title": "公平轮转开关"
                        },
                        "handoff_time": {
                          "type": "integer",
                          "title": "接手时间",
                          "description": "接手时间，1周粒度的值班周期使用，从周一00:00到接手的秒数"
                        },
                        "layer_start": {
                          "type": "integer",
                          "title": "开始时间",
                          "description": "最小粒度半小时"
                        },
                        "layer_end": {
                          "type": "integer",
                          "title": "结束时间",
                          "description": "最小粒度半小时"
                        },
                        "restrict_mode": {
                          "type": "integer",
                          "title": "周期内限定模式",
                          "enum": [
                            0,
                            1,
                            2
                          ],
                          "description": "0 无限制  1  天粒度  2 周粒度"
                        },
                        "restrict_periods": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "restrict_start": {
                                "type": "integer",
                                "title": "限定开始时间",
                                "description": "只针对restrict_mode 天粒度和周粒度生效，天粒度 从当天00：00到限制开始时间的 Unix时间秒数，周粒度从周一00：00到限定开始时间的秒数"
                              },
                              "restrict_end": {
                                "type": "integer",
                                "title": "限定结束时间",
                                "description": "只针对restrict_mode 天粒度和周粒度生效，天粒度 从当天00：00到限制结束时间的时间秒数，周粒度从周一00：00到限定结束时间的秒数"
                              }
                            }
                          },
                          "title": "限定时间区间列表"
                        },
                        "day_mask": {
                          "type": "object",
                          "properties": {
                            "repeat": {
                              "type": "array",
                              "items": {
                                "type": "integer",
                                "enum": [
                                  0,
                                  1,
                                  2,
                                  3,
                                  4,
                                  5,
                                  6
                                ],
                                "description": "周日为0，选中日期会被计算，否则会被排除"
                              },
                              "title": "星期掩码列表"
                            }
                          },
                          "required": [
                            "repeat"
                          ],
                          "title": "日期掩码"
                        },
                        "mask_continuous_enabled": {
                          "type": "boolean",
                          "title": "掩码连续轮转",
                          "description": "日期掩码连续轮转，按照开始时间的时分，顺延到第二天，实现跨天日期掩码增强"
                        },
                        "rotation_unit": {
                          "type": "string",
                          "title": "周期单位",
                          "enum": [
                            "hour",
                            "day",
                            "week",
                            "month"
                          ],
                          "description": "month 自然月"
                        },
                        "rotation_value": {
                          "type": "integer",
                          "title": "周期值"
                        }
                      },
                      "required": [
                        "mode",
                        "layer_start",
                        "layer_name"
                      ]
                    },
                    "title": "规则"
                  },
                  "notify": {
                    "type": "object",
                    "properties": {
                      "advance_in_time": {
                        "type": "integer",
                        "title": "提前多久通知",
                        "description": "单位s"
                      },
                      "fixed_time": {
                        "type": "object",
                        "properties": {
                          "cycle": {
                            "type": "string",
                            "enum": [
                              "day"
                            ],
                            "title": "day",
                            "description": "当前仅支持天粒度"
                          },
                          "start": {
                            "type": "string",
                            "description": "样式：08:00。 cycle和start同时有数据时才生效",
                            "title": "开始时间"
                          }
                        },
                        "title": "固定时间通知"
                      },
                      "by": {
                        "type": "object",
                        "properties": {
                          "follow_preference": {
                            "type": "boolean",
                            "title": "个人偏好设置"
                          },
                          "personal_channels": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "email",
                                "sms",
                                "feishu_app:xxxx",
                                "dingtalk_app:xxxx",
                                "wecom_app:xxxx"
                              ]
                            },
                            "title": "个人自定义设置"
                          }
                        },
                        "title": "个人通知"
                      },
                      "webhooks": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "title": "类别",
                              "enum": [
                                "feishu",
                                "dingtalk",
                                "feishu_app",
                                "dingtalk_app",
                                "slack_app"
                              ]
                            },
                            "settings": {
                              "type": "object",
                              "properties": {
                                "token": {
                                  "type": "string",
                                  "title": "Token"
                                },
                                "alias": {
                                  "type": "string",
                                  "title": "别名"
                                },
                                "integration_id": {
                                  "type": "integer",
                                  "title": "集成id"
                                },
                                "chat_ids": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "title": "通知的ids"
                                },
                                "sign_secret": {
                                  "type": "string",
                                  "title": "签名Secret"
                                }
                              }
                            }
                          }
                        },
                        "title": "Webhooks通知"
                      }
                    },
                    "title": "值班轮转通知"
                  },
                  "schedule_name": {
                    "type": "string"
                  },
                  "team_id": {
                    "type": "integer",
                    "title": "团队id"
                  },
                  "status": {
                    "type": "integer",
                    "title": "是否启用",
                    "description": "0 启用"
                  },
                  "description": {
                    "type": "string",
                    "title": "备注"
                  }
                },
                "required": [
                  "schedule_name",
                  "status",
                  "description",
                  "layers"
                ]
              },
              "example": ""
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "schedule_id": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "schedule_id"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "错误码。枚举值：InvalidParameter、Unauthorized、AccessDenied、ResourceNotFound、InternalError 等。"
                        },
                        "message": {
                          "type": "string",
                          "description": "错误描述。"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  }
                },
                "example": {
                  "data": {
                    "schedule_id": 0
                  },
                  "error": {
                    "code": "",
                    "message": ""
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/schedule/update": {
      "post": {
        "summary": "更新值班表",
        "deprecated": false,
        "description": "",
        "tags": [
          "值班管理"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "layers": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "layer_name": {
                          "type": "string",
                          "title": "规则名"
                        },
                        "mode": {
                          "type": "integer",
                          "title": "模式(普通/临时)",
                          "enum": [
                            0,
                            1
                          ],
                          "description": "mode为1的规则放到为0的后面"
                        },
                        "groups": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "group_name": {
                                "type": "string",
                                "title": "分组名称"
                              },
                              "members": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role_id": {
                                      "type": "integer",
                                      "title": "角色id"
                                    },
                                    "person_ids": {
                                      "type": "array",
                                      "items": {
                                        "type": "integer"
                                      },
                                      "title": "人员id"
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "title": "值班分组"
                        },
                        "fair_rotation": {
                          "type": "boolean",
                          "title": "公平轮转开关"
                        },
                        "handoff_time": {
                          "type": "integer",
                          "title": "接手时间",
                          "description": "接手时间，1周粒度的值班周期使用，从周一00:00到接手的秒数"
                        },
                        "layer_start": {
                          "type": "integer",
                          "title": "开始时间",
                          "description": "最小粒度半小时"
                        },
                        "layer_end": {
                          "type": "integer",
                          "title": "结束时间",
                          "description": "最小粒度半小时"
                        },
                        "restrict_mode": {
                          "type": "integer",
                          "title": "周期内限定模式",
                          "enum": [
                            0,
                            1,
                            2
                          ],
                          "description": "0 无限制  1  天粒度  2 周粒度"
                        },
                        "restrict_periods": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "restrict_start": {
                                "type": "integer",
                                "title": "限定开始时间",
                                "description": "只针对restrict_mode 天粒度和周粒度生效，天粒度 从当天00：00到限制开始时间的 Unix时间秒数，周粒度从周一00：00到限定开始时间的秒数"
                              },
                              "restrict_end": {
                                "type": "integer",
                                "title": "限定结束时间",
                                "description": "只针对restrict_mode 天粒度和周粒度生效，天粒度 从当天00：00到限制结束时间的时间秒数，周粒度从周一00：00到限定结束时间的秒数"
                              }
                            }
                          },
                          "title": "限定时间区间列表"
                        },
                        "day_mask": {
                          "type": "object",
                          "properties": {
                            "repeat": {
                              "type": "array",
                              "items": {
                                "type": "integer",
                                "enum": [
                                  0,
                                  1,
                                  2,
                                  3,
                                  4,
                                  5,
                                  6
                                ],
                                "description": "周日为0，选中日期会被计算，否则会被排除"
                              },
                              "title": "星期掩码列表"
                            }
                          },
                          "required": [
                            "repeat"
                          ],
                          "title": "日期掩码"
                        },
                        "mask_continuous_enabled": {
                          "type": "boolean",
                          "title": "掩码连续轮转",
                          "description": "日期掩码连续轮转，按照开始时间的时分，顺延到第二天，实现跨天日期掩码增强"
                        },
                        "rotation_unit": {
                          "type": "string",
                          "title": "周期单位",
                          "enum": [
                            "hour",
                            "day",
                            "week",
                            "month"
                          ],
                          "description": "month 自然月"
                        },
                        "rotation_value": {
                          "type": "integer",
                          "title": "周期值"
                        }
                      },
                      "required": [
                        "mode",
                        "layer_start",
                        "layer_name"
                      ]
                    },
                    "title": "规则"
                  },
                  "notify": {
                    "type": "object",
                    "properties": {
                      "advance_in_time": {
                        "type": "integer",
                        "title": "提前多久通知",
                        "description": "单位s"
                      },
                      "fixed_time": {
                        "type": "object",
                        "properties": {
                          "cycle": {
                            "type": "string",
                            "enum": [
                              "day"
                            ],
                            "title": "day",
                            "description": "当前仅支持天粒度"
                          },
                          "start": {
                            "type": "string",
                            "description": "样式：08:00。 cycle和start同时有数据时才生效",
                            "title": "开始时间"
                          }
                        },
                        "title": "固定时间通知"
                      },
                      "by": {
                        "type": "object",
                        "properties": {
                          "follow_preference": {
                            "type": "boolean",
                            "title": "个人偏好设置"
                          },
                          "personal_channels": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "email",
                                "sms",
                                "feishu_app:xxxx",
                                "dingtalk_app:xxxx",
                                "wecom_app:xxxx"
                              ]
                            },
                            "title": "个人自定义设置"
                          }
                        },
                        "title": "个人通知"
                      },
                      "webhooks": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "title": "类别",
                              "enum": [
                                "feishu",
                                "dingtalk",
                                "feishu_app",
                                "dingtalk_app",
                                "slack_app"
                              ]
                            },
                            "settings": {
                              "type": "object",
                              "properties": {
                                "token": {
                                  "type": "string",
                                  "title": "Token"
                                },
                                "alias": {
                                  "type": "string",
                                  "title": "别名"
                                },
                                "integration_id": {
                                  "type": "integer",
                                  "title": "集成id"
                                },
                                "chat_ids": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "title": "通知的ids"
                                },
                                "sign_secret": {
                                  "type": "string",
                                  "title": "签名Secret"
                                }
                              }
                            }
                          }
                        },
                        "title": "Webhooks通知"
                      }
                    },
                    "title": "值班轮转通知"
                  },
                  "schedule_id": {
                    "type": "integer"
                  },
                  "schedule_name": {
                    "type": "string"
                  },
                  "team_id": {
                    "type": "integer",
                    "title": "团队id"
                  },
                  "description": {
                    "type": "string",
                    "title": "备注"
                  }
                },
                "required": [
                  "schedule_id",
                  "description",
                  "layers"
                ]
              },
              "example": ""
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "错误码。枚举值：InvalidParameter、Unauthorized、AccessDenied、ResourceNotFound、InternalError 等。"
                        },
                        "message": {
                          "type": "string",
                          "description": "错误描述。"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": {
                    "code": "0",
                    "message": ""
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/schedule/preview": {
      "post": {
        "summary": "预览值班表",
        "deprecated": false,
        "description": "",
        "tags": [
          "值班管理"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "start": {
                    "type": "integer",
                    "title": "开始时间"
                  },
                  "end": {
                    "type": "integer",
                    "title": "结束时间",
                    "description": "跟start的间隔不大于45天"
                  },
                  "layers": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "layer_name": {
                          "type": "string",
                          "title": "规则名"
                        },
                        "mode": {
                          "type": "integer",
                          "title": "模式(普通/临时)",
                          "enum": [
                            0,
                            1
                          ],
                          "description": "mode为1的规则放到为0的后面"
                        },
                        "groups": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "group_name": {
                                "type": "string",
                                "title": "分组名称"
                              },
                              "members": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role_id": {
                                      "type": "integer",
                                      "title": "角色id"
                                    },
                                    "person_ids": {
                                      "type": "array",
                                      "items": {
                                        "type": "integer"
                                      },
                                      "title": "人员id"
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "title": "值班分组"
                        },
                        "fair_rotation": {
                          "type": "boolean",
                          "title": "公平轮转开关"
                        },
                        "handoff_time": {
                          "type": "integer",
                          "title": "接手时间",
                          "description": "接手时间，1周粒度的值班周期使用，从周一00:00到接手的秒数"
                        },
                        "layer_start": {
                          "type": "integer",
                          "title": "开始时间",
                          "description": "最小粒度半小时"
                        },
                        "layer_end": {
                          "type": "integer",
                          "title": "结束时间",
                          "description": "最小粒度半小时"
                        },
                        "restrict_mode": {
                          "type": "integer",
                          "title": "周期内限定模式",
                          "enum": [
                            0,
                            1,
                            2
                          ],
                          "description": "0 无限制  1  天粒度  2 周粒度"
                        },
                        "restrict_periods": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "restrict_start": {
                                "type": "integer",
                                "title": "限定开始时间",
                                "description": "只针对restrict_mode 天粒度和周粒度生效，天粒度 从当天00：00到限制开始时间的 Unix时间秒数，周粒度从周一00：00到限定开始时间的秒数"
                              },
                              "restrict_end": {
                                "type": "integer",
                                "title": "限定结束时间",
                                "description": "只针对restrict_mode 天粒度和周粒度生效，天粒度 从当天00：00到限制结束时间的时间秒数，周粒度从周一00：00到限定结束时间的秒数"
                              }
                            }
                          },
                          "title": "限定时间区间列表"
                        },
                        "day_mask": {
                          "type": "object",
                          "properties": {
                            "repeat": {
                              "type": "array",
                              "items": {
                                "type": "integer",
                                "enum": [
                                  0,
                                  1,
                                  2,
                                  3,
                                  4,
                                  5,
                                  6
                                ],
                                "description": "周日为0，选中日期会被计算，否则会被排除"
                              },
                              "title": "星期掩码列表"
                            }
                          },
                          "required": [
                            "repeat"
                          ],
                          "title": "日期掩码"
                        },
                        "mask_continuous_enabled": {
                          "type": "boolean",
                          "title": "掩码连续轮转",
                          "description": "日期掩码连续轮转，按照开始时间的时分，顺延到第二天，实现跨天日期掩码增强"
                        },
                        "rotation_unit": {
                          "type": "string",
                          "title": "周期单位",
                          "enum": [
                            "hour",
                            "day",
                            "week",
                            "month"
                          ],
                          "description": "month 自然月"
                        },
                        "rotation_value": {
                          "type": "integer",
                          "title": "周期值"
                        }
                      },
                      "required": [
                        "mode",
                        "layer_start",
                        "layer_name"
                      ]
                    },
                    "title": "规则"
                  }
                },
                "required": [
                  "start",
                  "end",
                  "layers"
                ]
              },
              "example": ""
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "integer"
                        },
                        "end": {
                          "type": "integer"
                        },
                        "schedule_id": {
                          "type": "integer"
                        },
                        "schedule_name": {
                          "type": "string"
                        },
                        "team_id": {
                          "type": "integer"
                        },
                        "layers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "layer_name": {
                                "type": "string",
                                "title": "规则名"
                              },
                              "mode": {
                                "type": "integer",
                                "title": "模式(普通/临时)",
                                "enum": [
                                  0,
                                  1
                                ],
                                "description": "mode为1的规则放到为0的后面"
                              },
                              "groups": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "group_name": {
                                      "type": "string",
                                      "title": "分组名称"
                                    },
                                    "members": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role_id": {
                                            "type": "integer",
                                            "title": "角色id"
                                          },
                                          "person_ids": {
                                            "type": "array",
                                            "items": {
                                              "type": "integer"
                                            },
                                            "title": "人员id"
                                          }
                                        }
                                      }
                                    }
                                  }
                                },
                                "title": "值班分组"
                              },
                              "fair_rotation": {
                                "type": "boolean",
                                "title": "公平轮转开关"
                              },
                              "handoff_time": {
                                "type": "integer",
                                "title": "接手时间",
                                "description": "接手时间，1周粒度的值班周期使用，从周一00:00到接手的秒数"
                              },
                              "layer_start": {
                                "type": "integer",
                                "title": "开始时间",
                                "description": "最小粒度半小时"
                              },
                              "layer_end": {
                                "type": "integer",
                                "title": "结束时间",
                                "description": "最小粒度半小时"
                              },
                              "restrict_mode": {
                                "type": "integer",
                                "title": "周期内限定模式",
                                "enum": [
                                  0,
                                  1,
                                  2
                                ],
                                "description": "0 无限制  1  天粒度  2 周粒度"
                              },
                              "restrict_periods": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "restrict_start": {
                                      "type": "integer",
                                      "title": "限定开始时间",
                                      "description": "只针对restrict_mode 天粒度和周粒度生效，天粒度 从当天00：00到限制开始时间的 Unix时间秒数，周粒度从周一00：00到限定开始时间的秒数"
                                    },
                                    "restrict_end": {
                                      "type": "integer",
                                      "title": "限定结束时间",
                                      "description": "只针对restrict_mode 天粒度和周粒度生效，天粒度 从当天00：00到限制结束时间的时间秒数，周粒度从周一00：00到限定结束时间的秒数"
                                    }
                                  }
                                },
                                "title": "限定时间区间列表"
                              },
                              "day_mask": {
                                "type": "object",
                                "properties": {
                                  "repeat": {
                                    "type": "array",
                                    "items": {
                                      "type": "integer",
                                      "enum": [
                                        0,
                                        1,
                                        2,
                                        3,
                                        4,
                                        5,
                                        6
                                      ],
                                      "description": "周日为0，选中日期会被计算，否则会被排除"
                                    },
                                    "title": "星期掩码列表"
                                  }
                                },
                                "required": [
                                  "repeat"
                                ],
                                "title": "日期掩码"
                              },
                              "mask_continuous_enabled": {
                                "type": "boolean",
                                "title": "掩码连续轮转",
                                "description": "日期掩码连续轮转，按照开始时间的时分，顺延到第二天，实现跨天日期掩码增强"
                              },
                              "rotation_unit": {
                                "type": "string",
                                "title": "周期单位",
                                "enum": [
                                  "hour",
                                  "day",
                                  "week",
                                  "month"
                                ],
                                "description": "month 自然月"
                              },
                              "rotation_value": {
                                "type": "integer",
                                "title": "周期值"
                              }
                            },
                            "required": [
                              "mode",
                              "layer_start",
                              "layer_name"
                            ]
                          },
                          "title": "规则"
                        },
                        "layer_schedules": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "layer_name": {
                                "type": "string",
                                "title": "规则名称"
                              },
                              "mode": {
                                "type": "integer",
                                "title": "模式(普通/临时)"
                              },
                              "schedules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "start": {
                                      "type": "integer",
                                      "title": "开始时间"
                                    },
                                    "end": {
                                      "type": "integer",
                                      "title": "结束时间"
                                    },
                                    "hash": {
                                      "type": "string",
                                      "title": "Hash"
                                    },
                                    "group": {
                                      "type": "object",
                                      "properties": {
                                        "group_name": {
                                          "type": "string",
                                          "title": "团队名"
                                        },
                                        "members": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "role_id": {
                                                "type": "integer",
                                                "title": "角色id"
                                              },
                                              "person_ids": {
                                                "type": "array",
                                                "items": {
                                                  "type": "integer"
                                                },
                                                "title": "值班人员id"
                                              }
                                            }
                                          }
                                        }
                                      },
                                      "required": [
                                        "group_name",
                                        "members"
                                      ],
                                      "title": "值班团队"
                                    }
                                  }
                                },
                                "title": "值班表"
                              }
                            }
                          },
                          "title": "值班规则计算"
                        },
                        "final_schedule": {
                          "type": "object",
                          "properties": {
                            "layer_name": {
                              "type": "string",
                              "description": "规则名"
                            },
                            "mode": {
                              "type": "integer"
                            },
                            "schedules": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "start": {
                                    "type": "integer",
                                    "description": "开始时间"
                                  },
                                  "end": {
                                    "type": "integer",
                                    "description": "结束时间"
                                  },
                                  "hash": {
                                    "type": "string",
                                    "description": "Hash"
                                  },
                                  "group": {
                                    "type": "object",
                                    "properties": {
                                      "group_name": {
                                        "type": "string",
                                        "description": "团队名"
                                      },
                                      "members": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "role_id": {
                                              "type": "integer",
                                              "description": "角色id"
                                            },
                                            "person_ids": {
                                              "type": "array",
                                              "items": {
                                                "type": "integer"
                                              },
                                              "description": "值班人员id"
                                            }
                                          }
                                        }
                                      }
                                    },
                                    "required": [
                                      "group_name",
                                      "members"
                                    ],
                                    "description": "值班团队"
                                  }
                                }
                              }
                            }
                          },
                          "required": [
                            "layer_name",
                            "mode",
                            "schedules"
                          ],
                          "description": "最终值班"
                        }
                      },
                      "required": [
                        "start",
                        "end",
                        "schedule_id",
                        "schedule_name",
                        "team_id",
                        "layers",
                        "layer_schedules",
                        "final_schedule"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "错误码。枚举值：InvalidParameter、Unauthorized、AccessDenied、ResourceNotFound、InternalError 等。"
                        },
                        "message": {
                          "type": "string",
                          "description": "错误描述。"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/schedule/delete": {
      "post": {
        "summary": "删除值班表",
        "deprecated": false,
        "description": "",
        "tags": [
          "值班管理"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "schedule_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  }
                },
                "required": [
                  "schedule_ids"
                ]
              },
              "example": {
                "scheudle_ids": [
                  1
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "refs": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Reference"
                          },
                          "title": "关联资源列表"
                        }
                      },
                      "required": [
                        "refs"
                      ],
                      "description": "仅code=ReferenceExist时存在"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/schedule/info": {
      "post": {
        "summary": "查看值班详情",
        "deprecated": false,
        "description": "",
        "tags": [
          "值班管理"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "schedule_id": {
                    "type": "integer",
                    "title": "值班id"
                  },
                  "start": {
                    "type": "integer",
                    "title": "开始时间"
                  },
                  "end": {
                    "type": "integer",
                    "title": "结束时间",
                    "description": "跟start的间隔不大于45天"
                  }
                },
                "required": [
                  "schedule_id",
                  "start",
                  "end"
                ]
              },
              "example": {
                "schedule_id": 123,
                "start": 1111111111,
                "end": 11111111111
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "schedule_id": {
                          "type": "integer"
                        },
                        "schedule_name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "team_id": {
                          "type": "integer"
                        },
                        "layers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "layer_name": {
                                "type": "string",
                                "title": "规则名"
                              },
                              "mode": {
                                "type": "integer",
                                "title": "模式(普通/临时)",
                                "enum": [
                                  0,
                                  1
                                ],
                                "description": "mode为1的规则放到为0的后面"
                              },
                              "groups": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "group_name": {
                                      "type": "string",
                                      "title": "分组名称"
                                    },
                                    "members": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role_id": {
                                            "type": "integer",
                                            "title": "角色id"
                                          },
                                          "person_ids": {
                                            "type": "array",
                                            "items": {
                                              "type": "integer"
                                            },
                                            "title": "人员id"
                                          }
                                        }
                                      }
                                    }
                                  }
                                },
                                "title": "值班分组"
                              },
                              "fair_rotation": {
                                "type": "boolean",
                                "title": "公平轮转开关"
                              },
                              "handoff_time": {
                                "type": "integer",
                                "title": "接手时间",
                                "description": "接手时间，1周粒度的值班周期使用，从周一00:00到接手的秒数"
                              },
                              "layer_start": {
                                "type": "integer",
                                "title": "开始时间",
                                "description": "最小粒度半小时"
                              },
                              "layer_end": {
                                "type": "integer",
                                "title": "结束时间",
                                "description": "最小粒度半小时"
                              },
                              "restrict_mode": {
                                "type": "integer",
                                "title": "周期内限定模式",
                                "enum": [
                                  0,
                                  1,
                                  2
                                ],
                                "description": "0 无限制  1  天粒度  2 周粒度"
                              },
                              "restrict_periods": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "restrict_start": {
                                      "type": "integer",
                                      "title": "限定开始时间",
                                      "description": "只针对restrict_mode 天粒度和周粒度生效，天粒度 从当天00：00到限制开始时间的 Unix时间秒数，周粒度从周一00：00到限定开始时间的秒数"
                                    },
                                    "restrict_end": {
                                      "type": "integer",
                                      "title": "限定结束时间",
                                      "description": "只针对restrict_mode 天粒度和周粒度生效，天粒度 从当天00：00到限制结束时间的时间秒数，周粒度从周一00：00到限定结束时间的秒数"
                                    }
                                  }
                                },
                                "title": "限定时间区间列表"
                              },
                              "day_mask": {
                                "type": "object",
                                "properties": {
                                  "repeat": {
                                    "type": "array",
                                    "items": {
                                      "type": "integer",
                                      "enum": [
                                        0,
                                        1,
                                        2,
                                        3,
                                        4,
                                        5,
                                        6
                                      ],
                                      "description": "周日为0，选中日期会被计算，否则会被排除"
                                    },
                                    "title": "星期掩码列表"
                                  }
                                },
                                "required": [
                                  "repeat"
                                ],
                                "title": "日期掩码"
                              },
                              "mask_continuous_enabled": {
                                "type": "boolean",
                                "title": "掩码连续轮转",
                                "description": "日期掩码连续轮转，按照开始时间的时分，顺延到第二天，实现跨天日期掩码增强"
                              },
                              "rotation_unit": {
                                "type": "string",
                                "title": "周期单位",
                                "enum": [
                                  "hour",
                                  "day",
                                  "week",
                                  "month"
                                ],
                                "description": "month 自然月"
                              },
                              "rotation_value": {
                                "type": "integer",
                                "title": "周期值"
                              }
                            },
                            "required": [
                              "mode",
                              "layer_start",
                              "layer_name"
                            ]
                          },
                          "title": "规则"
                        },
                        "layer_schedules": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "layer_name": {
                                "type": "string",
                                "title": "规则名称"
                              },
                              "mode": {
                                "type": "integer",
                                "title": "模式(普通/临时)"
                              },
                              "schedules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "start": {
                                      "type": "integer",
                                      "title": "开始时间"
                                    },
                                    "end": {
                                      "type": "integer",
                                      "title": "结束时间"
                                    },
                                    "hash": {
                                      "type": "string",
                                      "title": "Hash"
                                    },
                                    "group": {
                                      "type": "object",
                                      "properties": {
                                        "group_name": {
                                          "type": "string",
                                          "title": "团队名"
                                        },
                                        "members": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "role_id": {
                                                "type": "integer",
                                                "title": "角色id"
                                              },
                                              "person_ids": {
                                                "type": "array",
                                                "items": {
                                                  "type": "integer"
                                                },
                                                "title": "值班人员id"
                                              }
                                            }
                                          }
                                        }
                                      },
                                      "required": [
                                        "group_name",
                                        "members"
                                      ],
                                      "title": "值班团队"
                                    }
                                  }
                                },
                                "title": "值班表"
                              }
                            }
                          },
                          "title": "值班规则计算"
                        },
                        "final_schedule": {
                          "type": "object",
                          "properties": {
                            "layer_name": {
                              "type": "string",
                              "description": "规则名"
                            },
                            "mode": {
                              "type": "integer"
                            },
                            "schedules": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "start": {
                                    "type": "integer",
                                    "description": "开始时间"
                                  },
                                  "end": {
                                    "type": "integer",
                                    "description": "结束时间"
                                  },
                                  "hash": {
                                    "type": "string",
                                    "description": "Hash"
                                  },
                                  "group": {
                                    "type": "object",
                                    "properties": {
                                      "group_name": {
                                        "type": "string",
                                        "description": "团队名"
                                      },
                                      "members": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "role_id": {
                                              "type": "integer",
                                              "description": "角色id"
                                            },
                                            "person_ids": {
                                              "type": "array",
                                              "items": {
                                                "type": "integer"
                                              },
                                              "description": "值班人员id"
                                            }
                                          }
                                        }
                                      }
                                    },
                                    "required": [
                                      "group_name",
                                      "members"
                                    ],
                                    "description": "值班团队"
                                  }
                                }
                              }
                            }
                          },
                          "required": [
                            "layer_name",
                            "mode",
                            "schedules"
                          ],
                          "description": "最终值班"
                        },
                        "cur_oncall": {
                          "type": "object",
                          "properties": {
                            "start": {
                              "type": "integer",
                              "title": "开始时间"
                            },
                            "end": {
                              "type": "integer",
                              "title": "结束时间"
                            },
                            "group": {
                              "type": "object",
                              "properties": {
                                "group_name": {
                                  "type": "string",
                                  "title": "分组名称"
                                },
                                "members": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "role_id": {
                                        "type": "integer",
                                        "title": "角色id"
                                      },
                                      "person_ids": {
                                        "type": "array",
                                        "items": {
                                          "type": "integer"
                                        },
                                        "title": "人员id"
                                      }
                                    }
                                  },
                                  "title": "值班成员"
                                }
                              },
                              "title": "值班分组"
                            }
                          },
                          "title": "当前值班信息"
                        },
                        "next_oncall": {
                          "type": "object",
                          "properties": {
                            "start": {
                              "type": "integer",
                              "title": "开始时间"
                            },
                            "end": {
                              "type": "integer",
                              "title": "结束时间"
                            },
                            "group": {
                              "type": "object",
                              "properties": {
                                "group_name": {
                                  "type": "string",
                                  "title": "分组名称"
                                },
                                "members": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "role_id": {
                                        "type": "integer",
                                        "title": "角色id"
                                      },
                                      "person_ids": {
                                        "type": "array",
                                        "items": {
                                          "type": "integer"
                                        },
                                        "title": "成员id"
                                      }
                                    }
                                  },
                                  "title": "值班成员"
                                }
                              },
                              "title": "值班分组"
                            }
                          },
                          "title": "下一班信息"
                        }
                      },
                      "required": [
                        "layers",
                        "layer_schedules",
                        "final_schedule"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "错误码。枚举值：InvalidParameter、Unauthorized、AccessDenied、ResourceNotFound、InternalError 等。"
                        },
                        "message": {
                          "type": "string",
                          "description": "错误描述。"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "request_id",
                    "data"
                  ]
                },
                "example": {
                  "request_id": "0a63016e66ab47532d066bea90a892b0",
                  "data": {
                    "cur_oncall": {
                      "start": 1722500940,
                      "end": 1722787200,
                      "group": {
                        "name": "A",
                        "group_name": "A",
                        "members": [
                          {
                            "role_id": 0,
                            "person_ids": [
                              2715149662131
                            ]
                          }
                        ]
                      },
                      "update_at": 1720159704,
                      "weight": 0,
                      "index": 0
                    },
                    "next_oncall": {
                      "start": 1722500940,
                      "end": 1722787200,
                      "group": {
                        "name": "A",
                        "group_name": "A",
                        "members": [
                          {
                            "role_id": 0,
                            "person_ids": [
                              2715149662131
                            ]
                          }
                        ]
                      },
                      "update_at": 1720159704,
                      "weight": 0,
                      "index": 0
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/schedule/list": {
      "post": {
        "summary": "查看值班列表",
        "deprecated": false,
        "description": "",
        "tags": [
          "值班管理"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "title": "查询匹配"
                  },
                  "p": {
                    "type": "integer",
                    "title": "页号，从1开始"
                  },
                  "limit": {
                    "type": "integer",
                    "title": "每页数量，默认10"
                  },
                  "team_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "团队列表"
                  },
                  "is_my_team": {
                    "type": "boolean",
                    "title": "是否我的团队",
                    "description": "与team_ids同时传入取交集"
                  },
                  "start": {
                    "type": "integer",
                    "title": "开始时间"
                  },
                  "end": {
                    "type": "integer",
                    "title": "结束时间"
                  }
                },
                "required": [
                  "team_ids"
                ]
              },
              "example": ""
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "schedule_id": {
                                "type": "integer"
                              },
                              "schedule_name": {
                                "type": "string"
                              },
                              "desc": {
                                "type": "string"
                              },
                              "group_id": {
                                "type": "integer"
                              },
                              "endabled": {
                                "type": "boolean"
                              },
                              "create_at": {
                                "type": "integer"
                              },
                              "create_by": {
                                "type": "integer"
                              },
                              "update_at": {
                                "type": "integer"
                              },
                              "update_by": {
                                "type": "integer"
                              }
                            }
                          }
                        },
                        "total": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "items",
                        "total"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "错误码。枚举值：InvalidParameter、Unauthorized、AccessDenied、ResourceNotFound、InternalError 等。"
                        },
                        "message": {
                          "type": "string",
                          "description": "错误描述。"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "01HFBRPCKCSAMPHYJK6SVYVECX",
                    "error"
                  ]
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/schedule/self": {
      "post": {
        "summary": "个人值班日程",
        "deprecated": false,
        "description": "",
        "tags": [
          "值班管理"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "start": {
                    "type": "integer",
                    "title": "开始时间"
                  },
                  "end": {
                    "type": "integer",
                    "title": "结束时间",
                    "description": "跟start的间隔不大于45天"
                  }
                },
                "required": [
                  "end",
                  "start"
                ]
              },
              "example": {
                "start": 11111111,
                "end": 11111111
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "schedule_id": {
                                "type": "integer"
                              },
                              "schedule_name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "team_id": {
                                "type": "integer"
                              },
                              "enabled": {
                                "type": "boolean"
                              },
                              "layers": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "layer_name": {
                                      "type": "string",
                                      "title": "规则名"
                                    },
                                    "mode": {
                                      "type": "integer",
                                      "title": "模式(普通/临时)",
                                      "enum": [
                                        0,
                                        1
                                      ],
                                      "description": "mode为1的规则放到为0的后面"
                                    },
                                    "groups": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "group_name": {
                                            "type": "string",
                                            "title": "分组名称"
                                          },
                                          "members": {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "role_id": {
                                                  "type": "integer",
                                                  "title": "角色id"
                                                },
                                                "person_ids": {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "integer"
                                                  },
                                                  "title": "人员id"
                                                }
                                              }
                                            }
                                          }
                                        }
                                      },
                                      "title": "值班分组"
                                    },
                                    "fair_rotation": {
                                      "type": "boolean",
                                      "title": "公平轮转开关"
                                    },
                                    "handoff_time": {
                                      "type": "integer",
                                      "title": "接手时间",
                                      "description": "接手时间，1周粒度的值班周期使用，从周一00:00到接手的秒数"
                                    },
                                    "layer_start": {
                                      "type": "integer",
                                      "title": "开始时间",
                                      "description": "最小粒度半小时"
                                    },
                                    "layer_end": {
                                      "type": "integer",
                                      "title": "结束时间",
                                      "description": "最小粒度半小时"
                                    },
                                    "restrict_mode": {
                                      "type": "integer",
                                      "title": "周期内限定模式",
                                      "enum": [
                                        0,
                                        1,
                                        2
                                      ],
                                      "description": "0 无限制  1  天粒度  2 周粒度"
                                    },
                                    "restrict_periods": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "restrict_start": {
                                            "type": "integer",
                                            "title": "限定开始时间",
                                            "description": "只针对restrict_mode 天粒度和周粒度生效，天粒度 从当天00：00到限制开始时间的 Unix时间秒数，周粒度从周一00：00到限定开始时间的秒数"
                                          },
                                          "restrict_end": {
                                            "type": "integer",
                                            "title": "限定结束时间",
                                            "description": "只针对restrict_mode 天粒度和周粒度生效，天粒度 从当天00：00到限制结束时间的时间秒数，周粒度从周一00：00到限定结束时间的秒数"
                                          }
                                        }
                                      },
                                      "title": "限定时间区间列表"
                                    },
                                    "day_mask": {
                                      "type": "object",
                                      "properties": {
                                        "repeat": {
                                          "type": "array",
                                          "items": {
                                            "type": "integer",
                                            "enum": [
                                              0,
                                              1,
                                              2,
                                              3,
                                              4,
                                              5,
                                              6
                                            ],
                                            "description": "周日为0，选中日期会被计算，否则会被排除"
                                          },
                                          "title": "星期掩码列表"
                                        }
                                      },
                                      "required": [
                                        "repeat"
                                      ],
                                      "title": "日期掩码"
                                    },
                                    "mask_continuous_enabled": {
                                      "type": "boolean",
                                      "title": "掩码连续轮转",
                                      "description": "日期掩码连续轮转，按照开始时间的时分，顺延到第二天，实现跨天日期掩码增强"
                                    },
                                    "rotation_unit": {
                                      "type": "string",
                                      "title": "周期单位",
                                      "enum": [
                                        "hour",
                                        "day",
                                        "week",
                                        "month"
                                      ],
                                      "description": "month 自然月"
                                    },
                                    "rotation_value": {
                                      "type": "integer",
                                      "title": "周期值"
                                    }
                                  },
                                  "required": [
                                    "mode",
                                    "layer_start",
                                    "layer_name"
                                  ]
                                },
                                "title": "规则"
                              },
                              "layer_schedules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "layer_name": {
                                      "type": "string",
                                      "title": "规则名称"
                                    },
                                    "mode": {
                                      "type": "integer",
                                      "title": "模式(普通/临时)"
                                    },
                                    "schedules": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "start": {
                                            "type": "integer",
                                            "title": "开始时间"
                                          },
                                          "end": {
                                            "type": "integer",
                                            "title": "结束时间"
                                          },
                                          "hash": {
                                            "type": "string",
                                            "title": "Hash"
                                          },
                                          "group": {
                                            "type": "object",
                                            "properties": {
                                              "group_name": {
                                                "type": "string",
                                                "title": "团队名"
                                              },
                                              "members": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "role_id": {
                                                      "type": "integer",
                                                      "title": "角色id"
                                                    },
                                                    "person_ids": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "integer"
                                                      },
                                                      "title": "值班人员id"
                                                    }
                                                  }
                                                }
                                              }
                                            },
                                            "required": [
                                              "group_name",
                                              "members"
                                            ],
                                            "title": "值班团队"
                                          }
                                        }
                                      },
                                      "title": "值班表"
                                    }
                                  }
                                },
                                "title": "值班规则计算"
                              },
                              "final_schedule": {
                                "type": "object",
                                "properties": {
                                  "layer_name": {
                                    "type": "string",
                                    "description": "规则名"
                                  },
                                  "mode": {
                                    "type": "integer"
                                  },
                                  "schedules": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "start": {
                                          "type": "integer",
                                          "description": "开始时间"
                                        },
                                        "end": {
                                          "type": "integer",
                                          "description": "结束时间"
                                        },
                                        "hash": {
                                          "type": "string",
                                          "description": "Hash"
                                        },
                                        "group": {
                                          "type": "object",
                                          "properties": {
                                            "group_name": {
                                              "type": "string",
                                              "description": "团队名"
                                            },
                                            "members": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "role_id": {
                                                    "type": "integer",
                                                    "description": "角色id"
                                                  },
                                                  "person_ids": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "integer"
                                                    },
                                                    "description": "值班人员id"
                                                  }
                                                }
                                              }
                                            }
                                          },
                                          "required": [
                                            "group_name",
                                            "members"
                                          ],
                                          "description": "值班团队"
                                        }
                                      }
                                    }
                                  }
                                },
                                "required": [
                                  "layer_name",
                                  "mode",
                                  "schedules"
                                ],
                                "description": "最终值班"
                              }
                            },
                            "required": [
                              "layers",
                              "layer_schedules",
                              "final_schedule"
                            ]
                          }
                        }
                      }
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "错误码。枚举值：InvalidParameter、Unauthorized、AccessDenied、ResourceNotFound、InternalError 等。"
                        },
                        "message": {
                          "type": "string",
                          "description": "错误描述。"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/schedule/infos": {
      "post": {
        "summary": "根据ID列表获取值班表信息",
        "deprecated": false,
        "description": "",
        "tags": [
          "值班管理"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "schedule_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "值班id列表",
                    "description": "\"schedule_ids\":[2862209469733,2721315060917]}"
                  }
                },
                "required": [
                  "schedule_ids"
                ]
              },
              "example": {
                "schedule_id": 123,
                "start": 1111111111,
                "end": 11111111111
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "错误码。枚举值：InvalidParameter、Unauthorized、AccessDenied、ResourceNotFound、InternalError 等。"
                        },
                        "message": {
                          "type": "string",
                          "description": "错误描述。"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "schedule_id": {
                                "type": "integer",
                                "title": "ID"
                              },
                              "schedule_name": {
                                "type": "string",
                                "title": "名称"
                              },
                              "team_id": {
                                "type": "integer",
                                "title": "所属团队ID"
                              },
                              "description": {
                                "type": "string",
                                "title": "备注"
                              },
                              "status": {
                                "type": "integer",
                                "title": "状态",
                                "description": "0 开启  1 关闭"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "request_id": "0a63016e664c41337a598ff893017bb0",
                  "data": {
                    "items": [
                      {
                        "id": 2721315060917,
                        "name": "test001",
                        "account_id": 2451002751131,
                        "desc": "",
                        "group_id": 2477033058131,
                        "disabled": 0,
                        "create_at": 1706182604,
                        "create_by": 2715149662131,
                        "update_at": 1714484234,
                        "update_by": 2476909022131,
                        "layers": null,
                        "schedule_layers": null,
                        "final_schedule": {
                          "name": "",
                          "mode": 0,
                          "schedules": null
                        },
                        "notify": {
                          "advance_in_time": 0,
                          "by": {
                            "follow_preference": false,
                            "personal_channels": null
                          },
                          "webhooks": null
                        },
                        "schedule_id": 2721315060917,
                        "schedule_name": "test001",
                        "team_id": 2477033058131,
                        "description": "",
                        "layer_schedules": null,
                        "status": 0,
                        "cur_oncall": null,
                        "next_oncall": null
                      },
                      {
                        "id": 2862209469733,
                        "name": "test-紫光云",
                        "account_id": 2451002751131,
                        "desc": "",
                        "group_id": 2477033058131,
                        "disabled": 0,
                        "create_at": 1708934448,
                        "create_by": 2476909022131,
                        "update_at": 1714105918,
                        "update_by": 2476909022131,
                        "layers": null,
                        "schedule_layers": null,
                        "final_schedule": {
                          "name": "",
                          "mode": 0,
                          "schedules": null
                        },
                        "notify": {
                          "advance_in_time": 0,
                          "by": {
                            "follow_preference": true,
                            "personal_channels": null
                          },
                          "webhooks": null
                        },
                        "schedule_id": 2862209469733,
                        "schedule_name": "test-紫光云",
                        "team_id": 2477033058131,
                        "description": "",
                        "layer_schedules": null,
                        "status": 0,
                        "cur_oncall": null,
                        "next_oncall": null
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/oncall/roles": {
      "get": {
        "summary": "角色信息",
        "deprecated": false,
        "description": "",
        "tags": [
          "值班管理"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "name": {
                            "type": "string"
                          },
                          "account_id": {
                            "type": "integer"
                          },
                          "create_at": {
                            "type": "integer"
                          },
                          "create_by": {
                            "type": "integer"
                          },
                          "update_at": {
                            "type": "integer"
                          },
                          "update_by": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "account_id",
                          "create_at",
                          "create_by",
                          "update_at",
                          "update_by"
                        ]
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                },
                "example": {
                  "data": [
                    {
                      "id": 0,
                      "name": "主值班人",
                      "account_id": 182138731581973,
                      "create_at": 0,
                      "create_by": 0,
                      "update_at": 0,
                      "update_by": 0
                    },
                    {
                      "id": 1,
                      "name": "备值班人",
                      "account_id": 182138731581973,
                      "create_at": 0,
                      "create_by": 0,
                      "update_at": 0,
                      "update_by": 0
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/person/infos": {
      "post": {
        "summary": "人员",
        "deprecated": false,
        "description": "",
        "tags": [
          "信息获取"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "person_ids": {
                    "description": "人员ID列表，人员可以为account或member",
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "description": "account_id 或 member_id"
                    }
                  }
                },
                "required": [
                  "person_ids"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "错误码。枚举值：InvalidParameter、Unauthorized、AccessDenied、ResourceNotFound、InternalError 等。"
                        },
                        "message": {
                          "type": "string",
                          "description": "错误描述。"
                        }
                      },
                      "description": "仅出现错误时返回",
                      "required": [
                        "code"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "person_id": {
                                "type": "integer",
                                "description": "人员ID，account_id 或 member_id"
                              },
                              "person_name": {
                                "type": "string",
                                "description": "人员名称",
                                "maxLength": 40
                              },
                              "avatar": {
                                "type": "string",
                                "description": "人员头像"
                              },
                              "as": {
                                "type": "string",
                                "enum": [
                                  "member",
                                  "account"
                                ],
                                "description": "人员身份"
                              }
                            },
                            "required": [
                              "person_id",
                              "person_name",
                              "avatar",
                              "as"
                            ]
                          },
                          "description": "人员列表"
                        }
                      },
                      "required": [
                        "items"
                      ],
                      "description": "响应数据"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/team/infos": {
      "post": {
        "summary": "团队",
        "deprecated": false,
        "description": "",
        "tags": [
          "信息获取"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "team_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "团队ID列表"
                  }
                },
                "required": [
                  "team_ids"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "错误码。枚举值：InvalidParameter、Unauthorized、AccessDenied、ResourceNotFound、InternalError 等。"
                        },
                        "message": {
                          "type": "string",
                          "description": "错误描述。"
                        }
                      },
                      "description": "仅出现错误时返回",
                      "required": [
                        "code"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "team_id": {
                                "type": "integer",
                                "description": "团队ID"
                              },
                              "team_name": {
                                "type": "string",
                                "description": "团队名称"
                              },
                              "person_ids": {
                                "type": "array",
                                "items": {
                                  "type": "integer",
                                  "description": "account_id 或 member_id"
                                },
                                "description": "成员ID列表"
                              }
                            },
                            "required": [
                              "team_id",
                              "team_name",
                              "person_ids"
                            ]
                          },
                          "description": "团队列表"
                        }
                      },
                      "required": [
                        "items"
                      ],
                      "description": "响应数据"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/infos": {
      "post": {
        "summary": "协作空间",
        "deprecated": false,
        "description": "",
        "tags": [
          "信息获取"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_ids": {
                    "title": "空间ID列表",
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "空间ID列表"
                  }
                },
                "required": [
                  "channel_ids"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "错误码。枚举值：InvalidParameter、Unauthorized、AccessDenied、ResourceNotFound、InternalError 等。"
                        },
                        "message": {
                          "type": "string",
                          "description": "错误描述。"
                        }
                      },
                      "description": "仅出现错误时返回",
                      "required": [
                        "code"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "channel_id": {
                                "type": "integer",
                                "description": "空间ID"
                              },
                              "channel_name": {
                                "type": "string",
                                "description": "空间名称",
                                "maxLength": 40
                              },
                              "status": {
                                "type": "string",
                                "description": "空间状态",
                                "enum": [
                                  "enabled",
                                  "disabled",
                                  "deleted"
                                ]
                              }
                            },
                            "required": [
                              "channel_id",
                              "channel_name",
                              "status"
                            ]
                          },
                          "description": "空间列表"
                        }
                      },
                      "required": [
                        "items"
                      ],
                      "description": "响应数据"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/list-by-ids": {
      "post": {
        "summary": "故障",
        "deprecated": false,
        "description": "",
        "tags": [
          "信息获取"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "故障ID列表"
                  }
                },
                "required": [
                  "incident_ids"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅出现错误时返回"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Incident",
                            "description": "故障详情"
                          },
                          "description": "故障详情列表"
                        }
                      },
                      "description": "响应数据"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/preference/info": {
      "post": {
        "summary": "查看偏好设置",
        "deprecated": false,
        "description": "",
        "tags": [
          "偏好设置"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "title": "错误描述",
                      "description": "不为空时代表请求出错"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Preference",
                      "title": "响应数据"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/preference/update": {
      "post": {
        "summary": "修改偏好设置",
        "deprecated": false,
        "description": "",
        "tags": [
          "偏好设置"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "trigger_notify": {
                    "$ref": "#/components/schemas/SeverityToBy",
                    "title": "故障触发通知方式"
                  },
                  "schedule_shift_notify": {
                    "type": "object",
                    "properties": {
                      "personal_channels": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "email",
                            "voice",
                            "sms",
                            "feishu_app:{data_source_id}",
                            "dingtalk_app:{data_source_id}",
                            "wecom_app:{data_source_id}"
                          ]
                        },
                        "title": "通知通道"
                      }
                    },
                    "required": [
                      "personal_channels"
                    ],
                    "title": "换班触发通知方式"
                  },
                  "status_change_notify": {
                    "type": "object",
                    "properties": {
                      "im_integrations": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "im_integrations"
                    ],
                    "title": "状态页变更通知"
                  }
                },
                "required": [
                  "trigger_notify"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  },
                  "title": "错误描述",
                  "description": "不为空时代表请求出错"
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/escalate/rule/info": {
      "post": {
        "summary": "策略详情",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间/分派策略"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "协作空间ID",
                    "type": "integer"
                  },
                  "rule_id": {
                    "type": "string",
                    "title": "策略ID"
                  }
                },
                "required": [
                  "channel_id",
                  "rule_id"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "$ref": "#/components/schemas/EscalateRule"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/escalate/webhook/robot/list": {
      "post": {
        "summary": "机器人列表",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间/分派策略"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "可以按 token 或 alias 模糊检索"
                  },
                  "type": {
                    "type": "string",
                    "description": "机器人类型",
                    "enum": [
                      "feishu",
                      "wecom",
                      "dingtalk",
                      "zoom",
                      "slack"
                    ]
                  }
                }
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "alias": {
                                    "type": "string"
                                  },
                                  "token": {
                                    "type": "string"
                                  },
                                  "verify_token": {
                                    "type": "string"
                                  },
                                  "disable_at": {
                                    "type": "boolean"
                                  },
                                  "reply_event_types": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  }
                                },
                                "required": [
                                  "alias",
                                  "token"
                                ]
                              },
                              "referenced_by": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "channel_id": {
                                      "type": "integer"
                                    },
                                    "escalate_rule_id": {
                                      "type": "string"
                                    },
                                    "channel_name": {
                                      "type": "string"
                                    },
                                    "escalate_rule_name": {
                                      "type": "string"
                                    }
                                  }
                                }
                              }
                            },
                            "required": [
                              "type",
                              "settings",
                              "referenced_by"
                            ]
                          }
                        }
                      },
                      "required": [
                        "list"
                      ]
                    }
                  },
                  "required": [
                    "request_id",
                    "data"
                  ]
                },
                "example": {
                  "request_id": "95c5e15c19bb09e2466d719381f03f1b",
                  "data": {
                    "list": [
                      {
                        "type": "feishu",
                        "settings": {
                          "alias": "test",
                          "token": "https://open.feishu.cn/open-apis/bot/hook/5fbc33aa-ffce-462d-8ce0-c5a49899de23"
                        }
                      },
                      {
                        "type": "feishu",
                        "settings": {
                          "token": "https://open.feishu.cn/open-apis/bot/v2/hook/5fbc33aa-ffce-462d-8ce0-c5a49899de23"
                        }
                      },
                      {
                        "type": "zoom",
                        "settings": {
                          "token": "https://integrations.zoom.us/chat/webhooks/incomingwebhook/EsGEVfs0SOK1xwrLvwoREw",
                          "verify_token": "il9v290ORSanFhidfOXZlQ"
                        }
                      },
                      {
                        "type": "dingtalk",
                        "settings": {
                          "disable_at": false,
                          "token": "https://oapi.dingtalk.com/robot/send?access_token=0b5159646cf666653b315a17d1a0273871c21c6c27ef9d8e0e31d8fc776a2d31"
                        }
                      },
                      {
                        "type": "feishu",
                        "settings": {
                          "alias": "test",
                          "token": "https://open.feishu.cn/open-apis/bot/v2/hook/5fbc33aa-ffce-462d-8ce0-c5a49899de23"
                        }
                      },
                      {
                        "type": "wecom",
                        "settings": {
                          "alias": "test",
                          "disable_at": false,
                          "token": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=948af796-72dd-4d0b-9e7b-7e648980cbdb"
                        }
                      },
                      {
                        "type": "feishu",
                        "settings": {
                          "token": "https://open.larksuite.com/open-apis/bot/v2/hook/a9d72917-4f55-4cb4-8830-59dbfaf18150"
                        }
                      },
                      {
                        "type": "wecom",
                        "settings": {
                          "reply_event_types": [],
                          "token": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=948af796-72dd-4d0b-9e7b-7e648980cbdb"
                        }
                      },
                      {
                        "type": "feishu",
                        "settings": {
                          "reply_event_types": [
                            "i_new"
                          ],
                          "token": "97b67d24-51c9-4dd9-9ddf-7df5728a60cf"
                        }
                      },
                      {
                        "type": "wecom",
                        "settings": {
                          "alias": "娃哈哈",
                          "token": "bbb025a0-e2e8-4b79-939d-82c91a275b96"
                        }
                      },
                      {
                        "type": "dingtalk",
                        "settings": {
                          "token": "b9a1b24b987fb00fcf3cef61815516aca333f128dbf7a91b70a9315e2ce2d255"
                        }
                      },
                      {
                        "type": "dingtalk",
                        "settings": {
                          "alias": "娃哈哈",
                          "disable_at": true,
                          "reply_event_types": [
                            "i_new",
                            "i_snooze"
                          ],
                          "token": "https://oapi.dingtalk.com/robot/send?access_token=afefdc81c4f0753977dc5174090d75ca1b28d76e58d89fc31b3eff776f1d7911"
                        }
                      },
                      {
                        "type": "wecom",
                        "settings": {
                          "alias": "wahaha",
                          "disable_at": true,
                          "reply_event_types": [
                            "i_new",
                            "i_snooze"
                          ],
                          "token": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=90dbb66b-af39-4235-956c-636a9c1ed9c0"
                        }
                      },
                      {
                        "type": "dingtalk",
                        "settings": {
                          "alias": "test",
                          "token": "https://oapi.dingtalk.com/robot/send?access_token=dd0a9054dd32ce0c39b0e41c734dbaa365a4f745e78ea0c120095a33cf1bc2a2"
                        }
                      },
                      {
                        "type": "wecom",
                        "settings": {
                          "alias": "夜莺机器人",
                          "token": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=7854e5aa-2091-4e92-a3b9-9d821051f66e"
                        }
                      },
                      {
                        "type": "wecom",
                        "settings": {
                          "alias": "1",
                          "token": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=bbb025a0-e2e8-4b79-939d-82c91a275b96"
                        }
                      }
                    ]
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/escalate/rule/enable": {
      "post": {
        "summary": "策略启用",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间/分派策略"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "channel ID",
                    "type": "integer"
                  },
                  "rule_id": {
                    "type": "string",
                    "title": "rule ID"
                  }
                },
                "required": [
                  "channel_id",
                  "rule_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/escalate/rule/disable": {
      "post": {
        "summary": "策略禁用",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间/分派策略"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "channel ID",
                    "type": "integer"
                  },
                  "rule_id": {
                    "type": "string",
                    "title": "rule ID"
                  }
                },
                "required": [
                  "channel_id",
                  "rule_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/escalate/rule/delete": {
      "post": {
        "summary": "策略删除",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间/分派策略"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "channel ID",
                    "type": "integer"
                  },
                  "rule_id": {
                    "type": "string",
                    "title": "rule ID"
                  }
                },
                "required": [
                  "channel_id",
                  "rule_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/escalate/rule/list": {
      "post": {
        "summary": "策略列表",
        "deprecated": false,
        "description": "filters 说明见创建接口",
        "tags": [
          "协作空间/分派策略"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "channel ID",
                    "type": "integer"
                  }
                },
                "required": [
                  "channel_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/EscalateRule"
                          }
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/escalate/rule/create": {
      "post": {
        "summary": "策略创建",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间/分派策略"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "所属channel",
                    "type": "integer"
                  },
                  "rule_name": {
                    "type": "string",
                    "title": "策略名称"
                  },
                  "template_id": {
                    "type": "string",
                    "title": "模板id",
                    "description": "默认为系统预置模板"
                  },
                  "description": {
                    "type": "string",
                    "title": "策略描述"
                  },
                  "layers": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/EscalateLayer"
                    },
                    "title": "分派环节"
                  },
                  "aggr_window": {
                    "title": "聚合窗口，单位秒，取值范围[0,3600]",
                    "type": "integer"
                  },
                  "time_filters": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/TimeFilter"
                    },
                    "title": "时间条件"
                  },
                  "filters": {
                    "type": "array",
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Filter"
                      }
                    },
                    "title": "匹配条件"
                  }
                },
                "required": [
                  "template_id",
                  "channel_id",
                  "rule_name",
                  "layers",
                  "aggr_window"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "rule_id": {
                          "type": "string",
                          "title": "ID"
                        },
                        "rule_name": {
                          "type": "string",
                          "title": "名称"
                        }
                      },
                      "required": [
                        "rule_id",
                        "rule_name"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/escalate/rule/update": {
      "post": {
        "summary": "策略更新",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间/分派策略"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "所属channel",
                    "type": "integer"
                  },
                  "rule_id": {
                    "type": "string",
                    "title": "策略id",
                    "description": "更新时必传"
                  },
                  "rule_name": {
                    "type": "string",
                    "title": "策略名称"
                  },
                  "template_id": {
                    "type": "string",
                    "title": "模板id",
                    "description": "默认为系统预置模板"
                  },
                  "description": {
                    "type": "string",
                    "title": "策略描述"
                  },
                  "layers": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/EscalateLayer"
                    },
                    "title": "通知环节"
                  },
                  "aggr_window": {
                    "title": "聚合窗口，单位秒，取值范围[0,3600]",
                    "type": "integer"
                  },
                  "time_filters": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/TimeFilter"
                    },
                    "title": "时间过滤条件"
                  },
                  "filters": {
                    "type": "array",
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Filter"
                      }
                    },
                    "title": "匹配条件"
                  }
                },
                "required": [
                  "channel_id",
                  "template_id",
                  "description",
                  "time_filters",
                  "filters",
                  "rule_id",
                  "layers",
                  "rule_name",
                  "aggr_window"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/unsubscribe/rule/enable": {
      "post": {
        "summary": "策略启用",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间/排除规则"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "channel ID",
                    "type": "integer"
                  },
                  "rule_id": {
                    "type": "string",
                    "title": "rule ID"
                  }
                },
                "required": [
                  "channel_id",
                  "rule_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/unsubscribe/rule/disable": {
      "post": {
        "summary": "策略禁用",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间/排除规则"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "channel ID",
                    "type": "integer"
                  },
                  "rule_id": {
                    "type": "string",
                    "title": "rule ID"
                  }
                },
                "required": [
                  "channel_id",
                  "rule_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/unsubscribe/rule/delete": {
      "post": {
        "summary": "策略删除",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间/排除规则"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "channel ID",
                    "type": "integer"
                  },
                  "rule_id": {
                    "type": "string",
                    "title": "rule ID"
                  }
                },
                "required": [
                  "channel_id",
                  "rule_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/unsubscribe/rule/list": {
      "post": {
        "summary": "策略列表",
        "deprecated": false,
        "description": "filters 说明见创建接口",
        "tags": [
          "协作空间/排除规则"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "type": "integer",
                    "title": "channel ID"
                  }
                },
                "required": [
                  "channel_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/UnsubscribeRule"
                          }
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/unsubscribe/rule/create": {
      "post": {
        "summary": "策略创建",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间/排除规则"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "所属channel",
                    "type": "integer"
                  },
                  "rule_name": {
                    "type": "string",
                    "title": "策略名称"
                  },
                  "description": {
                    "type": "string",
                    "title": "策略描述"
                  },
                  "filters": {
                    "type": "array",
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Filter"
                      }
                    },
                    "title": "匹配条件"
                  }
                },
                "required": [
                  "channel_id",
                  "description",
                  "filters",
                  "rule_name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "rule_id": {
                          "type": "string",
                          "title": "ID"
                        },
                        "rule_name": {
                          "type": "string",
                          "title": "名称"
                        }
                      },
                      "required": [
                        "rule_id",
                        "rule_name"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/unsubscribe/rule/update": {
      "post": {
        "summary": "策略更新",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间/排除规则"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "所属channel",
                    "type": "integer"
                  },
                  "rule_id": {
                    "type": "string",
                    "title": "策略id",
                    "description": "更新时必传"
                  },
                  "rule_name": {
                    "type": "string",
                    "title": "策略名称"
                  },
                  "description": {
                    "type": "string",
                    "title": "策略描述"
                  },
                  "filters": {
                    "type": "array",
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Filter"
                      }
                    },
                    "title": "匹配条件"
                  }
                },
                "required": [
                  "channel_id",
                  "description",
                  "filters",
                  "rule_id",
                  "rule_name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "rule_id": {
                          "type": "string",
                          "title": "ID"
                        },
                        "rule_name": {
                          "type": "string",
                          "title": "名称"
                        }
                      },
                      "required": [
                        "rule_id",
                        "rule_name"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/silence/rule/enable": {
      "post": {
        "summary": "策略启用",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间/静默策略"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "channel ID",
                    "type": "integer"
                  },
                  "rule_id": {
                    "type": "string",
                    "title": "rule ID"
                  }
                },
                "required": [
                  "channel_id",
                  "rule_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/silence/rule/disable": {
      "post": {
        "summary": "策略禁用",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间/静默策略"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "channel ID",
                    "type": "integer"
                  },
                  "rule_id": {
                    "type": "string",
                    "title": "rule ID"
                  }
                },
                "required": [
                  "channel_id",
                  "rule_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/silence/rule/delete": {
      "post": {
        "summary": "策略删除",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间/静默策略"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "channel ID",
                    "type": "integer"
                  },
                  "rule_id": {
                    "type": "string",
                    "title": "rule ID"
                  }
                },
                "required": [
                  "channel_id",
                  "rule_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/silence/rule/list": {
      "post": {
        "summary": "策略列表",
        "deprecated": false,
        "description": "filters 说明见创建接口",
        "tags": [
          "协作空间/静默策略"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "type": "integer",
                    "title": "channel ID"
                  }
                },
                "required": [
                  "channel_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/SilenceRule"
                          }
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/silence/rule/create": {
      "post": {
        "summary": "策略创建",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间/静默策略"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "所属channel",
                    "type": "integer"
                  },
                  "rule_name": {
                    "type": "string",
                    "title": "策略名称"
                  },
                  "description": {
                    "type": "string",
                    "title": "策略描述"
                  },
                  "filters": {
                    "title": "匹配条件",
                    "$ref": "#/components/schemas/OrFilters"
                  },
                  "time_filter": {
                    "type": "object",
                    "properties": {
                      "start_time": {
                        "type": "integer",
                        "title": "",
                        "description": "开始时间戳"
                      },
                      "end_time": {
                        "type": "integer",
                        "title": "",
                        "description": "结束时间戳"
                      }
                    },
                    "required": [
                      "start_time",
                      "end_time"
                    ],
                    "title": "单次",
                    "description": "和time_filters只传一个"
                  },
                  "time_filters": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/TimeFilter"
                    },
                    "description": "和time_filter只传一个",
                    "title": "重复"
                  },
                  "is_directly_discard": {
                    "type": "boolean",
                    "title": "匹配告警是否直接丢弃"
                  },
                  "from_incident_id": {
                    "type": "string",
                    "title": "快速静默关联的故障ID",
                    "description": "快速静默时，只允许单次静默，且到期后系统自动删除规则"
                  }
                },
                "required": [
                  "channel_id",
                  "description",
                  "filters",
                  "rule_name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "rule_id": {
                          "type": "string",
                          "title": "ID"
                        },
                        "rule_name": {
                          "type": "string",
                          "title": "名称"
                        }
                      },
                      "required": [
                        "rule_id",
                        "rule_name"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/silence/rule/update": {
      "post": {
        "summary": "策略更新",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间/静默策略"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "所属channel",
                    "type": "integer"
                  },
                  "rule_id": {
                    "type": "string",
                    "title": "rule ID"
                  },
                  "rule_name": {
                    "type": "string",
                    "title": "策略名称"
                  },
                  "description": {
                    "type": "string",
                    "title": "策略描述"
                  },
                  "filters": {
                    "title": "匹配条件",
                    "$ref": "#/components/schemas/OrFilters"
                  },
                  "time_filter": {
                    "type": "object",
                    "properties": {
                      "start_time": {
                        "type": "integer",
                        "title": "",
                        "description": "开始时间戳"
                      },
                      "end_time": {
                        "type": "integer",
                        "title": "",
                        "description": "结束时间戳"
                      }
                    },
                    "required": [
                      "start_time",
                      "end_time"
                    ],
                    "title": "单次",
                    "description": "和time_filters只传一个"
                  },
                  "time_filters": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "title": "开始时间，小于end",
                          "type": "string",
                          "description": "精度到分钟，如10:00"
                        },
                        "end": {
                          "title": "结束时间",
                          "type": "string",
                          "description": "精度到分钟，如23:59"
                        },
                        "repeat": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "description": "0=周日，1，2，3，4，5，6",
                            "enum": [
                              0,
                              1,
                              2,
                              3,
                              4,
                              5,
                              6
                            ]
                          },
                          "title": "星期模式，星期列表",
                          "description": "与日历模式相关参数互斥，只能有一个"
                        },
                        "cal_id": {
                          "type": "string",
                          "title": "日历模式，日历ID",
                          "description": "与星期模式相关参数互斥，只能有一个"
                        },
                        "is_off": {
                          "type": "boolean",
                          "title": "日历模式，是否为休息日",
                          "description": "true为休息日"
                        }
                      },
                      "required": [
                        "01J9R861KH46GG92QNFGCWF7DC",
                        "start",
                        "end"
                      ]
                    },
                    "description": "和time_filter只传一个",
                    "title": "重复"
                  },
                  "is_directly_discard": {
                    "type": "boolean",
                    "title": "匹配告警是否直接丢弃"
                  }
                },
                "required": [
                  "channel_id",
                  "filters",
                  "rule_id",
                  "rule_name",
                  "description"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "rule_id": {
                          "type": "string",
                          "title": "ID"
                        },
                        "rule_name": {
                          "type": "string",
                          "title": "名称"
                        }
                      },
                      "required": [
                        "rule_id",
                        "rule_name"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/inhibit/rule/enable": {
      "post": {
        "summary": "策略启用",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间/抑制策略"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "channel ID",
                    "type": "integer"
                  },
                  "rule_id": {
                    "type": "string",
                    "title": "rule ID"
                  }
                },
                "required": [
                  "channel_id",
                  "rule_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/inhibit/rule/disable": {
      "post": {
        "summary": "策略禁用",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间/抑制策略"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "channel ID",
                    "type": "integer"
                  },
                  "rule_id": {
                    "type": "string",
                    "title": "rule ID"
                  }
                },
                "required": [
                  "channel_id",
                  "rule_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/inhibit/rule/delete": {
      "post": {
        "summary": "策略删除",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间/抑制策略"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "channel ID",
                    "type": "integer"
                  },
                  "rule_id": {
                    "type": "string",
                    "title": "rule ID"
                  }
                },
                "required": [
                  "channel_id",
                  "rule_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/inhibit/rule/list": {
      "post": {
        "summary": "策略列表",
        "deprecated": false,
        "description": "filters 说明见创建接口",
        "tags": [
          "协作空间/抑制策略"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "type": "integer",
                    "title": "channel ID"
                  }
                },
                "required": [
                  "channel_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/InhibitRule"
                          }
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/inhibit/rule/create": {
      "post": {
        "summary": "策略创建",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间/抑制策略"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "所属channel",
                    "type": "integer"
                  },
                  "rule_name": {
                    "type": "string",
                    "title": "策略名称"
                  },
                  "description": {
                    "type": "string",
                    "title": "策略描述"
                  },
                  "priority": {
                    "type": "integer",
                    "title": "优先级"
                  },
                  "source_filters": {
                    "title": "源事件匹配条件",
                    "$ref": "#/components/schemas/OrFilters"
                  },
                  "target_filters": {
                    "title": "被抑制事件匹配条件",
                    "$ref": "#/components/schemas/OrFilters"
                  },
                  "equals": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "相同项",
                    "description": "以labels.开头的是label项，否则是属性项"
                  },
                  "is_directly_discard": {
                    "type": "boolean",
                    "title": "匹配告警是否直接丢弃"
                  }
                },
                "required": [
                  "channel_id",
                  "description",
                  "source_filters",
                  "target_filters",
                  "equals",
                  "rule_name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "rule_id": {
                          "type": "string",
                          "title": "ID"
                        },
                        "rule_name": {
                          "type": "string",
                          "title": "名称"
                        }
                      },
                      "required": [
                        "rule_id",
                        "rule_name"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/inhibit/rule/update": {
      "post": {
        "summary": "策略更新",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间/抑制策略"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "所属channel",
                    "type": "integer"
                  },
                  "rule_id": {
                    "type": "string",
                    "title": "策略id",
                    "description": "更新时必传"
                  },
                  "rule_name": {
                    "type": "string",
                    "title": "策略名称",
                    "description": "默认就是策略1，策略2"
                  },
                  "description": {
                    "type": "string",
                    "title": "策略描述"
                  },
                  "source_filters": {
                    "title": "源事件匹配条件",
                    "$ref": "#/components/schemas/OrFilters"
                  },
                  "target_filters": {
                    "title": "被抑制事件匹配条件",
                    "$ref": "#/components/schemas/OrFilters"
                  },
                  "equals": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "labels.{x}",
                        "status",
                        "severity",
                        "title"
                      ]
                    },
                    "title": "相同项",
                    "description": "以labels.开头的是label项，否则是属性项"
                  },
                  "is_directly_discard": {
                    "type": "boolean",
                    "title": "匹配告警是否直接丢弃"
                  }
                },
                "required": [
                  "channel_id",
                  "description",
                  "source_filters",
                  "target_filters",
                  "equals",
                  "rule_id",
                  "rule_name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "rule_id": {
                          "type": "string",
                          "title": "ID"
                        },
                        "rule_name": {
                          "type": "string",
                          "title": "名称"
                        }
                      },
                      "required": [
                        "rule_id",
                        "rule_name"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/list": {
      "post": {
        "summary": "空间列表",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "p": {
                    "type": "integer",
                    "description": "页码，从1开始"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "分页条数"
                  },
                  "asc": {
                    "type": "boolean",
                    "description": "是否升序"
                  },
                  "orderby": {
                    "type": "string",
                    "description": "排序依据",
                    "enum": [
                      "created_at",
                      "ranking",
                      "updated_at",
                      "channel_name",
                      "last_incident_at"
                    ]
                  },
                  "query": {
                    "type": "string",
                    "description": "查询关键词，检索范围：空间名称和描述"
                  },
                  "channel_name": {
                    "type": "string",
                    "description": "协作空间名称，精确匹配，跟query 互斥"
                  },
                  "team_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "团队ID列表，筛选此团队管理的协作空间"
                  },
                  "is_my_team": {
                    "type": "boolean",
                    "description": "我团队的，筛选我所在团队下属的空间，与team_ids同时传入取交集"
                  },
                  "is_my_starred": {
                    "type": "boolean",
                    "description": "我收藏的，筛选我个人收藏的空间"
                  },
                  "is_brief": {
                    "type": "boolean",
                    "description": "仅返回名称和ID信息，运行更快。指定此参数时，系统将忽略p和limit参数，返回所有空间的信息"
                  }
                }
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "description": "仅出现错误时返回"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Channel"
                          },
                          "description": "协作空间列表"
                        },
                        "has_next_page": {
                          "type": "boolean",
                          "description": "是否有下一页"
                        },
                        "total": {
                          "type": "integer",
                          "description": "总条目数"
                        }
                      },
                      "required": [
                        "items",
                        "has_next_page",
                        "total"
                      ],
                      "description": "响应数据"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/info": {
      "post": {
        "summary": "空间详情",
        "deprecated": false,
        "description": "filters 说明见创建接口",
        "tags": [
          "协作空间"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "channel id",
                    "type": "integer"
                  }
                },
                "required": [
                  "channel_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Channel"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/create": {
      "post": {
        "summary": "空间创建",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_name": {
                    "type": "string",
                    "title": "名称"
                  },
                  "description": {
                    "type": "string",
                    "title": "描述"
                  },
                  "team_id": {
                    "title": "负责团队ID",
                    "type": "integer",
                    "description": "归属团队ID。团队内成员对协作空间有编辑权限和读取权限"
                  },
                  "managing_team_ids": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "integer"
                    },
                    "title": "代管团队IDs",
                    "description": "代管团队IDs。当设置此项，代管团队将接管归属团队对协作空间的编辑权限，但二者都具备读取权限。",
                    "maxItems": 3
                  },
                  "escalate_rule": {
                    "type": "object",
                    "properties": {
                      "aggr_window": {
                        "type": "integer",
                        "title": "聚合窗口，单位秒，范围[0,720]"
                      },
                      "template_id": {
                        "type": "string",
                        "title": "模板ID"
                      },
                      "target": {
                        "$ref": "#/components/schemas/EscalateTarget",
                        "title": "通知对象"
                      }
                    },
                    "title": "默认分派策略",
                    "required": [
                      "template_id",
                      "target"
                    ]
                  },
                  "plugin_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "告警事件集成类型ID列表"
                  },
                  "auto_resolve_timeout": {
                    "type": "integer",
                    "title": "超时自动恢复时间，单位秒",
                    "description": "不传不自动恢复",
                    "maximum": 86400,
                    "minimum": 0
                  },
                  "auto_resolve_mode": {
                    "type": "string",
                    "enum": [
                      "trigger",
                      "update"
                    ],
                    "title": "超时自动恢复模式"
                  },
                  "is_private": {
                    "type": "boolean",
                    "title": "是否私有访问",
                    "description": "不传默认公开"
                  },
                  "group": {
                    "$ref": "#/components/schemas/Group",
                    "title": "告警聚合配置",
                    "description": "不传不聚合"
                  },
                  "flapping": {
                    "$ref": "#/components/schemas/Flapping",
                    "title": "故障收敛配置",
                    "description": "不传按默认值处理"
                  },
                  "disable_outlier_detection": {
                    "type": "boolean",
                    "title": "是否关闭新奇告警",
                    "description": "默认开启新奇告警检测，但仅在pro订阅生效"
                  }
                },
                "required": [
                  "channel_name",
                  "team_id"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "channel_id": {
                          "type": "string",
                          "title": "ID"
                        },
                        "channel_name": {
                          "type": "string",
                          "title": "名称"
                        }
                      },
                      "required": [
                        "channel_id",
                        "channel_name"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/update": {
      "post": {
        "summary": "空间更新",
        "deprecated": false,
        "description": "filters 说明见创建接口",
        "tags": [
          "协作空间"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "协作空间ID",
                    "type": "integer"
                  },
                  "channel_name": {
                    "type": "string",
                    "title": "协作空间名称",
                    "description": "不传不更新"
                  },
                  "description": {
                    "type": "string",
                    "title": "协作空间描述",
                    "description": "不传不更新"
                  },
                  "team_id": {
                    "title": "归属团队ID",
                    "type": "integer",
                    "description": "不传不更新"
                  },
                  "managing_team_ids": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "integer"
                    },
                    "title": "代管团队IDs",
                    "description": "不传不更新",
                    "maxItems": 3
                  },
                  "auto_resolve_timeout": {
                    "type": "integer",
                    "title": "自动恢复时长，单位秒",
                    "description": "不传不更新",
                    "maximum": 86400,
                    "minimum": 0
                  },
                  "auto_resolve_mode": {
                    "type": "string",
                    "enum": [
                      "trigger",
                      "update"
                    ],
                    "title": "自动恢复模式",
                    "description": "不传不更新"
                  },
                  "is_private": {
                    "type": "boolean",
                    "title": "是否私有访问",
                    "description": "不传不更新"
                  },
                  "group": {
                    "title": "告警聚合配置",
                    "description": "不传不更新",
                    "$ref": "#/components/schemas/Group"
                  },
                  "flapping": {
                    "$ref": "#/components/schemas/Flapping",
                    "title": "flapping收敛配置",
                    "description": "不传不更新"
                  },
                  "disable_outlier_detection": {
                    "type": "boolean",
                    "title": "是否关闭新奇告警检测",
                    "description": "默认开启新奇告警检测，但仅在pro订阅生效"
                  }
                },
                "required": [
                  "channel_id"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/enable": {
      "post": {
        "summary": "空间启用",
        "deprecated": false,
        "description": "filters 说明见创建接口",
        "tags": [
          "协作空间"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "channel ID",
                    "type": "integer"
                  }
                },
                "required": [
                  "channel_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/disable": {
      "post": {
        "summary": "空间禁用",
        "deprecated": false,
        "description": "filters 说明见创建接口",
        "tags": [
          "协作空间"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "channel id",
                    "type": "integer"
                  }
                },
                "required": [
                  "channel_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/delete": {
      "post": {
        "summary": "空间删除",
        "deprecated": false,
        "description": "filters 说明见创建接口",
        "tags": [
          "协作空间"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "title": "channel id",
                    "type": "integer"
                  }
                },
                "required": [
                  "channel_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "refs": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Reference"
                          },
                          "title": "关联资源列表"
                        }
                      },
                      "required": [
                        "refs"
                      ],
                      "description": "仅code=ReferenceExist时存在"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/reorder": {
      "post": {
        "summary": "空间排序",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "drag_channel_id": {
                    "type": "integer",
                    "description": "拖拽空间ID"
                  },
                  "target_channel_id": {
                    "type": "integer",
                    "description": "被挤占的空间ID"
                  }
                },
                "required": [
                  "drag_channel_id",
                  "target_channel_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/star": {
      "post": {
        "summary": "空间收藏",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "type": "integer",
                    "description": "收藏空间ID"
                  }
                },
                "required": [
                  "channel_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/unstar": {
      "post": {
        "summary": "取消收藏",
        "deprecated": false,
        "description": "",
        "tags": [
          "协作空间"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "type": "integer",
                    "description": "收藏空间ID"
                  }
                },
                "required": [
                  "channel_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/channel/list-by-integration": {
      "post": {
        "summary": "按集成查询空间名称",
        "deprecated": false,
        "description": "- 该api<span style=\"color: red;\">仅支持通过共享集成的integration_key进行认证</span>。integration_key可以从集成详情获取，来自协作空间下的专属集成integration_key无法调用此api。\n- 该api使用场景为监控工具通过集成key直接获取空间列表，在配置告警规则时筛选和指定空间，配置告警的目的推送空间，而无需在Flashduty配置路由规则，以此简化告警通知配置。\n- 该api默认返回所有协作空间的名称，包括设置为私有的协作空间，<span style=\"color: red;\">请谨慎保存integration_key，防止泄露</span>。如果传入成员信息，将优先返回成员可见信息。",
        "tags": [
          "协作空间"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "查询关键词。检索范围：空间名称和描述"
                  },
                  "channel_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "空间ID列表，当传入此值，将根据ID查询空间"
                  },
                  "member_id": {
                    "type": "integer",
                    "description": "成员ID，当传入此值，且可以匹配到有效用户，系统将返回改成员可见的空间"
                  },
                  "member_name": {
                    "type": "string",
                    "description": "成员名称，当传入此值，且可以匹配到有效用户，系统将返回改成员可见的空间"
                  },
                  "email": {
                    "type": "string",
                    "description": "成员邮箱，需要满足邮箱格式。当传入此值，且可以匹配到有效用户，系统将返回改成员可见的空间"
                  },
                  "phone": {
                    "type": "string",
                    "description": "成员手机号，需要配合country_code解析。当传入此值，且可以匹配到有效用户，系统将返回改成员可见的空间"
                  },
                  "country_code": {
                    "type": "string",
                    "description": "成员国家码，配合成员手机号使用"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "channel_id": {
                                "type": "integer",
                                "description": "空间ID"
                              },
                              "channel_name": {
                                "type": "string",
                                "description": "空间名称"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "enabled",
                                  "disabled",
                                  "deleted"
                                ],
                                "description": "空间状态"
                              }
                            },
                            "required": [
                              "status",
                              "channel_name",
                              "channel_id"
                            ]
                          },
                          "description": "空间列表"
                        },
                        "total": {
                          "type": "integer",
                          "description": "总条目数"
                        }
                      },
                      "required": [
                        "items",
                        "total"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-integration_key": []
          }
        ]
      }
    },
    "/template/list": {
      "post": {
        "summary": "模板列表",
        "deprecated": false,
        "description": "filters 说明见创建接口",
        "tags": [
          "模板管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "p": {
                    "type": "integer",
                    "description": "页码，从1开始"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "分页条数"
                  },
                  "asc": {
                    "type": "boolean",
                    "description": "是否升序"
                  },
                  "query": {
                    "type": "string",
                    "title": "查询关键词",
                    "description": "检索范围：channel_name"
                  },
                  "team_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "团队ID列表",
                    "description": "筛选团队下的模板"
                  },
                  "is_my_team": {
                    "type": "boolean",
                    "title": "我团队的",
                    "description": "筛选我所在团队下属的模板，与team_ids同时传入取交集"
                  }
                }
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "has_next_page": {
                          "type": "boolean",
                          "description": "是否有下一页"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Template"
                          }
                        }
                      },
                      "required": [
                        "items",
                        "has_next_page"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/template/info": {
      "post": {
        "summary": "模板详情",
        "deprecated": false,
        "description": "filters 说明见创建接口",
        "tags": [
          "模板管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "template_id": {
                    "type": "string",
                    "title": "channel id"
                  }
                },
                "required": [
                  "template_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {}
                    },
                    "data": {
                      "$ref": "#/components/schemas/Template"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/template/delete": {
      "post": {
        "summary": "模板删除",
        "deprecated": false,
        "description": "filters 说明见创建接口",
        "tags": [
          "模板管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "template_id": {
                    "type": "string",
                    "title": "channel id"
                  }
                },
                "required": [
                  "template_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "refs": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Reference"
                          },
                          "title": "关联资源列表"
                        }
                      },
                      "required": [
                        "refs"
                      ],
                      "description": "仅code=ReferenceExist时存在"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/template/preview": {
      "post": {
        "summary": "模板预览",
        "deprecated": false,
        "description": "",
        "tags": [
          "模板管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "description": "预览前内容"
                  },
                  "type": {
                    "type": "string",
                    "description": "渠道类型",
                    "enum": [
                      "dingtalk_app",
                      "feishu_app",
                      "wecom_app",
                      "slack_app",
                      "teams_app",
                      "feishu",
                      "dingtalk",
                      "wecom",
                      "telegram",
                      "zoom",
                      "email",
                      "sms"
                    ]
                  },
                  "incident_id": {
                    "type": "string",
                    "description": "预览故障ID，如果不传入将使用系统mock数据进行预览"
                  }
                },
                "required": [
                  "content",
                  "type"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {}
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "content": {
                          "type": "string",
                          "title": "渲染后内容"
                        },
                        "success": {
                          "type": "boolean",
                          "title": "内容是否正确"
                        },
                        "message": {
                          "type": "string",
                          "title": "如果失败，此处返回失败描述",
                          "description": "仅当success=false时返回"
                        }
                      },
                      "required": [
                        "content",
                        "success",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/template/create": {
      "post": {
        "summary": "模板创建",
        "deprecated": false,
        "description": "filters 说明见创建接口",
        "tags": [
          "模板管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "team_id": {
                    "title": "团队ID",
                    "type": "integer"
                  },
                  "template_name": {
                    "type": "string",
                    "title": "名称"
                  },
                  "description": {
                    "type": "string",
                    "title": "描述"
                  },
                  "email": {
                    "type": "string",
                    "title": "邮件"
                  },
                  "sms": {
                    "type": "string",
                    "title": "短信"
                  },
                  "dingtalk": {
                    "type": "string",
                    "title": "钉钉机器人"
                  },
                  "wecom": {
                    "type": "string",
                    "title": "企微机器人"
                  },
                  "feishu": {
                    "type": "string",
                    "title": "飞书机器人"
                  },
                  "feishu_app": {
                    "type": "string",
                    "title": "飞书应用"
                  },
                  "dingtalk_app": {
                    "type": "string",
                    "title": "钉钉应用"
                  },
                  "wecom_app": {
                    "type": "string",
                    "title": "企微应用"
                  },
                  "teams_app": {
                    "type": "string",
                    "title": "Teams应用"
                  },
                  "slack_app": {
                    "type": "string",
                    "title": "Slack应用"
                  },
                  "zoom": {
                    "type": "string",
                    "title": "zoom机器人"
                  },
                  "telegram": {
                    "type": "string",
                    "title": "telegram机器人"
                  }
                },
                "required": [
                  "template_name",
                  "email",
                  "dingtalk",
                  "feishu_app",
                  "feishu",
                  "wecom",
                  "dingtalk_app",
                  "wecom_app",
                  "sms",
                  "telegram",
                  "zoom",
                  "slack_app",
                  "teams_app"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {}
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "template_id": {
                          "type": "string",
                          "title": "ID"
                        },
                        "template_name": {
                          "type": "string",
                          "title": "名称"
                        }
                      },
                      "required": [
                        "template_id",
                        "template_name"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/template/update": {
      "post": {
        "summary": "模板更新",
        "deprecated": false,
        "description": "filters 说明见创建接口",
        "tags": [
          "模板管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "template_id": {
                    "type": "string",
                    "title": "模板ID"
                  },
                  "team_id": {
                    "title": "团队ID",
                    "type": "integer"
                  },
                  "template_name": {
                    "type": "string",
                    "title": "名称"
                  },
                  "description": {
                    "type": "string",
                    "title": "描述"
                  },
                  "email": {
                    "type": "string",
                    "title": "邮件"
                  },
                  "sms": {
                    "type": "string",
                    "title": "短信"
                  },
                  "dingtalk": {
                    "type": "string",
                    "title": "钉钉机器人"
                  },
                  "wecom": {
                    "type": "string",
                    "title": "企微机器人"
                  },
                  "feishu": {
                    "type": "string",
                    "title": "飞书机器人"
                  },
                  "feishu_app": {
                    "type": "string",
                    "title": "飞书应用"
                  },
                  "dingtalk_app": {
                    "type": "string",
                    "title": "钉钉应用"
                  },
                  "wecom_app": {
                    "type": "string",
                    "title": "企微应用"
                  },
                  "teams_app": {
                    "type": "string",
                    "title": "Teams应用"
                  },
                  "slack_app": {
                    "type": "string",
                    "title": "Slack应用"
                  },
                  "zoom": {
                    "type": "string",
                    "title": "zoom机器人"
                  },
                  "telegram": {
                    "type": "string",
                    "title": "telegram机器人"
                  }
                },
                "required": [
                  "template_name",
                  "email",
                  "dingtalk",
                  "feishu_app",
                  "feishu",
                  "wecom",
                  "dingtalk_app",
                  "wecom_app",
                  "sms",
                  "telegram",
                  "zoom",
                  "slack_app",
                  "teams_app",
                  "template_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/card-view/delete": {
      "post": {
        "summary": "视图删除",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理/聚合视图"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "view_id": {
                    "type": "string",
                    "title": "rule ID"
                  }
                },
                "required": [
                  "view_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/card-view/list": {
      "post": {
        "summary": "视图列表",
        "deprecated": false,
        "description": "filters 说明见创建接口",
        "tags": [
          "故障管理/聚合视图"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CardView"
                          }
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/card-view/create": {
      "post": {
        "summary": "视图创建",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理/聚合视图"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "view_name": {
                    "type": "string",
                    "title": "策略名称"
                  },
                  "equals": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "以label.开头的是label项，其他是属性项",
                      "enum": [
                        "title",
                        "incident_severity",
                        "incident_status",
                        "labels.{x}"
                      ]
                    },
                    "title": "相同项"
                  }
                },
                "required": [
                  "equals"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "view_id": {
                          "type": "string",
                          "title": "ID"
                        }
                      },
                      "required": [
                        "view_id"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/card-view/update": {
      "post": {
        "summary": "视图更新",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理/聚合视图"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "view_id": {
                    "type": "string",
                    "title": "策略id",
                    "description": "更新时必传"
                  },
                  "view_name": {
                    "type": "string",
                    "title": "策略名称"
                  },
                  "equals": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "以label.开头的是label项，其他是属性项",
                      "enum": [
                        "title",
                        "incident_severity",
                        "incident_status",
                        "labels.{x}"
                      ]
                    },
                    "title": "相同项"
                  }
                },
                "required": [
                  "view_id",
                  "equals",
                  "view_name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "rule_id": {
                          "type": "string",
                          "title": "ID"
                        }
                      },
                      "required": [
                        "rule_id"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/post-mortem/init": {
      "post": {
        "summary": "初始化故障复盘（手动创建）",
        "deprecated": false,
        "description": "为选定的一个或多个故障创建空白的复盘报告骨架",
        "tags": [
          "故障管理/故障复盘"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "",
            "required": false,
            "example": "Bearer {{token}}",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "故障ID列表（一个或多个）"
                  },
                  "template_id": {
                    "type": "string",
                    "description": "复盘模板ID"
                  }
                },
                "required": [
                  "incident_ids",
                  "template_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {}
                    },
                    "data": {
                      "$ref": "#/components/schemas/PostMortemItem"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/ai/post-mortem/generate": {
      "post": {
        "summary": "AI 生成故障复盘内容（流式）",
        "deprecated": false,
        "description": "使用 AI（deepseek-v3）根据故障数据、时间线、聊天记录自动生成复盘报告内容。限频：每账户每分钟5次。\n\n**响应格式**：SSE（Server-Sent Events），Content-Type 为 `text/event-stream`。\n\n**注意**：当请求参数校验失败或限频时，返回普通 JSON 错误响应（Content-Type 为 `application/json`）。仅当 LLM 流成功建立后，才切换为 SSE 流。\n\n**SSE 事件格式**：\n\n- 内容块：`data: {\"content\":\"<markdown delta>\"}\\n\\n`\n- 完成：`event: done\\ndata: {}\\n\\n`\n- 错误：`event: error\\ndata: {\"message\":\"...\"}\\n\\n`\n\n前端累积所有 content delta 拼接为完整 Markdown 文本，流结束后调用 `editor.tryParseMarkdownToBlocks()` 转换为 BlockNote 编辑器内容。",
        "tags": [
          "故障管理/故障复盘"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "",
            "required": false,
            "example": "Bearer {{token}}",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "故障ID列表（一个或多个）"
                  },
                  "template_id": {
                    "type": "string",
                    "description": "复盘模板ID"
                  }
                },
                "required": [
                  "incident_ids",
                  "template_id"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "SSE 流式响应，Content-Type 为 text/event-stream。每个事件为一行 `data: {\"content\":\"...\"}` 格式的 JSON，最后发送 `event: done`。",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string",
                  "description": "SSE 流。每个 data 行为 JSON：{\"content\": \"<markdown text delta>\"}。结束事件：event: done, data: {}。错误事件：event: error, data: {\"message\": \"...\"}。"
                }
              }
            },
            "headers": {}
          }
        },
        "security": []
      }
    },
    "/incident/post-mortem/list": {
      "post": {
        "summary": "获取故障复盘列表",
        "deprecated": false,
        "description": "分页查询复盘报告列表，支持按状态、团队、协作空间、时间范围过滤",
        "tags": [
          "故障管理/故障复盘"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "",
            "required": false,
            "example": "Bearer {{token}}",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "drafting",
                      "published"
                    ],
                    "description": "复盘状态"
                  },
                  "team_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "按团队ID列表过滤（多选）"
                  },
                  "channel_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "按协作空间ID列表过滤（多选）"
                  },
                  "created_at_start_seconds": {
                    "type": "integer",
                    "description": "创建时间起始（秒级时间戳）"
                  },
                  "created_at_end_seconds": {
                    "type": "integer",
                    "description": "创建时间结束（秒级时间戳）"
                  },
                  "orderby": {
                    "type": "string",
                    "enum": [
                      "created_at_seconds",
                      "updated_at_seconds"
                    ],
                    "description": "排序字段"
                  },
                  "asc": {
                    "type": "boolean",
                    "description": "是否升序，默认降序"
                  },
                  "p": {
                    "type": "integer",
                    "description": "页码，从1开始，不传默认为1"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "分页条数，不传默认为20"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {}
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {}
                          },
                          "title": "复盘列表（仅Meta信息）"
                        },
                        "has_next_page": {
                          "type": "boolean",
                          "title": "是否有下一页"
                        },
                        "total": {
                          "type": "integer",
                          "title": "总条目数"
                        }
                      },
                      "required": [
                        "items",
                        "has_next_page",
                        "total"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/post-mortem/info": {
      "get": {
        "summary": "获取故障复盘详情",
        "deprecated": false,
        "description": "根据复盘ID获取完整的复盘报告内容",
        "tags": [
          "故障管理/故障复盘"
        ],
        "parameters": [
          {
            "name": "post_mortem_id",
            "in": "query",
            "description": "复盘 ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "",
            "required": false,
            "example": "Bearer {{token}}",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {}
                    },
                    "data": {
                      "$ref": "#/components/schemas/PostMortemItem"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/post-mortem/delete": {
      "post": {
        "summary": "删除故障复盘",
        "deprecated": false,
        "description": "删除复盘报告，并解除与故障的关联",
        "tags": [
          "故障管理/故障复盘"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "",
            "required": false,
            "example": "Bearer {{token}}",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "post_mortem_id": {
                    "type": "string",
                    "description": "复盘ID"
                  }
                },
                "required": [
                  "post_mortem_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/post-mortem/status/reset": {
      "post": {
        "summary": "更新故障复盘状态",
        "deprecated": false,
        "description": "更新复盘状态（草稿 <-> 已发布）",
        "tags": [
          "故障管理/故障复盘"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "",
            "required": false,
            "example": "Bearer {{token}}",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "post_mortem_id": {
                    "type": "string",
                    "description": "复盘ID"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "drafting",
                      "published"
                    ],
                    "description": "复盘状态"
                  }
                },
                "required": [
                  "post_mortem_id",
                  "status"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/post-mortem/basics/reset": {
      "post": {
        "summary": "更新故障复盘基础信息",
        "deprecated": false,
        "description": "手动更新复盘的基础信息（从故障元数据计算得到的信息）",
        "tags": [
          "故障管理/故障复盘"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "",
            "required": false,
            "example": "Bearer {{token}}",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "post_mortem_id": {
                    "type": "string",
                    "description": "复盘ID"
                  },
                  "incidents_highest_severity": {
                    "type": "string",
                    "description": "故障最高严重级别"
                  },
                  "incidents_earliest_start_seconds": {
                    "type": "integer",
                    "description": "故障最早开始时间（秒级时间戳）"
                  },
                  "incidents_latest_close_seconds": {
                    "type": "integer",
                    "description": "故障最晚结束时间（秒级时间戳）"
                  },
                  "incidents_total_duration_seconds": {
                    "type": "integer",
                    "description": "故障总持续时间（秒）"
                  },
                  "responder_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "响应者ID列表"
                  }
                },
                "required": [
                  "post_mortem_id",
                  "incidents_highest_severity",
                  "incidents_earliest_start_seconds",
                  "incidents_latest_close_seconds",
                  "incidents_total_duration_seconds",
                  "responder_ids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/post-mortem/title/reset": {
      "post": {
        "summary": "更新故障复盘标题",
        "deprecated": false,
        "description": "更新复盘报告标题（最长256字符）",
        "tags": [
          "故障管理/故障复盘"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "",
            "required": false,
            "example": "Bearer {{token}}",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "post_mortem_id": {
                    "type": "string",
                    "description": "复盘ID"
                  },
                  "title": {
                    "type": "string",
                    "description": "复盘标题（最长256字符）",
                    "maxLength": 256
                  }
                },
                "required": [
                  "post_mortem_id",
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/post-mortem/follow-ups/reset": {
      "post": {
        "summary": "更新故障复盘后续待办",
        "deprecated": false,
        "description": "更新复盘后续待办事项（任何状态都可编辑）",
        "tags": [
          "故障管理/故障复盘"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "",
            "required": false,
            "example": "Bearer {{token}}",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "post_mortem_id": {
                    "type": "string",
                    "description": "复盘ID"
                  },
                  "follow_ups": {
                    "type": "string",
                    "description": "后续待办内容（自由文本）"
                  }
                },
                "required": [
                  "post_mortem_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/post-mortem/template/list": {
      "post": {
        "summary": "获取故障复盘模板列表",
        "deprecated": false,
        "description": "获取账户下所有复盘模板列表（内置模板在前，自定义模板在后）",
        "tags": [
          "故障管理/故障复盘"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "",
            "required": false,
            "example": "Bearer {{token}}",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "order_by": {
                    "type": "string",
                    "enum": [
                      "created_at_seconds"
                    ],
                    "description": "排序字段"
                  },
                  "asc": {
                    "type": "boolean",
                    "description": "是否升序，默认降序"
                  },
                  "p": {
                    "type": "integer",
                    "description": "页码，从1开始，不传默认为1"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "分页条数，不传默认为20"
                  }
                }
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {}
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PostMortemTemplate"
                          },
                          "title": "模板列表"
                        },
                        "has_next_page": {
                          "type": "boolean",
                          "title": "是否有下一页"
                        },
                        "total": {
                          "type": "integer",
                          "title": "总条目数"
                        }
                      },
                      "required": [
                        "items",
                        "has_next_page",
                        "total"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": []
      }
    },
    "/incident/post-mortem/template/info": {
      "get": {
        "summary": "获取复盘模板详情",
        "deprecated": false,
        "description": "根据模板ID获取模板详细定义",
        "tags": [
          "故障管理/故障复盘"
        ],
        "parameters": [
          {
            "name": "template_id",
            "in": "query",
            "description": "模板ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "",
            "required": false,
            "example": "Bearer {{token}}",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {}
                    },
                    "data": {
                      "$ref": "#/components/schemas/PostMortemTemplate"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": []
      }
    },
    "/incident/post-mortem/template/upsert": {
      "post": {
        "summary": "创建或更新复盘模板",
        "deprecated": false,
        "description": "创建新模板或更新现有模板。创建时 team_id 必填；更新时仅管理团队成员、账户管理员可操作。",
        "tags": [
          "故障管理/故障复盘"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "",
            "required": false,
            "example": "Bearer {{token}}",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "template_id": {
                    "type": "string",
                    "description": "模板ID（更新时必填，创建时留空）"
                  },
                  "team_id": {
                    "type": "integer",
                    "description": "管理团队ID（创建时必填；更新时传0或不传表示不变更，传正整数表示变更管理团队）"
                  },
                  "name": {
                    "type": "string",
                    "description": "模板名称"
                  },
                  "description": {
                    "type": "string",
                    "description": "模板描述"
                  },
                  "content": {
                    "type": "string",
                    "description": "模板内容（BlockNote JSON 数组）"
                  },
                  "content_markdown": {
                    "type": "string",
                    "description": "模板内容的 Markdown 格式（供 AI 生成使用，由前端通过 blocksToMarkdownLossy 转换生成）"
                  }
                },
                "required": [
                  "name",
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {}
                    },
                    "data": {
                      "$ref": "#/components/schemas/PostMortemTemplate"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": []
      }
    },
    "/incident/post-mortem/template/delete": {
      "post": {
        "summary": "删除复盘模板",
        "deprecated": false,
        "description": "删除指定的复盘模板（内置模板不可删除）",
        "tags": [
          "故障管理/故障复盘"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "",
            "required": false,
            "example": "Bearer {{token}}",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "template_id": {
                    "type": "string",
                    "description": "模板ID"
                  }
                },
                "required": [
                  "template_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": []
      }
    },
    "/incident/post-mortem/media/upload": {
      "post": {
        "summary": "上传复盘媒体文件",
        "deprecated": false,
        "description": "上传图片到指定的复盘文档。支持 PNG、JPEG、GIF、WebP 格式，单文件最大 4MB，每篇复盘最多 100 张图片。达到上限时会自动回收未被文档引用的孤立图片。",
        "tags": [
          "故障管理/故障复盘"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "",
            "required": false,
            "example": "Bearer {{token}}",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "post_mortem_id": {
                    "type": "string",
                    "description": "复盘ID（MD5哈希格式）",
                    "example": ""
                  },
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "图片文件。允许扩展名: .png, .jpg, .jpeg, .gif, .webp。最大 4MB。",
                    "example": ""
                  }
                },
                "required": [
                  "post_mortem_id",
                  "file"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {}
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string",
                          "description": "上传文件的相对路径 key，需通过 /object/presigned/get 获取预签名 URL 后才能访问"
                        }
                      },
                      "required": [
                        "url"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/create": {
      "post": {
        "summary": "创建故障",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "故障标题"
                  },
                  "description": {
                    "type": "string",
                    "description": "故障描述，可以为纯文本或markdown"
                  },
                  "incident_severity": {
                    "type": "string",
                    "description": "严重程度，注意首字母大写",
                    "enum": [
                      "Critical",
                      "Warning",
                      "Info"
                    ]
                  },
                  "channel_id": {
                    "type": "integer",
                    "description": "协作空间ID"
                  },
                  "assigned_to": {
                    "description": "分派信息。不传时，将匹配协作空间下的分配策略进行分派",
                    "$ref": "#/components/schemas/Assignment"
                  }
                },
                "required": [
                  "title",
                  "incident_severity"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅出现错误时返回"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "incident_id": {
                          "type": "string",
                          "title": "故障ID"
                        },
                        "title": {
                          "type": "string",
                          "title": "故障标题"
                        }
                      },
                      "title": "",
                      "required": [
                        "incident_id",
                        "title"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/assign": {
      "post": {
        "summary": "分派故障",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "故障IDs"
                  },
                  "assigned_to": {
                    "description": "分派配置",
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "分派类型",
                        "enum": [
                          "assign",
                          "reassign",
                          "escalate",
                          "reopen"
                        ]
                      },
                      "person_ids": {
                        "type": "array",
                        "items": {
                          "type": "integer",
                          "description": "人员ID"
                        },
                        "description": "（直接分派）人员ID列表，与escalate_rule_id二选一"
                      },
                      "escalate_rule_id": {
                        "type": "string",
                        "description": "（策略分派）分派策略ID，当时存在，与person_ids二选一"
                      },
                      "layer_idx": {
                        "type": "integer",
                        "description": "（策略分派）本次分派层级，当策略分派时，可以指定分派的层级，比如直接升级到第二环节"
                      },
                      "notify": {
                        "$ref": "#/components/schemas/RequestNotify",
                        "description": "本次分派通知配置（目前仅支持单聊和模板指定），可同时用于直接分派和策略分派。"
                      },
                      "layer_person_reset": {
                        "type": "object",
                        "properties": {
                          "0": {
                            "$ref": "#/components/schemas/PersonGroup",
                            "title": "层级ID到人员替换"
                          }
                        },
                        "description": "（策略分派）层级人员替换，当策略分派时，可以同时设置不同层级的人员，key为层级索引，从0开始。仅特殊场景使用，您可以直接忽略",
                        "required": [
                          "0"
                        ]
                      },
                      "layer_webhook_reset": {
                        "type": "object",
                        "properties": {
                          "0": {
                            "$ref": "#/components/schemas/EscalateWebhook"
                          }
                        },
                        "description": "（策略分派）层级Webhook替换，当策略分派时，可以同时设置不同层级的Webhook，key为层级索引，从0开始。仅特殊场景使用，您可以直接忽略",
                        "required": [
                          "0"
                        ]
                      },
                      "emails": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "（直接分派）人员邮箱列表，可以使用此值替代person_ids，等同于进行直接分派。仅特殊场景使用，您可以直接忽略"
                      }
                    },
                    "required": [
                      "type"
                    ]
                  }
                },
                "required": [
                  "assigned_to"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅出现错误时返回"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/responder/add": {
      "post": {
        "summary": "添加处理人",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_id": {
                    "type": "string",
                    "description": "故障ID"
                  },
                  "person_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "新增分派人员列表"
                  },
                  "notify": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "follow_preference": {
                        "type": "boolean",
                        "description": "遵循个人偏好，默认为true"
                      },
                      "personal_channels": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "email",
                            "sms",
                            "voice",
                            "feishu_app:xxxx",
                            "dingtalk_app:xxxx",
                            "wecom_app:xxxx",
                            "slack_app:xxxx",
                            "teams_app:xxx",
                            "flashduty_app"
                          ]
                        },
                        "description": "个人通知渠道，当follow_preference=false时生效"
                      },
                      "template_id": {
                        "type": "string",
                        "description": "模板ID，当使用直接分派时，默认为”默认模板“；当使用策略分派时，默认为分派策略中指定的模板"
                      }
                    },
                    "description": "通知方式，默认使用个人偏好",
                    "required": [
                      "personal_channels"
                    ]
                  }
                },
                "required": [
                  "incident_id",
                  "person_ids"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅出现错误时返回"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/ack": {
      "post": {
        "summary": "认领故障",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "故障ID列表"
                  }
                },
                "required": [
                  "incident_ids"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅出现错误时返回"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/unack": {
      "post": {
        "summary": "取消认领",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "故障ID列表"
                  }
                },
                "required": [
                  "incident_ids"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "title": "错误信息",
                      "description": "仅出现错误时返回"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/resolve": {
      "post": {
        "summary": "关闭故障",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 100,
                    "description": "故障ID列表"
                  },
                  "root_cause": {
                    "type": "string",
                    "description": "根因"
                  },
                  "resolution": {
                    "type": "string",
                    "description": "解决办法"
                  }
                },
                "required": [
                  "incident_ids"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅出现错误时返回"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/reopen": {
      "post": {
        "summary": "重开故障",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "故障ID列表"
                  },
                  "reason": {
                    "type": "string",
                    "description": "原因"
                  }
                },
                "required": [
                  "incident_ids",
                  "reason"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "title": "错误信息",
                      "description": "仅出现错误时返回"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/remove": {
      "post": {
        "summary": "删除故障",
        "deprecated": false,
        "description": "- 故障数据没有备份，<span style=\"color: red;\">删除后不可找回</span>。请谨慎操作，或先导出再删除。\n- 您只能删除您有权限编辑的协作空间下的故障。",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "故障ID列表"
                  }
                },
                "required": [
                  "incident_ids"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "title": "错误信息",
                      "description": "仅出现错误时返回"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/snooze": {
      "post": {
        "summary": "暂缓故障",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "故障ID列表"
                  },
                  "minutes": {
                    "type": "integer",
                    "description": "屏蔽分钟，1-1440"
                  }
                },
                "required": [
                  "incident_ids",
                  "minutes"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅出现错误时返回"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/wake": {
      "post": {
        "summary": "取消暂缓",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "故障ID列表"
                  }
                },
                "required": [
                  "incident_ids"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅出现错误时返回"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/merge": {
      "post": {
        "summary": "合并故障",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "source_incident_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "源故障ID列表"
                  },
                  "target_incident_id": {
                    "type": "string",
                    "description": "目标故障ID"
                  },
                  "title": {
                    "type": "string",
                    "description": "新标题"
                  },
                  "comment": {
                    "type": "string",
                    "description": "评论"
                  },
                  "remove_source_incidents": {
                    "type": "boolean",
                    "description": "是否删除源故障"
                  }
                },
                "required": [
                  "source_incident_ids",
                  "target_incident_id",
                  "remove_source_incidents"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅出现错误时返回"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/comment": {
      "post": {
        "summary": "评论故障",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "故障ID列表"
                  },
                  "comment": {
                    "type": "string",
                    "description": "评论内容",
                    "maxLength": 500,
                    "minLength": 1
                  },
                  "mute_reply": {
                    "type": "boolean",
                    "description": "是否关闭回复通知"
                  }
                },
                "required": [
                  "incident_ids",
                  "comment"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅出现错误时返回"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/info": {
      "post": {
        "summary": "故障详情",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_id": {
                    "type": "string",
                    "description": "故障ID，ObjectID类型"
                  }
                },
                "required": [
                  "incident_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅出现错误时返回"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Incident",
                      "description": "故障详情"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/list": {
      "post": {
        "summary": "故障列表",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "search_after_ctx": {
                    "type": "string",
                    "description": "游标分页，不设置为第一页。与p参数二选一。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)"
                  },
                  "p": {
                    "type": "integer",
                    "description": "传统分页，不设置从第一页开始，默认值为1，与search_after_ctx参数二选一。基于传统分页时设置，<span style=\"color: red;\">当设置p参数时，p*limit不得超过10000</span>，否则返回参数错误。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)",
                    "default": 1
                  },
                  "limit": {
                    "type": "integer",
                    "description": "分页条数。<span style=\"color: red;\">当设置p参数时，(p-1)*limit不得超过10000</span>，否则返回参数错误。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)",
                    "maximum": 100,
                    "minimum": 0,
                    "default": 20
                  },
                  "asc": {
                    "type": "boolean",
                    "description": "是否升序，默认排序依据为故障创建时间，start_time"
                  },
                  "progress": {
                    "type": "string",
                    "description": "处理状态，注意首字母大写，传入多个状态用”,“拼接",
                    "enum": [
                      "Triggered,Processing,Closed",
                      "Triggered,Processing",
                      "Triggered",
                      "Processing",
                      "Closed"
                    ]
                  },
                  "title": {
                    "type": "string",
                    "description": "故障标题：默认为精确查询，前后加\"/\"为正则匹配，包含”*“或\"?\"代表通配符匹配。"
                  },
                  "channel_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "description": "协作空间ID"
                    },
                    "description": "协作空间ID列表"
                  },
                  "responder_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "description": "人员ID"
                    },
                    "description": "处理人（被分派人员）ID列表，处理人可能包含未认领的已分派人员"
                  },
                  "acker_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "description": "人员ID"
                    },
                    "description": "认领人ID列表"
                  },
                  "creator_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "description": "人员ID"
                    },
                    "description": "创建人ID列表，0代表系统聚合自动产生的故障，不为0为手动创建的故障"
                  },
                  "incident_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "故障ID"
                    },
                    "description": "故障ID列表"
                  },
                  "start_time": {
                    "type": "integer",
                    "description": "检索区间起点。单位秒，end_time-start_time不能超过1个月"
                  },
                  "end_time": {
                    "type": "integer",
                    "description": "检索区间终点。单位秒，end_time-start_time不能超过1个月"
                  },
                  "incident_severity": {
                    "type": "string",
                    "description": "严重程度。多个等级使用”,“分隔",
                    "enum": [
                      "Critical",
                      "Warning",
                      "Info"
                    ]
                  },
                  "is_related": {
                    "type": "boolean",
                    "description": "是否与查询人相关。登录人为发起人、被指派、关闭人或处理人之一"
                  },
                  "is_snoozed": {
                    "type": "boolean",
                    "description": "是否暂缓中。仅看当前故障状态，与查询时间区间无关"
                  },
                  "is_my_team": {
                    "type": "boolean",
                    "description": "我所在团队下的故障。当设置为true，仅统计我所在团队下属协作空间内的故障"
                  },
                  "is_my_channel": {
                    "type": "boolean",
                    "description": "我所管理的协作空间下的故障。当设置为true，仅统计我的空间（我所在团队下属协作空间以及我个人创建的协作空间）下的故障"
                  },
                  "ever_muted": {
                    "type": "boolean",
                    "description": "是否抖动提醒/暂缓过"
                  },
                  "labels": {
                    "description": "标签筛选。支持精确匹配、正则匹配和通配匹配。以'/'作为前后缀的字符串将被识别为正则。 举例：指定('datacenter' IN ['bj01','sh-*','']) AND ('host' IN '/api-server-\\d+/')，可匹配到产生于'bj01'和'sh-01'、'sh-02'三个数据中心并且主机名满足'api-server-\\d+'正则的报警事件",
                    "$ref": "#/components/schemas/Labels"
                  },
                  "fields": {
                    "type": "object",
                    "properties": {
                      "{x}": {
                        "type": [
                          "string",
                          "integer",
                          "boolean",
                          "array",
                          "object",
                          "number",
                          "null"
                        ],
                        "description": "x为任意自定义字段名称，值可为多种类型，具体根据自定义字段配置进行传参"
                      }
                    },
                    "description": "自定义字段筛选。仅支持精确匹配，不支持text类型字段筛选，",
                    "required": [
                      "{x}"
                    ]
                  },
                  "team_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "团队列表，Owner Teams过滤"
                  }
                },
                "required": [
                  "start_time",
                  "end_time"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅出现错误时返回"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Incident"
                          },
                          "description": "故障列表"
                        },
                        "search_after_ctx": {
                          "type": "string",
                          "description": "游标分页，有此项说明有下一页。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)"
                        },
                        "total": {
                          "type": "integer",
                          "description": "匹配条目总数。请注意，<span style=\"color: red;\">total仅在小于1000时精确，请不要使用该值来计算分页是否结束。</span>当总条数大于1000时，系统仅会返回total=1000，代表系统匹配到了1000+数据。请使用hax_next_page来判断是否还有数据未获取。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)"
                        },
                        "has_next_page": {
                          "type": "boolean",
                          "description": "是否存在更多数据未获取"
                        }
                      },
                      "description": "响应数据"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/list-by-card": {
      "post": {
        "summary": "故障列表-卡片视图",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "view_id": {
                    "type": "string",
                    "title": "视图ID"
                  },
                  "asc": {
                    "title": "是否升序",
                    "type": "boolean"
                  },
                  "progress": {
                    "type": "string",
                    "title": "处理状态",
                    "description": "全部（progress不传） 未关闭（progress传Triggered,Processing） 待处理（progress传Triggered） 处理中（progress传Processing） 已关闭（progress传Closed）"
                  },
                  "title": {
                    "type": "string",
                    "title": "标题"
                  },
                  "channel_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "协作空间ID列表",
                    "description": "0代表全局故障"
                  },
                  "responder_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "处理人ID列表",
                    "description": "处理人可能包含未认领的已分派人员"
                  },
                  "acker_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "认领人ID列表"
                  },
                  "creator_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "创建人ID列表",
                    "description": "0代表系统聚合故障"
                  },
                  "incident_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "故障ID列表"
                  },
                  "start_time": {
                    "type": "integer",
                    "title": "检索区间起点",
                    "description": "单位秒，end_time-start_time不能超过1个月"
                  },
                  "end_time": {
                    "type": "integer",
                    "title": "检索区间终点",
                    "description": "单位秒，end_time-start_time不能超过1个月"
                  },
                  "range_by": {
                    "type": "string",
                    "title": "检索时间字段",
                    "description": "默认为last_time，支持updated_at last_time start_time。但如果by_intersection=true，range_by只能为last_time或end_time"
                  },
                  "incident_severity": {
                    "type": "string",
                    "title": "严重程度",
                    "description": "Critical,Info,Warning 可以传多个，逗号分隔",
                    "enum": [
                      "Critical",
                      "Warning",
                      "Info"
                    ]
                  },
                  "is_related": {
                    "type": "boolean",
                    "title": "是否与我相关",
                    "description": "登录人为发起人、被指派、关闭人或处理人之一"
                  },
                  "is_snoozed": {
                    "type": "boolean",
                    "title": "是否暂缓中",
                    "description": "仅看当前状态，与查询时间区间无关"
                  },
                  "is_my_team": {
                    "type": "boolean",
                    "title": "我团队的",
                    "description": "当设置为true，仅统计我所在团队下属协作空间内的故障"
                  },
                  "labels": {
                    "type": "object",
                    "properties": {
                      "$key": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "title": "标签key，值为可选values，一个匹配即匹配"
                      }
                    },
                    "required": [
                      "$key"
                    ],
                    "description": "支持精确匹配、正则匹配和通配匹配。以'/'作为前后缀的字符串将被识别为正则。 举例：指定('datacenter' IN ['bj01','sh-*','']) AND ('host' IN '/api-server-\\d+/')，可匹配到产生于'bj01'和'sh-01'、'sh-02'三个数据中心并且主机名满足'api-server-\\d+'正则的报警事件",
                    "title": "标签筛选"
                  }
                },
                "required": [
                  "start_time",
                  "end_time",
                  "view_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string",
                                "title": "卡片名称"
                              },
                              "total": {
                                "type": "integer",
                                "title": "告警个数"
                              },
                              "incident_severity": {
                                "type": "string",
                                "title": "最高严重程度"
                              },
                              "incident_ids": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "title": "故障ID列表"
                              }
                            },
                            "required": [
                              "title",
                              "incident_ids",
                              "incident_severity",
                              "total"
                            ]
                          },
                          "description": "<span style=\"color: red;\">请注意，匹配超过100条数时，仅返回100条</span>"
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/past/list": {
      "post": {
        "summary": "历史故障列表",
        "deprecated": false,
        "description": "查询与传入故障相似的历史故障，仅统计相同协作空间下对应故障发生前30天内的相似故障。注意该api仅供专业版使用。",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "description": "分页条数",
                    "maximum": 20,
                    "minimum": 0,
                    "default": 10
                  },
                  "incident_id": {
                    "type": "string",
                    "description": "被查询的故障ID"
                  }
                },
                "required": [
                  "incident_id"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅错误时返回"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "score": {
                                "type": "number",
                                "minimum": 0.9,
                                "maximum": 1,
                                "description": "相似程度"
                              },
                              "incident_id": {
                                "type": "string",
                                "description": "故障ID，类型为ObjectID"
                              },
                              "start_time": {
                                "type": "integer",
                                "description": "开始时间戳，单位秒"
                              },
                              "end_time": {
                                "type": "integer",
                                "description": "结束时间戳，单位秒。当故障自动恢复时，此值不为0；手动关闭故障时，该值可能为0"
                              },
                              "last_time": {
                                "type": "integer",
                                "description": "最后一条合入当前故障的告警的开始时间戳，单位秒"
                              },
                              "ack_time": {
                                "type": "integer",
                                "description": "首次认领时间戳，单位秒。如果有多个人认领告警，该字段为首次认领时间。如果取消认领，该值重置为0"
                              },
                              "close_time": {
                                "type": "integer",
                                "description": "手动关闭时间戳，单位秒。故障自动恢复时，故障也将自动关闭"
                              },
                              "snoozed_before": {
                                "type": "integer",
                                "description": "暂缓截止时间戳，单位秒。取消关闭或认领时，该值重置为0"
                              },
                              "incident_status": {
                                "type": "string",
                                "description": "故障状态。枚举值：Info，Warning，Critical，Ok",
                                "enum": [
                                  "Info",
                                  "Warning",
                                  "Critical",
                                  "Ok"
                                ]
                              },
                              "incident_severity": {
                                "type": "string",
                                "description": "严重程度。枚举值：Info，Warning，Critical",
                                "enum": [
                                  "Info",
                                  "Warning",
                                  "Critical"
                                ]
                              },
                              "progress": {
                                "type": "string",
                                "description": "处理进度。枚举值：Triggered, In Progress, Closed ",
                                "enum": [
                                  "Triggered",
                                  "Processing",
                                  "Closed"
                                ]
                              },
                              "creator_id": {
                                "type": "integer",
                                "description": "发起人ID，仅手动创建故障存在"
                              },
                              "closer_id": {
                                "type": "integer",
                                "description": "关闭人ID，仅手动关闭时存在"
                              },
                              "assigned_to": {
                                "description": "指派信息。最新一次手动或自动指派的信息，升级或重新指派时会发更新该值",
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "description": "分派类型",
                                    "enum": [
                                      "assign",
                                      "reassign",
                                      "escalate",
                                      "reopen"
                                    ]
                                  },
                                  "person_ids": {
                                    "type": "array",
                                    "items": {
                                      "type": "integer",
                                      "description": "人员ID"
                                    },
                                    "description": "（直接分派）人员ID列表，与escalate_rule_id二选一"
                                  },
                                  "escalate_rule_id": {
                                    "type": "string",
                                    "description": "（策略分派）分派策略ID，当时存在，与person_ids二选一"
                                  },
                                  "escalate_rule_name": {
                                    "type": "string",
                                    "description": "（策略分派）分派策略名称"
                                  },
                                  "layer_idx": {
                                    "type": "integer",
                                    "description": "（策略分派）本次分派层级，当策略分派时，可以指定分派的层级，比如直接升级到第二环节"
                                  }
                                },
                                "required": [
                                  "type"
                                ]
                              },
                              "responders": {
                                "type": [
                                  "array",
                                  "null"
                                ],
                                "items": {
                                  "$ref": "#/components/schemas/Responder"
                                },
                                "description": "处理人列表。该值跟assigned_to无绝对关系，该值可能因人员直接认领或关闭故障而更新。该人员列表信息可能多于assigned_to人员列表"
                              },
                              "alert_cnt": {
                                "type": "integer",
                                "description": "关联告警数量"
                              },
                              "title": {
                                "type": "string",
                                "description": "故障标题"
                              },
                              "description": {
                                "type": "string",
                                "description": "故障描述，可能为传文本、markdown或html类型"
                              },
                              "impact": {
                                "type": "string",
                                "description": "故障影响",
                                "deprecated": true
                              },
                              "root_cause": {
                                "type": "string",
                                "description": "故障根本原因",
                                "deprecated": true
                              },
                              "resolution": {
                                "type": "string",
                                "description": "故障解决办法",
                                "deprecated": true
                              },
                              "num": {
                                "type": "string",
                                "description": "短标识，可能重复，仅用于快速识别"
                              },
                              "labels": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/Labels"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "标签信息，kv，代表故障不同维度信息，提取自集成上报内容"
                              },
                              "channel_id": {
                                "type": "integer",
                                "description": "协作空间ID，为0代表全局故障"
                              },
                              "channel_name": {
                                "type": "string",
                                "description": "协作空间名称"
                              },
                              "integration_ids": {
                                "type": "array",
                                "items": {
                                  "type": "integer"
                                },
                                "description": "来源集成ID列表"
                              },
                              "integration_types": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "来源集成类型列表"
                              },
                              "dedup_key": {
                                "type": "string",
                                "description": "故障去重key，故障聚合的第一条告警的alert_key"
                              },
                              "group_method": {
                                "type": "string",
                                "enum": [
                                  "i",
                                  "p",
                                  "n"
                                ],
                                "description": "聚合方式"
                              },
                              "ever_muted": {
                                "type": "boolean",
                                "description": "是否抖动提醒/暂缓过，此类故障将不会统计分析指标"
                              },
                              "frequency": {
                                "type": "string",
                                "description": "触发频率。如果为rare，代表30天内仅发生一次。如果为frequent，代表30天内至少发生20次",
                                "enum": [
                                  "rare",
                                  "frequent"
                                ]
                              },
                              "images": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "alt": {
                                      "type": "string",
                                      "description": "图片的替代文本"
                                    },
                                    "src": {
                                      "type": "string",
                                      "description": "图片来源，http/https 开头的公共可访问的图片链接地址 或 图片上传接口 返回的 image_key"
                                    },
                                    "href": {
                                      "type": "string",
                                      "description": "超链接引用路径"
                                    }
                                  }
                                }
                              },
                              "alert_event_cnt": {
                                "type": "integer",
                                "description": "告警事件数量"
                              }
                            },
                            "required": [
                              "score",
                              "incident_id",
                              "start_time",
                              "end_time",
                              "last_time",
                              "snoozed_before",
                              "incident_status",
                              "incident_severity",
                              "progress",
                              "creator_id",
                              "title",
                              "num"
                            ]
                          },
                          "description": "故障列表"
                        }
                      },
                      "description": "响应数据"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/feed": {
      "post": {
        "summary": "故障时间线",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_id": {
                    "type": "string",
                    "description": "故障ID"
                  },
                  "types": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "title": "记录类型",
                      "enum": [
                        "i_comm",
                        "i_notify",
                        "i_new",
                        "i_assign",
                        "i_a_rspd",
                        "i_ack",
                        "i_unack",
                        "i_snooze",
                        "i_wake",
                        "i_rslv",
                        "i_reopen",
                        "i_merge",
                        "i_m_silence",
                        "i_m_inhibat",
                        "i_m_flapping",
                        "i_storm",
                        "i_r_rc",
                        "i_r_desc",
                        "i_r_rsltn",
                        "i_r_resp",
                        "i_r_impact",
                        "i_r_title",
                        "i_r_severity",
                        "i_r_field",
                        "i_custom"
                      ],
                      "description": "操作类型"
                    },
                    "description": "操作记录类型列表"
                  },
                  "p": {
                    "type": "integer",
                    "description": "页码，从1开始"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "分页条数"
                  },
                  "asc": {
                    "type": "boolean",
                    "description": "是否升序"
                  }
                },
                "required": [
                  "incident_id"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅出现错误时返回"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/IncidentAction"
                          },
                          "description": "操作事件列表"
                        }
                      },
                      "required": [
                        "items"
                      ],
                      "description": "响应数据"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/title/reset": {
      "post": {
        "summary": "标题更新",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_id": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  }
                },
                "required": [
                  "incident_id",
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "title": "错误信息"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/description/reset": {
      "post": {
        "summary": "描述更新",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_id": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  }
                },
                "required": [
                  "incident_id",
                  "description"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "title": "错误信息"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/impact/reset": {
      "post": {
        "summary": "影响更新",
        "deprecated": true,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_id": {
                    "type": "string"
                  },
                  "impact": {
                    "type": "string"
                  }
                },
                "required": [
                  "incident_id",
                  "impact"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "title": "错误信息"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/root-cause/reset": {
      "post": {
        "summary": "根因更新",
        "deprecated": true,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_id": {
                    "type": "string"
                  },
                  "root_cause": {
                    "type": "string"
                  }
                },
                "required": [
                  "incident_id",
                  "root_cause"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "title": "错误信息"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/resolution/reset": {
      "post": {
        "summary": "解决方案更新",
        "deprecated": true,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_id": {
                    "type": "string"
                  },
                  "resolution": {
                    "type": "string"
                  }
                },
                "required": [
                  "incident_id",
                  "resolution"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "title": "错误信息"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/severity/reset": {
      "post": {
        "summary": "严重程度更新",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_id": {
                    "type": "string",
                    "description": "故障ID"
                  },
                  "incident_severity": {
                    "type": "string",
                    "description": "故障严重程度",
                    "enum": [
                      "Critical",
                      "Warning",
                      "Info"
                    ]
                  }
                },
                "required": [
                  "incident_id",
                  "incident_severity"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "title": "错误信息",
                      "description": "仅出现错误时返回"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/reset": {
      "post": {
        "summary": "故障更新",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_id": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string",
                    "description": "故障标题"
                  },
                  "description": {
                    "type": "string",
                    "description": "故障描述"
                  },
                  "impact": {
                    "type": "string",
                    "description": "故障影响",
                    "deprecated": true
                  },
                  "root_cause": {
                    "type": "string",
                    "description": "故障根因",
                    "deprecated": true
                  },
                  "resolution": {
                    "type": "string",
                    "description": "解决方案",
                    "deprecated": true
                  },
                  "incident_severity": {
                    "type": "string",
                    "description": "严重程度"
                  }
                },
                "required": [
                  "incident_id"
                ]
              },
              "example": {
                "incident_id": "",
                "title": "",
                "description": "",
                "impact": "",
                "root_cause": "",
                "incident_severity": ""
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "title": "错误信息"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/alert/list": {
      "post": {
        "summary": "关联告警列表",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_id": {
                    "type": "string",
                    "description": "故障ID，类型ObjectID"
                  },
                  "include_events": {
                    "type": "boolean",
                    "description": "是否包含原始事件数据，了解[告警降噪](https://docs.flashcat.cloud/zh/flashduty/what-is-noise-reduction#%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5)"
                  },
                  "is_active": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "description": "筛选告警状态，如果为false，则仅返回以恢复的告警，如果为true，则仅返回未恢复的告警，如果不传，则返回全部"
                  },
                  "p": {
                    "type": "integer",
                    "description": "页码，从1开始",
                    "minimum": 1,
                    "default": 1
                  },
                  "limit": {
                    "type": "integer",
                    "description": "每页内数据条数",
                    "maximum": 1000,
                    "default": 1000
                  }
                },
                "required": [
                  "incident_id"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅出现错误时返回"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Alert"
                          },
                          "description": "告警列表"
                        },
                        "total": {
                          "type": "integer",
                          "description": "匹配总条数"
                        }
                      },
                      "description": "响应数据"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/field/reset": {
      "post": {
        "summary": "自定义字段更新",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_id": {
                    "type": "string",
                    "description": "故障ID"
                  },
                  "field_name": {
                    "type": "string",
                    "description": "自定义字段名称"
                  },
                  "field_value": {
                    "type": [
                      "string",
                      "integer",
                      "boolean",
                      "array",
                      "object",
                      "number",
                      "null"
                    ],
                    "description": "自定义字段值，需要符合字段类型定义。注意，如果不传该value，将直接删除该字段"
                  }
                },
                "required": [
                  "incident_id",
                  "field_name"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅出现错误时返回"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/custom-action/do": {
      "post": {
        "summary": "触发自定义操作",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_id": {
                    "type": "string",
                    "description": "故障ID"
                  },
                  "integration_id": {
                    "type": "integer",
                    "description": "自定义操作集成ID"
                  }
                },
                "required": [
                  "incident_id",
                  "integration_id"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅出现错误时返回"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "description": "错误描述，来自被调用方"
                        }
                      },
                      "description": "响应数据"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/war-room/create": {
      "post": {
        "summary": "创建作战室",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Flashcat-Context",
            "in": "header",
            "description": "",
            "required": false,
            "example": "{\\\"account_id\\\": 2451002751131}\"",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_id": {
                    "type": "string",
                    "description": "故障ID"
                  },
                  "integration_id": {
                    "type": "string",
                    "description": "IM集成ID，IM必须开启war-room配置"
                  },
                  "member_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "除建群请求人员和故障分派人员外，欲添加至作战室的成员"
                  },
                  "add_observers": {
                    "type": "boolean",
                    "description": "是否自动添加历史响应人作为观察者（曾被分派但当前不在响应人列表中的人员）"
                  }
                },
                "required": [
                  "incident_id",
                  "integration_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅出现错误时返回"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "chat_id": {
                          "type": "string",
                          "description": "IM群聊ID"
                        },
                        "chat_link": {
                          "type": "string",
                          "description": "IM群聊链接"
                        }
                      },
                      "description": "响应数据"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/war-room/delete": {
      "post": {
        "summary": "解散作战室",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_id": {
                    "type": "string",
                    "description": "故障ID"
                  },
                  "integration_id": {
                    "type": "integer",
                    "description": "IM集成ID，该集成必须已开启war-room配置"
                  },
                  "chat_id": {
                    "type": "string",
                    "description": "IM群聊ID"
                  }
                },
                "required": [
                  "incident_id",
                  "integration_id",
                  "chat_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅出现错误时返回"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/war-room/list": {
      "post": {
        "summary": "查看作战室",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_id": {
                    "type": "string",
                    "description": "故障ID"
                  },
                  "integration_id": {
                    "type": "integer",
                    "description": "IM集成ID，该集成必须已开启war-room配置。不传查询所有"
                  }
                },
                "required": [
                  "incident_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅出现错误时返回"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/WarRoom"
                          },
                          "description": "作战室列表"
                        }
                      },
                      "required": [
                        "items"
                      ],
                      "description": "响应数据"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/war-room/detail": {
      "post": {
        "summary": "查看作战室详情",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "chat_id": {
                    "type": "string",
                    "description": "作战室ID"
                  },
                  "integration_id": {
                    "type": "integer",
                    "description": "IM集成ID，该集成必须已开启war-room配置。不传查询所有"
                  }
                },
                "required": [
                  "chat_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅出现错误时返回"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "chat_id": {
                          "type": "string"
                        },
                        "chat_name": {
                          "type": "string"
                        },
                        "share_link": {
                          "type": "string"
                        }
                      },
                      "description": "响应数据",
                      "required": [
                        "chat_id",
                        "chat_name",
                        "share_link"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/war-room/add-member": {
      "post": {
        "summary": "添加作战室成员",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integration_id": {
                    "type": "integer"
                  },
                  "chat_id": {
                    "type": "string"
                  },
                  "member_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  }
                },
                "required": [
                  "integration_id",
                  "chat_id",
                  "member_ids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅出现错误时返回"
                    },
                    "request_id": {
                      "type": "string",
                      "title": "请求ID，用于问题追踪"
                    }
                  },
                  "required": [
                    "request_id"
                  ]
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/incident/external-create": {
      "post": {
        "summary": "外部创建故障",
        "deprecated": false,
        "description": "",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "description": "",
            "required": true,
            "example": "354c7c77d08f50d6beaa3211fd597649",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "multipart/form-data",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "description": "故障标题",
                    "example": "",
                    "type": "string"
                  },
                  "description": {
                    "description": "故障描述",
                    "example": "",
                    "type": "string"
                  },
                  "reporter_email": {
                    "description": "提报者工作邮箱",
                    "example": "",
                    "type": "string"
                  },
                  "reporter_company": {
                    "description": "提报者公司名称",
                    "example": "",
                    "type": "string"
                  },
                  "captcha_verify_param": {
                    "description": "阿里云验证码",
                    "example": "",
                    "type": "string"
                  }
                },
                "required": [
                  "title",
                  "description",
                  "reporter_email",
                  "captcha_verify_param"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅出现错误时返回"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "incident_id": {
                          "type": "string",
                          "title": "故障ID"
                        }
                      },
                      "title": "",
                      "required": [
                        "incident_id"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": []
      }
    },
    "/incident/war-room/default-observers": {
      "post": {
        "summary": "查询默认观察者",
        "deprecated": false,
        "description": "查询历史响应人（曾被分派但当前不在响应人列表中的人员），用于创建作战室时预览将被邀请的观察者",
        "tags": [
          "故障管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incident_id": {
                    "type": "string",
                    "description": "故障ID"
                  }
                },
                "required": [
                  "incident_id"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "仅出现错误时返回"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "observers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "account_id": {
                                "type": "integer"
                              },
                              "person_id": {
                                "type": "integer"
                              },
                              "person_name": {
                                "type": "string"
                              },
                              "avatar": {
                                "type": "string"
                              },
                              "email": {
                                "type": "string"
                              },
                              "phone": {
                                "type": "string"
                              },
                              "locale": {
                                "type": "string"
                              },
                              "time_zone": {
                                "type": "string"
                              },
                              "as": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "account_id",
                              "person_id"
                            ]
                          },
                          "description": "观察者列表"
                        }
                      },
                      "required": [
                        "observers"
                      ],
                      "description": "响应数据"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/alert/card-view/delete": {
      "post": {
        "summary": "视图删除",
        "deprecated": false,
        "description": "",
        "tags": [
          "告警管理/聚合视图"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "view_id": {
                    "type": "string",
                    "title": "rule ID"
                  }
                },
                "required": [
                  "view_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/alert/card-view/list": {
      "post": {
        "summary": "视图列表",
        "deprecated": false,
        "description": "filters 说明见创建接口",
        "tags": [
          "告警管理/聚合视图"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CardView"
                          }
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/alert/card-view/create": {
      "post": {
        "summary": "视图创建",
        "deprecated": false,
        "description": "",
        "tags": [
          "告警管理/聚合视图"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "view_name": {
                    "type": "string",
                    "title": "策略名称"
                  },
                  "equals": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "以label.开头的是label项，其他是属性项，支持集成data_source_id、严重程度alert_severity、标题title、告警状态alert_status"
                    },
                    "title": "相同项"
                  }
                },
                "required": [
                  "equals"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "view_id": {
                          "type": "string",
                          "title": "ID"
                        }
                      },
                      "required": [
                        "view_id"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/alert/card-view/update": {
      "post": {
        "summary": "视图更新",
        "deprecated": false,
        "description": "",
        "tags": [
          "告警管理/聚合视图"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "view_id": {
                    "type": "string",
                    "title": "策略id",
                    "description": "更新时必传"
                  },
                  "view_name": {
                    "type": "string",
                    "title": "策略名称"
                  },
                  "equals": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "以label.开头的是label项，其他是属性项，支持集成data_source_id、严重程度alert_severity、标题title、告警状态alert_status"
                    },
                    "title": "相同项"
                  }
                },
                "required": [
                  "view_id",
                  "view_name",
                  "equals"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "rule_id": {
                          "type": "string",
                          "title": "ID"
                        }
                      },
                      "required": [
                        "rule_id"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/alert/info": {
      "post": {
        "summary": "告警详情",
        "deprecated": false,
        "description": "",
        "tags": [
          "告警管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "alert_id": {
                    "type": "string",
                    "title": "告警ID"
                  }
                },
                "required": [
                  "alert_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "title": "错误信息"
                    },
                    "data": {
                      "title": "数据对象",
                      "$ref": "#/components/schemas/Alert"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/alert/close": {
      "post": {
        "summary": "关闭告警",
        "deprecated": false,
        "description": "",
        "tags": [
          "告警管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "alert_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "alert_ids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "title": "错误信息"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/alert/list-by-card": {
      "post": {
        "summary": "告警列表-卡片视图",
        "deprecated": false,
        "description": "",
        "tags": [
          "告警管理"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "view_id": {
                    "type": "string",
                    "title": "视图ID"
                  },
                  "is_active": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "title": "状态筛选",
                    "description": "筛选告警状态，如果为false，则仅返回以恢复的告警，如果为true，则仅返回未恢复的告警，如果不传，则返回全部"
                  },
                  "title": {
                    "type": "string",
                    "title": "标题筛选",
                    "description": "支持精确匹配、正则匹配和通配匹配。以'/'作为前后缀的字符串将被识别为正则。 举例：指定('datacenter' IN ['bj01','sh-*','']) AND ('host' IN '/api-server-\\d+/')，可匹配到产生于'bj01'和'sh-01'、'sh-02'三个数据中心并且主机名满足'api-server-\\d+'正则的报警事件"
                  },
                  "channel_id": {
                    "type": "integer",
                    "title": "channel ID"
                  },
                  "integration_id": {
                    "type": "integer",
                    "title": "集成ID"
                  },
                  "start_time": {
                    "type": "integer",
                    "title": "开始时间戳",
                    "description": "该时间为query的start_time，与告警的start_time无关。实际检索条件为：alert.start_time<=query.end_time and alert.last_time>=query.start_time"
                  },
                  "end_time": {
                    "type": "integer",
                    "title": "结束时间",
                    "description": "该时间为query的end_time，与告警的end_time无关。实际检索条件为：alert.start_time<=query.end_time and alert.last_time>=query.start_time"
                  },
                  "alert_severity": {
                    "type": "string",
                    "title": "等级",
                    "description": "Critical，Info， Warning支持传多个，用逗号分割"
                  },
                  "is_my_channel": {
                    "type": "boolean",
                    "title": "是否我的channel",
                    "description": "仅筛选与我相关的channel下的告警"
                  },
                  "ever_muted": {
                    "type": "boolean",
                    "description": "不传查全部，传true仅返回被静默或抑制的告警，传false仅返回未被抑制过的告警",
                    "title": "是否被静默或抑制过"
                  },
                  "labels": {
                    "$ref": "#/components/schemas/Labels",
                    "title": "标签筛选",
                    "description": "支持精确匹配、正则匹配和通配匹配。以'/'作为前后缀的字符串将被识别为正则。 举例：指定('datacenter' IN ['bj01','sh-*','']) AND ('host' IN '/api-server-\\d+/')，可匹配到产生于'bj01'和'sh-01'、'sh-02'三个数据中心并且主机名满足'api-server-\\d+'正则的报警事件"
                  }
                },
                "required": [
                  "start_time",
                  "end_time",
                  "labels",
                  "view_id"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string",
                                "title": "卡片名称"
                              },
                              "total": {
                                "type": "integer",
                                "title": "告警个数"
                              },
                              "alert_severity": {
                                "type": "string",
                                "title": "最高严重程度"
                              },
                              "alert_ids": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "title": "告警ID"
                              }
                            },
                            "required": [
                              "title",
                              "alert_ids",
                              "alert_severity",
                              "total"
                            ]
                          },
                          "description": "<span style=\"color: red;\">请注意，匹配超过100条数时，仅返回100条</span>"
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/alert/list": {
      "post": {
        "summary": "告警列表",
        "deprecated": false,
        "description": "",
        "tags": [
          "告警管理"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "search_after_ctx": {
                    "type": "string",
                    "description": "游标分页，不设置为第一页。与p参数二选一。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)"
                  },
                  "p": {
                    "type": "integer",
                    "description": "传统分页，不设置从第一页开始，默认值为1，与search_after_ctx参数二选一。基于传统分页时设置，<span style=\"color: red;\">当设置p参数时，p*limit不得超过10000</span>，否则返回参数错误。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)",
                    "default": 1
                  },
                  "limit": {
                    "type": "integer",
                    "description": "分页条数。<span style=\"color: red;\">当设置p参数时，(p-1)*limit不得超过10000</span>，否则返回参数错误。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)",
                    "maximum": 100,
                    "minimum": 0,
                    "default": 20
                  },
                  "asc": {
                    "title": "是否升序",
                    "type": "boolean",
                    "description": "默认按照created_at倒序"
                  },
                  "orderby": {
                    "type": "string",
                    "title": "排序依据",
                    "description": "支持created_at updated_at，默认为created_at"
                  },
                  "title": {
                    "type": "string",
                    "title": "标题筛选",
                    "description": "支持精确匹配、正则匹配和通配匹配。以'/'作为前后缀的字符串将被识别为正则。 举例：指定('datacenter' IN ['bj01','sh-*','']) AND ('host' IN '/api-server-\\d+/')，可匹配到产生于'bj01'和'sh-01'、'sh-02'三个数据中心并且主机名满足'api-server-\\d+'正则的报警事件"
                  },
                  "alert_severity": {
                    "type": "string",
                    "title": "等级",
                    "description": "Critical，Info， Warning支持传多个，用逗号分割"
                  },
                  "is_active": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "title": "是否活跃",
                    "description": "筛选告警状态，如果为false，则仅返回以恢复的告警，如果为true，则仅返回未恢复的告警，如果不传，则返回全部"
                  },
                  "labels": {
                    "title": "标签筛选",
                    "description": "支持精确匹配、正则匹配和通配匹配。以'/'作为前后缀的字符串将被识别为正则。 举例：指定('datacenter' IN ['bj01','sh-*','']) AND ('host' IN '/api-server-\\d+/')，可匹配到产生于'bj01'和'sh-01'、'sh-02'三个数据中心并且主机名满足'api-server-\\d+'正则的报警事件",
                    "$ref": "#/components/schemas/Labels"
                  },
                  "channel_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "协作空间列表"
                  },
                  "integration_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "集成来源列表"
                  },
                  "alert_keys": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "alertKey"
                  },
                  "ever_muted": {
                    "type": "boolean",
                    "title": "是否被静默或抑制过",
                    "description": "不传查全部，传true仅返回被静默或抑制的告警，传false仅返回未被抑制过的告警"
                  },
                  "start_time": {
                    "type": "integer",
                    "title": "开始时间戳",
                    "description": "该时间为query的start_time，与告警的start_time无关。实际检索条件为：alert.start_time<=query.end_time and alert.last_time>=query.start_time"
                  },
                  "end_time": {
                    "type": "integer",
                    "title": "结束时间",
                    "description": "该时间为query的end_time，与告警的end_time无关。实际检索条件为：alert.start_time<=query.end_time and alert.last_time>=query.start_time"
                  }
                },
                "required": [
                  "start_time",
                  "end_time"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Alert"
                          },
                          "title": "告警条目"
                        },
                        "search_after_ctx": {
                          "type": "string",
                          "description": "游标分页，有此项说明有下一页。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)"
                        },
                        "total": {
                          "type": "integer",
                          "description": "匹配条目总数。请注意，<span style=\"color: red;\">total仅在小于1000时精确，请不要使用该值来计算分页是否结束。</span>当总条数大于1000时，系统仅会返回total=1000，代表系统匹配到了1000+数据。请使用hax_next_page来判断是否还有数据未获取。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)"
                        },
                        "has_next_page": {
                          "type": "boolean",
                          "description": "是否存在更多数据未获取"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/alert/list-by-ids": {
      "post": {
        "summary": "告警列表-按ID查询",
        "deprecated": false,
        "description": "",
        "tags": [
          "告警管理"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "alert_ids": {
                    "title": "告警ID列表",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "alert_ids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Alert"
                          }
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/alert/event/list": {
      "post": {
        "summary": "关联-事件列表",
        "deprecated": false,
        "description": "",
        "tags": [
          "告警管理"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "alert_id": {
                    "type": "string",
                    "title": "告警ID"
                  }
                },
                "required": [
                  "alert_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/AlertEvent"
                          }
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/alert/feed": {
      "post": {
        "summary": "时间线",
        "deprecated": false,
        "description": "",
        "tags": [
          "告警管理"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "alert_id": {
                    "title": "告警ID",
                    "type": "string"
                  },
                  "p": {
                    "type": "integer",
                    "description": "页码，从1开始"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "分页条数"
                  },
                  "asc": {
                    "type": "boolean",
                    "description": "是否升序"
                  },
                  "types": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "a_new",
                        "a_update",
                        "a_close",
                        "a_comm",
                        "a_merge",
                        "a_m_silence",
                        "a_m_inhibit"
                      ]
                    },
                    "title": "记录类型"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/AlertAction"
                          }
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/alert/merge": {
      "post": {
        "summary": "合并到故障",
        "deprecated": false,
        "description": "该接口仅负责合并到一个已有故障，如果是新建，请用”故障管理-故障创建“接口",
        "tags": [
          "告警管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "alert_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "告警列表"
                  },
                  "incident_id": {
                    "type": "string",
                    "title": "故障ID"
                  },
                  "comment": {
                    "type": "string",
                    "title": "评论"
                  },
                  "title": {
                    "type": "string",
                    "title": "新标题"
                  }
                },
                "required": [
                  "alert_ids",
                  "incident_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "title": "错误信息"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/alert-event/list": {
      "post": {
        "summary": "事件列表",
        "deprecated": false,
        "description": "",
        "tags": [
          "告警事件"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integration_types": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "集成类型"
                  },
                  "integration_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "集成id"
                  },
                  "channel_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "协作空间id"
                  },
                  "start_time": {
                    "type": "integer",
                    "title": "事件最早发生时间"
                  },
                  "end_time": {
                    "type": "integer",
                    "title": "事件最晚发生时间"
                  },
                  "severities": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "事件等级",
                    "description": "Critical，Info，Warning，支持传多个"
                  },
                  "orderby": {
                    "type": "string",
                    "title": "排序",
                    "description": "默认按照event_time倒序"
                  },
                  "search_after_ctx": {
                    "type": "string",
                    "description": "游标分页，不设置为第一页。与p参数二选一。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)"
                  },
                  "p": {
                    "type": "integer",
                    "description": "传统分页，不设置从第一页开始，默认值为1，与search_after_ctx参数二选一。基于传统分页时设置，<span style=\"color: red;\">当设置p参数时，p*limit不得超过10000</span>，否则返回参数错误。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)",
                    "default": 1
                  },
                  "limit": {
                    "type": "integer",
                    "description": "分页条数。<span style=\"color: red;\">当设置p参数时，(p-1)*limit不得超过10000</span>，否则返回参数错误。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)",
                    "maximum": 100,
                    "minimum": 0,
                    "default": 20
                  }
                },
                "required": [
                  "start_time",
                  "end_time"
                ]
              },
              "example": ""
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/AlertEvent"
                          }
                        },
                        "search_after_ctx": {
                          "type": "string",
                          "description": "游标分页，有此项说明有下一页。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)"
                        },
                        "total": {
                          "type": "integer",
                          "description": "匹配条目总数。请注意，<span style=\"color: red;\">total仅在小于1000时精确，请不要使用该值来计算分页是否结束。</span>当总条数大于1000时，系统仅会返回total=1000，代表系统匹配到了1000+数据。请使用hax_next_page来判断是否还有数据未获取。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)"
                        },
                        "has_next_page": {
                          "type": "boolean",
                          "description": "是否存在更多数据未获取"
                        }
                      },
                      "required": [
                        "items"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "错误码。枚举值：InvalidParameter、Unauthorized、AccessDenied、ResourceNotFound、InternalError 等。"
                        },
                        "message": {
                          "type": "string",
                          "description": "错误描述。"
                        }
                      },
                      "required": [
                        "code"
                      ]
                    }
                  },
                  "required": [
                    "request_id"
                  ]
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/change/list": {
      "post": {
        "summary": "变更列表",
        "deprecated": false,
        "description": "",
        "tags": [
          "变更管理"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "p": {
                    "type": "integer",
                    "description": "页码，从1开始，不传默认为1"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "分页条数，不传默认为10"
                  },
                  "start_time": {
                    "type": "integer",
                    "title": "开始时间",
                    "description": "start_time和end_time同时不传，则默认查询过去1小时"
                  },
                  "end_time": {
                    "type": "integer",
                    "title": "结束时间",
                    "description": "start_time和end_time同时不传，则默认查询过去1小时"
                  },
                  "filters": {
                    "title": "过滤条件",
                    "$ref": "#/components/schemas/OrFilters"
                  },
                  "include_events": {
                    "type": "boolean",
                    "description": "是否同时返回change_event"
                  },
                  "integration_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "变更数据集成id"
                  },
                  "channel_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "协作空间id"
                  },
                  "order_by": {
                    "type": "string",
                    "enum": [
                      "start_time",
                      "last_time"
                    ],
                    "description": "默认按start_time排序"
                  },
                  "asc": {
                    "type": "boolean",
                    "description": "是否升序，默认降序"
                  },
                  "query": {
                    "type": "string",
                    "description": "支持正则表达式，支持筛选标题、描述、change_key"
                  }
                }
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Change"
                          },
                          "title": "变更条目"
                        },
                        "has_next_page": {
                          "type": "boolean",
                          "title": "是否有下一页"
                        },
                        "total": {
                          "type": "integer",
                          "title": "总条目数"
                        }
                      },
                      "required": [
                        "items",
                        "has_next_page",
                        "total"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/field/list": {
      "post": {
        "summary": "字段列表",
        "deprecated": false,
        "description": "",
        "tags": [
          "自定义字段"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Field1"
                          }
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/field/info": {
      "post": {
        "summary": "字段详情",
        "deprecated": false,
        "description": "filters 说明见创建接口",
        "tags": [
          "自定义字段"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "field_id": {
                    "type": "string",
                    "title": "字段ID"
                  }
                },
                "required": [
                  "field_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Field1"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/field/delete": {
      "post": {
        "summary": "字段删除",
        "deprecated": false,
        "description": "",
        "tags": [
          "自定义字段"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "field_id": {
                    "type": "string",
                    "title": "字段ID"
                  }
                },
                "required": [
                  "field_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/field/create": {
      "post": {
        "summary": "字段创建",
        "deprecated": false,
        "description": "",
        "tags": [
          "自定义字段"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "field_name": {
                    "type": "string",
                    "title": "字段名称",
                    "description": "需要满足正则^[a-zA-Z_][a-zA-Z0-9_]{0,39}$",
                    "maxLength": 40
                  },
                  "display_name": {
                    "type": "string",
                    "title": "显示名称",
                    "maxLength": 40
                  },
                  "description": {
                    "type": "string",
                    "title": "描述",
                    "maxLength": 500
                  },
                  "field_type": {
                    "type": "string",
                    "title": "字段类型",
                    "enum": [
                      "text",
                      "single_select",
                      "multi_select",
                      "checkbox"
                    ]
                  },
                  "value_type": {
                    "type": "string",
                    "title": "值类型",
                    "enum": [
                      "string",
                      "bool"
                    ]
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": [
                        "string",
                        "integer",
                        "boolean",
                        "array",
                        "object",
                        "number",
                        "null"
                      ],
                      "description": "如果为字符串，长度不可超过200字符"
                    },
                    "title": "可选值",
                    "description": "数组内元素不可重复，且类型满足value_type定义"
                  },
                  "default_value": {
                    "type": [
                      "string",
                      "integer",
                      "boolean",
                      "array",
                      "object",
                      "number",
                      "null"
                    ],
                    "title": "默认值",
                    "description": "类型满足value_type定义，当field_type为text，value_type为string，长度不可超过500字符，其他情况不可超过200字符"
                  }
                },
                "required": [
                  "field_name",
                  "field_type",
                  "display_name",
                  "value_type"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "field_id": {
                          "type": "string",
                          "title": "ID"
                        },
                        "field_name": {
                          "type": "string",
                          "title": "名称"
                        }
                      },
                      "required": [
                        "field_id",
                        "field_name"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/field/update": {
      "post": {
        "summary": "字段更新",
        "deprecated": false,
        "description": "",
        "tags": [
          "自定义字段"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "field_id": {
                    "type": "string",
                    "title": "字段ID"
                  },
                  "display_name": {
                    "type": "string",
                    "title": "显示名称"
                  },
                  "description": {
                    "type": "string",
                    "title": "描述"
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": [
                        "string",
                        "integer",
                        "boolean",
                        "array",
                        "object",
                        "number",
                        "null"
                      ]
                    },
                    "title": "可选值",
                    "description": "数组内元素不可重复，且类型满足value_type定义"
                  },
                  "default_value": {
                    "type": [
                      "string",
                      "integer",
                      "boolean",
                      "array",
                      "object",
                      "number",
                      "null"
                    ],
                    "title": "默认值",
                    "description": "类型满足value_type定义"
                  }
                },
                "required": [
                  "field_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/calendar/list": {
      "post": {
        "summary": "日历列表",
        "deprecated": false,
        "description": "",
        "tags": [
          "服务日历"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "personal",
                      "region.official.holiday"
                    ],
                    "title": "日历类型，默认为personal，如需获取节假日需要指定"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Calendar"
                          },
                          "title": "channel条目"
                        },
                        "total": {
                          "type": "integer",
                          "title": "总条目数"
                        }
                      },
                      "required": [
                        "items",
                        "total"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/calendar/info": {
      "post": {
        "summary": "日历详情",
        "deprecated": false,
        "description": "",
        "tags": [
          "服务日历"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cal_id": {
                    "type": "string",
                    "title": "日历ID",
                    "description": "仅能获取personal类型的日历详情"
                  }
                },
                "required": [
                  "cal_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Calendar"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/calendar/create": {
      "post": {
        "summary": "日历创建",
        "deprecated": false,
        "description": "",
        "tags": [
          "服务日历"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "team_id": {
                    "type": "integer",
                    "title": "管理团队ID，如果为0，代表仅创建者和主体账户可以修改配置"
                  },
                  "cal_name": {
                    "type": "string",
                    "title": "日历名称，长度限制[1,40]字节",
                    "maxLength": 40
                  },
                  "description": {
                    "type": "string",
                    "title": "日历描述，长度限制长度限制[1,500]字节",
                    "maxLength": 500
                  },
                  "timezone": {
                    "type": "string",
                    "title": "日历时区，格式要求：需满足 IANA Time Zone Database 中的时区定义",
                    "description": "示例值：\"Asia/Shanghai\"  默认值：\"Asia/Shanghai\""
                  },
                  "workdays": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "enum": [
                        0,
                        1,
                        2,
                        3,
                        4,
                        5,
                        6
                      ],
                      "description": "周日=0"
                    },
                    "title": "工作日列表，如果列表为空，代表全周都是工作日。枚举值1，2，3，4，5，6，7代表周一至周日"
                  },
                  "extra_cal_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "关联的其他日历ID列表，比如中国大陆法定假日"
                  }
                },
                "required": [
                  "cal_name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "cal_id": {
                          "type": "string",
                          "title": "日历ID"
                        },
                        "cal_name": {
                          "type": "string",
                          "title": "日历名称"
                        }
                      },
                      "required": [
                        "cal_id",
                        "cal_name"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/calendar/update": {
      "post": {
        "summary": "日历更新",
        "deprecated": false,
        "description": "",
        "tags": [
          "服务日历"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "team_id": {
                    "type": "integer",
                    "title": "管理团队ID，如果为0，代表仅创建者和主体账户可以修改配置",
                    "description": "不传不更新"
                  },
                  "cal_id": {
                    "type": "string",
                    "title": "日历ID"
                  },
                  "cal_name": {
                    "type": "string",
                    "title": "日历名称，长度限制[1,40]字节",
                    "maxLength": 40,
                    "description": "不传不更新"
                  },
                  "description": {
                    "type": "string",
                    "title": "日历描述，长度限制长度限制[1,500]字节",
                    "maxLength": 500,
                    "description": "不传不更新"
                  },
                  "timezone": {
                    "type": "string",
                    "title": "日历时区，格式要求：需满足 IANA Time Zone Database 中的时区定义",
                    "description": "示例值：\"Asia/Shanghai\"  默认值：\"Asia/Shanghai\"，不传不更新"
                  },
                  "workdays": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "description": "周日=0",
                      "enum": [
                        0,
                        1,
                        2,
                        3,
                        4,
                        5,
                        6
                      ]
                    },
                    "title": "工作日列表，如果列表为空，代表全周都是工作日。枚举值1，2，3，4，5，6，7代表周一至周日",
                    "description": "不传不更新"
                  },
                  "extra_cal_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "关联的其他日历ID列表，比如中国大陆法定假日",
                    "description": "不传不更新"
                  }
                },
                "required": [
                  "cal_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/calendar/delete": {
      "post": {
        "summary": "日历删除",
        "deprecated": false,
        "description": "",
        "tags": [
          "服务日历"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cal_id": {
                    "type": "string",
                    "title": "日历ID"
                  }
                },
                "required": [
                  "cal_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "refs": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Reference"
                          },
                          "title": "关联资源列表"
                        }
                      },
                      "required": [
                        "refs"
                      ],
                      "description": "仅code=ReferenceExist时存在"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/calendar/event/upsert": {
      "post": {
        "summary": "日历事件设置",
        "deprecated": false,
        "description": "",
        "tags": [
          "服务日历"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cal_id": {
                    "type": "string",
                    "title": "日历ID"
                  },
                  "event_id": {
                    "type": "string",
                    "title": "事件ID",
                    "description": "更新时传入"
                  },
                  "summary": {
                    "type": "string",
                    "title": "日历名称，长度限制[1,40]字节",
                    "maxLength": 40,
                    "minLength": 1
                  },
                  "description": {
                    "type": "string",
                    "title": "日历描述，长度限制长度限制[1,500]字节",
                    "maxLength": 500
                  },
                  "is_off": {
                    "type": "boolean",
                    "title": "是否工作日，false为工作日"
                  },
                  "start_at": {
                    "type": "string",
                    "title": "开始时间",
                    "description": "示例值：\"2018-09-01\""
                  },
                  "end_at": {
                    "type": "string",
                    "title": "结束时间",
                    "description": "示例值：\"2018-09-02\""
                  }
                },
                "required": [
                  "start_at",
                  "summary",
                  "cal_id",
                  "end_at",
                  "is_off"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "cal_id": {
                          "type": "string",
                          "title": "日历ID"
                        },
                        "cal_name": {
                          "type": "string",
                          "title": "日历名称"
                        }
                      },
                      "required": [
                        "cal_id",
                        "cal_name"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/calendar/event/delete": {
      "post": {
        "summary": "日历事件删除",
        "deprecated": false,
        "description": "",
        "tags": [
          "服务日历"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cal_id": {
                    "type": "string",
                    "title": "日历ID"
                  },
                  "event_id": {
                    "type": "string",
                    "title": "事件ID"
                  }
                },
                "required": [
                  "cal_id",
                  "event_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/calendar/event/list": {
      "post": {
        "summary": "日历事件列表",
        "deprecated": false,
        "description": "",
        "tags": [
          "服务日历"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cal_id": {
                    "type": "string",
                    "title": "日历ID"
                  },
                  "year": {
                    "type": "integer",
                    "title": "年",
                    "description": "默认为当前年份"
                  },
                  "month": {
                    "type": "integer",
                    "title": "月",
                    "description": "默认为不设置"
                  },
                  "day": {
                    "type": "integer",
                    "title": "日",
                    "description": "默认为不设置，设置此项时必须同时设置月份"
                  }
                },
                "required": [
                  "cal_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CalendarEvent"
                          },
                          "title": "channel条目"
                        },
                        "total": {
                          "type": "integer",
                          "title": "总条目数"
                        }
                      },
                      "required": [
                        "items",
                        "total"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/enrichment/mapping/schema/list": {
      "post": {
        "summary": "查询schema",
        "deprecated": false,
        "description": "",
        "tags": [
          "标签增强/Mapping-Schema"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "title": "错误信息"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/MappingSchema"
                          },
                          "title": "条目列表"
                        },
                        "total": {
                          "type": "integer",
                          "title": "总条目数"
                        }
                      },
                      "required": [
                        "items",
                        "total"
                      ],
                      "title": "响应数据"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/enrichment/mapping/schema/create": {
      "post": {
        "summary": "创建schema",
        "deprecated": false,
        "description": "每个账户最多允许创建10个schema",
        "tags": [
          "标签增强/Mapping-Schema"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "schema_name": {
                    "type": "string",
                    "title": "表名称",
                    "maxLength": 40,
                    "minLength": 1
                  },
                  "description": {
                    "type": "string",
                    "title": "表描述",
                    "maxLength": 500
                  },
                  "source_labels": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*",
                      "maxLength": 40,
                      "minLength": 1
                    },
                    "title": "查询字段列表",
                    "maxItems": 3,
                    "minItems": 1
                  },
                  "result_labels": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*",
                      "maxLength": 40,
                      "minLength": 1
                    },
                    "title": "结果字段列表",
                    "maxItems": 10,
                    "minItems": 1
                  },
                  "team_id": {
                    "type": "integer",
                    "title": "负责团队ID"
                  }
                },
                "required": [
                  "source_labels",
                  "result_labels",
                  "schema_name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "schema_id": {
                          "type": "string",
                          "title": "schema id"
                        },
                        "schema_name": {
                          "type": "string",
                          "title": "schema 名称"
                        }
                      },
                      "required": [
                        "schema_id",
                        "schema_name"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/enrichment/mapping/schema/update": {
      "post": {
        "summary": "更新schema",
        "deprecated": false,
        "description": "",
        "tags": [
          "标签增强/Mapping-Schema"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "schema_id": {
                    "type": "string",
                    "title": "表ID"
                  },
                  "schema_name": {
                    "type": "string",
                    "title": "表名称",
                    "maxLength": 40,
                    "minLength": 1,
                    "description": "不传不更新"
                  },
                  "description": {
                    "type": "string",
                    "title": "表描述",
                    "maxLength": 500,
                    "description": "不传不更新"
                  },
                  "team_id": {
                    "type": "integer",
                    "title": "负责团队ID",
                    "description": "不传不更新"
                  }
                },
                "required": [
                  "schema_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/enrichment/mapping/schema/delete": {
      "post": {
        "summary": "删除schema",
        "deprecated": false,
        "description": "",
        "tags": [
          "标签增强/Mapping-Schema"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "schema_id": {
                    "type": "string",
                    "title": "表ID"
                  }
                },
                "required": [
                  "schema_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "title": "错误信息"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/enrichment/mapping/data/list": {
      "post": {
        "summary": "查询data",
        "deprecated": false,
        "description": "",
        "tags": [
          "标签增强/Mapping-Schema"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "schema_id": {
                    "type": "string",
                    "title": "schema ID"
                  },
                  "query": {
                    "$ref": "#/components/schemas/Labels",
                    "title": "匹配条件",
                    "description": "不设置过滤，否则query必须包含schema中source_labels中所有字段和条件"
                  },
                  "orderby": {
                    "type": "string",
                    "title": "排序依据",
                    "enum": [
                      "created_at",
                      "updated_at"
                    ]
                  },
                  "search_after_ctx": {
                    "type": "string",
                    "description": "游标分页，不设置为第一页。与p参数二选一。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)"
                  },
                  "p": {
                    "type": "integer",
                    "description": "传统分页，不设置从第一页开始，默认值为1，与search_after_ctx参数二选一。基于传统分页时设置，<span style=\"color: red;\">当设置p参数时，p*limit不得超过10000</span>，否则返回参数错误。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)",
                    "default": 1
                  },
                  "limit": {
                    "type": "integer",
                    "description": "分页条数。<span style=\"color: red;\">当设置p参数时，(p-1)*limit不得超过10000</span>，否则返回参数错误。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)",
                    "maximum": 100,
                    "minimum": 0,
                    "default": 20
                  }
                },
                "required": [
                  "schema_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "错误信息"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "description": "数据索引"
                              },
                              "fields": {
                                "$ref": "#/components/schemas/Labels",
                                "description": "字段列表"
                              },
                              "created_at": {
                                "type": "integer",
                                "description": "创建时间戳，单位秒"
                              },
                              "updated_at": {
                                "type": "integer",
                                "description": "更新时间戳，单位秒"
                              }
                            },
                            "required": [
                              "key",
                              "fields",
                              "created_at",
                              "updated_at"
                            ]
                          },
                          "description": "数据列表"
                        },
                        "search_after_ctx": {
                          "type": "string",
                          "description": "游标分页，有此项说明有下一页。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)"
                        },
                        "total": {
                          "type": "integer",
                          "description": "匹配条目总数。请注意，<span style=\"color: red;\">total仅在小于1000时精确，请不要使用该值来计算分页是否结束。</span>当总条数大于1000时，系统仅会返回total=1000，代表系统匹配到了1000+数据。请使用hax_next_page来判断是否还有数据未获取。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)"
                        },
                        "has_next_page": {
                          "type": "boolean",
                          "description": "是否存在更多数据未获取"
                        }
                      },
                      "required": [
                        "items"
                      ],
                      "description": "数据对象"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/enrichment/mapping/data/upsert": {
      "post": {
        "summary": "更新data",
        "deprecated": false,
        "description": "每个schema最大允许上传一万条数据",
        "tags": [
          "标签增强/Mapping-Schema"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "schema_id": {
                    "type": "string",
                    "title": "表ID"
                  },
                  "docs": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Labels"
                    },
                    "title": "规则列表",
                    "maxItems": 1000
                  }
                },
                "required": [
                  "docs",
                  "schema_id"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/enrichment/mapping/data/delete": {
      "post": {
        "summary": "删除data",
        "deprecated": false,
        "description": "",
        "tags": [
          "标签增强/Mapping-Schema"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "schema_id": {
                    "type": "string",
                    "title": "集成ID"
                  },
                  "keys": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "数据索引列表"
                  }
                },
                "required": [
                  "keys",
                  "schema_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/enrichment/mapping/data/truncate": {
      "post": {
        "summary": "清空data",
        "deprecated": false,
        "description": "",
        "tags": [
          "标签增强/Mapping-Schema"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "schema_id": {
                    "type": "string",
                    "title": "schema ID"
                  }
                },
                "required": [
                  "schema_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/enrichment/mapping/data/upload": {
      "post": {
        "summary": "csv上传data",
        "deprecated": false,
        "description": "",
        "tags": [
          "标签增强/Mapping-Schema"
        ],
        "parameters": [
          {
            "name": "schema_id",
            "in": "query",
            "description": "schema ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "do_not_truncate_first",
            "in": "query",
            "description": "是否先清空数据，默认清空",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "multipart/form-data",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "description": "不可以超过10MB，数据内容不超过1万行。",
                    "example": "",
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/enrichment/mapping/data/download": {
      "post": {
        "summary": "csv下载data",
        "deprecated": false,
        "description": "",
        "tags": [
          "标签增强/Mapping-Schema"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "schema_id": {
                    "type": "string",
                    "title": "schema ID"
                  }
                },
                "required": [
                  "schema_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/enrichment/mapping/api/list": {
      "post": {
        "summary": "查询api",
        "deprecated": false,
        "description": "",
        "tags": [
          "标签增强/Mapping-Api"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "title": "错误信息"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/MappingApi"
                          },
                          "title": "条目列表"
                        },
                        "total": {
                          "type": "integer",
                          "title": "总条目数"
                        }
                      },
                      "required": [
                        "items",
                        "total"
                      ],
                      "title": "响应数据"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/enrichment/mapping/api/create": {
      "post": {
        "summary": "创建api",
        "deprecated": false,
        "description": "",
        "tags": [
          "标签增强/Mapping-Api"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "api_name": {
                    "type": "string",
                    "description": "Api 名称，限制长度200字符"
                  },
                  "team_id": {
                    "type": "integer",
                    "description": "负责团队ID"
                  },
                  "url": {
                    "type": "string",
                    "description": "URL，访问地址，限制长度500字符"
                  },
                  "insecure_skip_verify": {
                    "type": "boolean",
                    "description": "是否跳过secure verify"
                  },
                  "headers": {
                    "type": "object",
                    "description": "自定义 Headers。已启用安全黑名单机制，禁止填写身份鉴权、IP伪造及协议控制类敏感字段。key 最长 1024字节，value 最长 4096字节",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "patternProperties": {
                      "^(?i)(authorization|proxy-authorization|cookie|x-api-key|x-access-token|x-forwarded-for|x-real-ip|true-client-ip|x-client-ip|host|x-forwarded-host|x-forwarded-proto|x-internal-id|x-user-id|transfer-encoding|upgrade|connection)$": {
                        "not": {}
                      }
                    },
                    "properties": {}
                  },
                  "timeout": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "超时时间，单位 秒，默认 2s， 取值范围 1~ 3 秒",
                    "minimum": 1,
                    "maximum": 3
                  },
                  "retry_count": {
                    "type": "integer",
                    "description": "重试次数，取值范围 0~1 次",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "description": {
                    "type": "string",
                    "description": "描述信息，超长500字符自动截断"
                  }
                },
                "required": [
                  "api_name",
                  "url"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "title": "错误信息"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/enrichment/mapping/api/update": {
      "post": {
        "summary": "更新api",
        "deprecated": false,
        "description": "",
        "tags": [
          "标签增强/Mapping-Api"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "api_id": {
                    "type": "string",
                    "description": "Api ID"
                  },
                  "api_name": {
                    "type": "string",
                    "description": "Api 名称，限制长度200字符"
                  },
                  "team_id": {
                    "type": "integer",
                    "description": "负责团队ID"
                  },
                  "url": {
                    "type": "string",
                    "description": "URL，访问地址，限制长度500字符"
                  },
                  "insecure_skip_verify": {
                    "type": "boolean",
                    "description": "是否跳过secure verify"
                  },
                  "headers": {
                    "type": "object",
                    "description": "自定义 Headers。已启用安全黑名单机制，禁止填写身份鉴权、IP伪造及协议控制类敏感字段。key 最长 1024字节，value 最长 4096字节",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "patternProperties": {
                      "^(?i)(authorization|proxy-authorization|cookie|x-api-key|x-access-token|x-forwarded-for|x-real-ip|true-client-ip|x-client-ip|host|x-forwarded-host|x-forwarded-proto|x-internal-id|x-user-id|transfer-encoding|upgrade|connection)$": {
                        "not": {}
                      }
                    },
                    "properties": {}
                  },
                  "timeout": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "超时时间，单位 秒，默认 2s， 取值范围 1~ 3 秒",
                    "minimum": 1,
                    "maximum": 3
                  },
                  "retry_count": {
                    "type": "integer",
                    "description": "重试次数，取值范围 0~1 次",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "description": {
                    "type": "string",
                    "description": "描述信息，超长500字符自动截断"
                  }
                },
                "required": [
                  "api_id",
                  "api_name",
                  "url"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "title": "错误信息"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/enrichment/mapping/api/delete": {
      "post": {
        "summary": "删除api",
        "deprecated": false,
        "description": "",
        "tags": [
          "标签增强/Mapping-Api"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "api_id": {
                    "type": "string",
                    "description": "Api ID"
                  }
                },
                "required": [
                  "api_id"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "title": "错误信息"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/enrichment/info": {
      "post": {
        "summary": "规则详情",
        "deprecated": false,
        "description": "",
        "tags": [
          "标签增强"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integration_id": {
                    "type": "integer",
                    "title": "集成ID"
                  }
                },
                "required": [
                  "integration_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Enrichment"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/enrichment/upsert": {
      "post": {
        "summary": "规则更新",
        "deprecated": false,
        "description": "",
        "tags": [
          "标签增强"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integration_id": {
                    "type": "integer",
                    "title": "集成ID"
                  },
                  "rules": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "title": "规则类型",
                          "enum": [
                            "extraction",
                            "composition",
                            "mapping",
                            "drop"
                          ]
                        },
                        "if": {
                          "$ref": "#/components/schemas/AndFilters",
                          "title": "过滤条件，为空代表全部匹配"
                        },
                        "settings": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/ERuleExtraction"
                            },
                            {
                              "$ref": "#/components/schemas/ERuleComposition"
                            },
                            {
                              "$ref": "#/components/schemas/ERuleMapping"
                            },
                            {
                              "$ref": "#/components/schemas/ERuleDrop"
                            }
                          ]
                        }
                      },
                      "required": [
                        "kind",
                        "settings"
                      ]
                    },
                    "title": "规则列表",
                    "description": "规则将按照顺序依次执行"
                  }
                },
                "required": [
                  "rules",
                  "integration_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/alert/pipeline/info": {
      "post": {
        "summary": "规则详情",
        "deprecated": false,
        "description": "",
        "tags": [
          "告警处理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integration_id": {
                    "type": "integer",
                    "title": "集成ID"
                  }
                },
                "required": [
                  "integration_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "$ref": "#/components/schemas/AlertProcessingRule"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/alert/pipeline/upsert": {
      "post": {
        "summary": "规则更新",
        "deprecated": false,
        "description": "",
        "tags": [
          "告警处理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integration_id": {
                    "type": "integer",
                    "title": "集成ID"
                  },
                  "rules": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "title": "规则类型",
                          "description": "规则将按照顺序依次执行",
                          "enum": [
                            "title_reset",
                            "description_reset",
                            "severity_reset",
                            "alert_drop",
                            "alert_inhibit"
                          ]
                        },
                        "if": {
                          "$ref": "#/components/schemas/AndFilters",
                          "title": "过滤条件，为空代表全部匹配"
                        },
                        "settings": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/APRuleTitleReset"
                            },
                            {
                              "$ref": "#/components/schemas/APRuleDescriptionReset"
                            },
                            {
                              "$ref": "#/components/schemas/APRuleSeverityReset"
                            },
                            {
                              "$ref": "#/components/schemas/APRuleAlertDrop"
                            },
                            {
                              "$ref": "#/components/schemas/APRuleAlertInhibit"
                            }
                          ],
                          "title": "规则配置",
                          "description": "不同规则类型配置不同"
                        }
                      },
                      "required": [
                        "kind",
                        "settings"
                      ]
                    },
                    "title": "规则列表"
                  }
                },
                "required": [
                  "rules",
                  "integration_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/route/history/list": {
      "post": {
        "summary": "路由历史列表",
        "deprecated": false,
        "description": "",
        "tags": [
          "集成中心/告警集成"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "p": {
                    "type": "integer",
                    "description": "页码，从1开始"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "分页条数"
                  },
                  "asc": {
                    "type": "boolean",
                    "description": "是否升序"
                  },
                  "orderby": {
                    "type": "string",
                    "description": "排序依据",
                    "enum": [
                      "updated_at"
                    ]
                  },
                  "integration_id": {
                    "type": "string",
                    "title": "共享告警集成ID"
                  }
                },
                "required": [
                  "integration_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {}
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/RouteHistory"
                          }
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/route/list": {
      "post": {
        "summary": "路由列表",
        "deprecated": false,
        "description": "",
        "tags": [
          "集成中心/告警集成"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integration_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "共享告警集成ID列表"
                  }
                },
                "required": [
                  "integration_ids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {}
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Route"
                          }
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/route/info": {
      "post": {
        "summary": "路由详情",
        "deprecated": false,
        "description": "",
        "tags": [
          "集成中心/告警集成"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integration_id": {
                    "type": "integer",
                    "title": "共享告警集成ID"
                  }
                },
                "required": [
                  "integration_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {}
                    },
                    "data": {
                      "$ref": "#/components/schemas/Route"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/route/upsert": {
      "post": {
        "summary": "路由更新",
        "deprecated": false,
        "description": "",
        "tags": [
          "集成中心/告警集成"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integration_id": {
                    "type": "integer",
                    "title": "共享告警集成ID"
                  },
                  "default": {
                    "type": "object",
                    "properties": {
                      "channel_ids": {
                        "type": "array",
                        "items": {
                          "type": "integer"
                        },
                        "title": "协作空间列表"
                      }
                    },
                    "title": "默认路由",
                    "required": [
                      "channel_ids"
                    ],
                    "description": "与条件路由至少传一个"
                  },
                  "version": {
                    "type": "integer",
                    "title": "版本号"
                  },
                  "cases": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/RouteCase"
                    },
                    "title": "条件路由",
                    "description": "与默认路由至少传一个"
                  },
                  "sections": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/RouteSection"
                    }
                  }
                },
                "required": [
                  "integration_id",
                  "version"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/route/preview": {
      "post": {
        "summary": "路由预览",
        "deprecated": false,
        "description": "",
        "tags": [
          "集成中心/告警集成"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "alert_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "告警IDs",
                    "description": "最多20个"
                  },
                  "route": {
                    "type": "object",
                    "properties": {
                      "cases": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/RouteCase"
                        },
                        "title": "条件路由",
                        "description": "与默认路由二者至少存在一个"
                      },
                      "default": {
                        "type": "object",
                        "properties": {
                          "channel_ids": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            }
                          }
                        },
                        "title": "默认路由",
                        "required": [
                          "channel_ids"
                        ],
                        "description": "与条件路由二者至少存在一个"
                      }
                    }
                  }
                },
                "required": [
                  "alert_ids",
                  "route"
                ]
              },
              "example": {
                "alert_ids": [
                  "98",
                  "88",
                  "65"
                ],
                "cases": [
                  {
                    "if": [
                      {
                        "key": "laboris",
                        "oper": "ipsum sunt",
                        "vals": [
                          "aliquip proident amet",
                          "sed cillum irure tempor anim",
                          "sunt sint occaecat aliqua anim"
                        ]
                      }
                    ],
                    "channel_ids": [
                      46
                    ],
                    "fallthrough": false,
                    "routing_mode": "ut Ut Excepteur commodo",
                    "name_mapping_label": "谬磊"
                  },
                  {
                    "if": [
                      {
                        "key": "nostrud ex minim ad",
                        "oper": "sunt minim consequat est elit",
                        "vals": [
                          "cillum consectetur nostrud dolore deserunt"
                        ]
                      }
                    ],
                    "channel_ids": [
                      8
                    ],
                    "fallthrough": false,
                    "routing_mode": "elit laborum voluptate velit",
                    "name_mapping_label": "僪斌"
                  },
                  {
                    "if": [
                      {
                        "key": "ad proident culpa",
                        "oper": "consectetur officia Excepteur deserunt",
                        "vals": [
                          "non voluptate in quis",
                          "voluptate eu et"
                        ]
                      },
                      {
                        "key": "Duis dolore culpa",
                        "oper": "reprehenderit laboris",
                        "vals": [
                          "sit exercitation",
                          "occaecat pariatur veniam officia nulla",
                          "sit consectetur amet ad"
                        ]
                      },
                      {
                        "key": "ut sed fugiat sunt mollit",
                        "oper": "anim irure ullamco sit Ut",
                        "vals": [
                          "sit ipsum est reprehenderit"
                        ]
                      }
                    ],
                    "channel_ids": [
                      19,
                      68
                    ],
                    "fallthrough": false,
                    "routing_mode": "mollit eu",
                    "name_mapping_label": "盈超"
                  }
                ],
                "default": {
                  "channel_ids": [
                    78,
                    40
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {}
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "alert_id": {
                                "type": "string",
                                "description": "告警ID"
                              },
                              "alert_title": {
                                "type": "string",
                                "description": "告警标题"
                              },
                              "start_time": {
                                "type": "integer",
                                "description": "开始时间，秒时间戳"
                              },
                              "matched_cases": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "^(case_\\d+|default)$",
                                  "description": "取值为 case_n (如 case_0, case_10) 或 default"
                                },
                                "description": "匹配的Cases列表，取值为 case_n (如 case_0, case_10) 或 default"
                              }
                            }
                          }
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/datasource/upsert": {
      "post": {
        "summary": "集成Upsert",
        "deprecated": false,
        "description": "",
        "tags": [
          "集成中心/Webhook"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integration_id": {
                    "type": "integer",
                    "description": "集成ID"
                  },
                  "team_id": {
                    "type": "integer",
                    "description": "团队ID，未配置时为0"
                  },
                  "name": {
                    "type": "string",
                    "description": "集成名称"
                  },
                  "plugin_id": {
                    "type": "integer",
                    "description": "集成类型ID",
                    "enum": [
                      302
                    ]
                  },
                  "description": {
                    "type": "string",
                    "description": "集成描述"
                  },
                  "settings": {
                    "type": "object",
                    "properties": {
                      "channel_ids": {
                        "type": "array",
                        "items": {
                          "type": "integer"
                        },
                        "description": "生效的协作空间"
                      },
                      "endpoint": {
                        "type": "string",
                        "description": "回调地址"
                      },
                      "event_types": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "事件类型，参考：https://developer.flashcat.cloud/zh/flashduty/webhook/incident-webhook"
                      },
                      "headers": {
                        "type": "object",
                        "properties": {},
                        "description": "请求头"
                      }
                    },
                    "description": "集成配置信息",
                    "required": [
                      "channel_ids",
                      "endpoint",
                      "event_types",
                      "headers"
                    ]
                  }
                },
                "required": [
                  "integration_id",
                  "name",
                  "plugin_id",
                  "settings"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "title": "错误信息，仅出错时存在"
                    },
                    "request_id": {
                      "type": "string",
                      "title": "请求ID，用于问题追踪"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "integration_id": {
                          "type": "integer"
                        },
                        "integration_key": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "integration_id",
                        "integration_key"
                      ]
                    }
                  },
                  "required": [
                    "request_id",
                    "data"
                  ]
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/datasource/list": {
      "post": {
        "summary": "集成列表",
        "deprecated": false,
        "description": "",
        "tags": [
          "集成中心"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "p": {
                    "type": "integer",
                    "description": "不设置从第一页开始，默认值为1"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "分页条数，最大值100"
                  },
                  "orderby": {
                    "type": "string",
                    "description": "指定排序字段"
                  },
                  "category": {
                    "type": "string",
                    "description": "集成类别",
                    "enum": [
                      "event.alert",
                      "im",
                      "webhook",
                      "event.change",
                      "other"
                    ]
                  },
                  "plugin_type": {
                    "type": "string",
                    "description": "集成类型名称，如Prometheus 、 Zabbix、Grafana、夜莺 / Flashcat 等控制台列表显示的名称"
                  },
                  "status": {
                    "type": "string",
                    "description": "状态"
                  },
                  "name": {
                    "type": "string",
                    "description": "集成名称"
                  },
                  "asc": {
                    "type": "boolean",
                    "description": "是否排序"
                  },
                  "is_my_team": {
                    "type": "boolean",
                    "description": "按‘我管理的团队’筛选"
                  },
                  "team_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "团队ID "
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {}
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Integration"
                      }
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/datasource/desc": {
      "post": {
        "summary": "集成详情",
        "deprecated": false,
        "description": "",
        "tags": [
          "集成中心"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integration_id": {
                    "type": "integer",
                    "description": "集成ID"
                  },
                  "integration_key": {
                    "type": "integer",
                    "description": "集成Key"
                  }
                },
                "required": [
                  "integration_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {}
                    },
                    "data": {
                      "$ref": "#/components/schemas/Integration"
                    },
                    "": {
                      "type": "string"
                    }
                  },
                  "required": [
                    ""
                  ]
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/oncall/license/list": {
      "post": {
        "summary": "License成员列表",
        "deprecated": false,
        "description": "",
        "tags": [
          "License管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              },
              "example": {
                "person_id": 33579933921311
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "description": "总数量"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "person_id": {
                                "type": "integer",
                                "description": "成员ID"
                              },
                              "person_name": {
                                "type": "string",
                                "description": "成员名称"
                              },
                              "status": {
                                "type": "string",
                                "description": "状态"
                              },
                              "type": {
                                "type": "string",
                                "description": "License类型",
                                "enum": [
                                  "fixed",
                                  "temporary",
                                  "none"
                                ]
                              },
                              "updated_by": {
                                "type": "integer",
                                "description": "更新人ID，仅固定License存在"
                              },
                              "created_at": {
                                "type": "string",
                                "description": "创建时间，仅固定License存在"
                              },
                              "updated_at": {
                                "type": "string",
                                "description": "更新时间，仅固定License存在"
                              }
                            },
                            "required": [
                              "type"
                            ]
                          }
                        }
                      },
                      "required": [
                        "total"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/insight/alert/topk-by-label": {
      "post": {
        "summary": "告警标签TOP",
        "deprecated": false,
        "description": "",
        "tags": [
          "分析看板"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "start_time": {
                    "type": "integer",
                    "title": "开始时间",
                    "description": "秒时间戳，故障的触发时间需大于此时间"
                  },
                  "end_time": {
                    "type": "integer",
                    "title": "结束时间",
                    "description": "秒时间戳，故障的触发时间需小于等于此时间。最大时间跨度6个月，若aggregate_unit聚合粒度为day，则最大时间跨度6个月"
                  },
                  "team_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "团队列表",
                    "description": "团队列表，与is_my_team同时传入时，取交集"
                  },
                  "is_my_team": {
                    "type": "boolean",
                    "title": "我的团队",
                    "description": "与team_ids同时传入时，取交集"
                  },
                  "channel_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "协作空间列表",
                    "description": "空间列表，仅可选择您可见的空间"
                  },
                  "severities": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "Info",
                        "Warning",
                        "Critical"
                      ]
                    },
                    "title": "严重程度",
                    "description": "严重程度"
                  },
                  "time_zone": {
                    "type": "string",
                    "title": "时区",
                    "description": "默认时区 Asia/Shanghai，用于结果和分组的时区。必须是 tzdata 格式。请参阅[此处](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)可接受的值列表",
                    "default": "Asia/Shanghai"
                  },
                  "query": {
                    "type": "string",
                    "title": "故障标题",
                    "description": "支持模糊匹配"
                  },
                  "labels": {
                    "type": "object",
                    "properties": {},
                    "title": "故障标签",
                    "description": "以键值对形式表示的一至多个故障标签，精确匹配"
                  },
                  "fields": {
                    "type": "object",
                    "properties": {},
                    "title": "自定义字段",
                    "description": "以键值对形式表示的一至多个自定义字段，仅支持基于非文本类型的自定义字段的数据筛选。精确匹配"
                  },
                  "seconds_to_close_from": {
                    "type": "integer",
                    "title": "最短存活时间",
                    "description": "传入非0值时筛选存活时间大于等于该值的故障，不支持对个人维度指标的筛选"
                  },
                  "seconds_to_close_to": {
                    "type": "integer",
                    "title": "最长存活时间",
                    "description": "传入非0值时筛选存活时间小于该值的故障，不支持对个人维度指标的筛选"
                  },
                  "seconds_to_ack_from": {
                    "type": "integer",
                    "title": "最短认领耗时",
                    "description": "传入非0值时筛选认领耗时大于等于该值的故障"
                  },
                  "seconds_to_ack_to": {
                    "type": "integer",
                    "title": "最长认领耗时",
                    "description": "传入非0值时筛选认领耗时小于该值的故障"
                  },
                  "orderby": {
                    "type": "string",
                    "title": "排序字段",
                    "enum": [
                      "total_alert_cnt",
                      "total_alert_event_cnt"
                    ]
                  },
                  "asc": {
                    "type": "boolean",
                    "title": "是否升序",
                    "description": "默认降序"
                  },
                  "k": {
                    "type": "integer",
                    "title": "数据数量",
                    "description": "默认全返回",
                    "minimum": 1,
                    "maximum": 100
                  },
                  "label": {
                    "type": "string",
                    "enum": [
                      "check",
                      "resource"
                    ],
                    "title": "标签"
                  }
                },
                "required": [
                  "label",
                  "start_time",
                  "end_time",
                  "query",
                  "labels",
                  "fields"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "total_alert_cnt": {
                                "type": "integer",
                                "title": "告警数量"
                              },
                              "total_alert_event_cnt": {
                                "type": "integer",
                                "title": "告警事件数量",
                                "deprecated": true
                              },
                              "label": {
                                "type": "string",
                                "title": "标签值"
                              }
                            },
                            "required": [
                              "total_alert_cnt",
                              "label",
                              "total_alert_event_cnt"
                            ]
                          }
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "string",
                    "message": "string"
                  },
                  "data": [
                    {
                      "total_alert_cnt": 11,
                      "total_alert_event_cnt": 11,
                      "label": "HTTP响应出错"
                    },
                    {
                      "total_alert_cnt": 1,
                      "total_alert_event_cnt": 1,
                      "label": "cpu.ide<28"
                    }
                  ]
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/insight/account": {
      "post": {
        "summary": "账户维度指标",
        "deprecated": false,
        "description": "聚合计算整个账户下的故障数据：\n- 如果设置aggregate_unit，则再按照unit进行拆分展示；\n- 如果设置split_hours，则再按照时段进行拆分展示；\n- 以上二者都不设置，则只返回一条聚合数据。",
        "tags": [
          "分析看板"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "start_time": {
                    "type": "integer",
                    "title": "开始时间",
                    "description": "秒时间戳，故障的触发时间需大于此时间"
                  },
                  "end_time": {
                    "type": "integer",
                    "title": "结束时间",
                    "description": "秒时间戳，故障的触发时间需小于等于此时间。最大时间跨度6个月，若aggregate_unit聚合粒度为day，则最大时间跨度6个月"
                  },
                  "team_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "团队列表",
                    "description": "团队列表，与is_my_team同时传入时，取交集"
                  },
                  "is_my_team": {
                    "type": "boolean",
                    "title": "我的团队",
                    "description": "与team_ids同时传入时，取交集"
                  },
                  "channel_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "协作空间列表",
                    "description": "空间列表，仅可选择您可见的空间"
                  },
                  "severities": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "Info",
                        "Warning",
                        "Critical"
                      ]
                    },
                    "title": "严重程度",
                    "description": "严重程度"
                  },
                  "time_zone": {
                    "type": "string",
                    "title": "时区",
                    "description": "默认时区 Asia/Shanghai，用于结果和分组的时区。必须是 tzdata 格式。请参阅[此处](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)可接受的值列表",
                    "default": "Asia/Shanghai"
                  },
                  "query": {
                    "type": "string",
                    "title": "故障标题",
                    "description": "支持模糊匹配"
                  },
                  "labels": {
                    "type": "object",
                    "properties": {},
                    "title": "故障标签",
                    "description": "以键值对形式表示的一至多个故障标签，精确匹配"
                  },
                  "fields": {
                    "type": "object",
                    "properties": {},
                    "title": "自定义字段",
                    "description": "以键值对形式表示的一至多个自定义字段，仅支持基于非文本类型的自定义字段的数据筛选。精确匹配"
                  },
                  "seconds_to_close_from": {
                    "type": "integer",
                    "title": "最短存活时间",
                    "description": "传入非0值时筛选存活时间大于等于该值的故障，不支持对个人维度指标的筛选"
                  },
                  "seconds_to_close_to": {
                    "type": "integer",
                    "title": "最长存活时间",
                    "description": "传入非0值时筛选存活时间小于该值的故障，不支持对个人维度指标的筛选"
                  },
                  "seconds_to_ack_from": {
                    "type": "integer",
                    "title": "最短认领耗时",
                    "description": "传入非0值时筛选认领耗时大于等于该值的故障"
                  },
                  "seconds_to_ack_to": {
                    "type": "integer",
                    "title": "最长认领耗时",
                    "description": "传入非0值时筛选认领耗时小于该值的故障"
                  },
                  "aggregate_unit": {
                    "type": "string",
                    "title": "聚合粒度",
                    "description": "聚合指标的时间单位。如果未提供值，则将聚合整个期间的指标。",
                    "enum": [
                      "day",
                      "week",
                      "month"
                    ]
                  },
                  "split_hours": {
                    "type": "boolean",
                    "title": "是否区分时间段",
                    "description": "是否按照工作时间，休息时间以及睡眠时间来进行指标聚合，常用于对不同时间段有不同响应SLA要求的场景"
                  }
                },
                "required": [
                  "start_time",
                  "end_time",
                  "query",
                  "labels",
                  "fields"
                ]
              },
              "example": {
                "start_time": 1234567890,
                "end_time": 1234567890,
                "team_ids": [
                  123,
                  456
                ],
                "channel_ids": [
                  1,
                  2,
                  3
                ],
                "severities": [
                  "Warning"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "total_engaged_seconds": {
                                "type": "integer",
                                "description": "处理人员参与故障处理的耗时总和。一个人的处理耗时为该人员从认领到故障被关闭的时间差（close_time-ack_time），可能会包含暂缓时间。如果无人认领，该值为0。",
                                "title": "处理人员总响应耗时"
                              },
                              "total_incident_cnt": {
                                "type": "integer",
                                "description": "触发故障数量",
                                "title": "触发故障数量"
                              },
                              "total_incidents_acknowledged": {
                                "type": "integer",
                                "description": "认领故障数量",
                                "title": "认领故障数量"
                              },
                              "total_incidents_closed": {
                                "type": "integer",
                                "description": "关闭故障数量",
                                "title": "关闭故障数量"
                              },
                              "total_incidents_auto_closed": {
                                "type": "integer",
                                "description": "自动恢复故障数量",
                                "title": "自动恢复故障数量"
                              },
                              "total_incidents_manually_closed": {
                                "type": "integer",
                                "description": "手动关闭故障数量",
                                "title": "手动关闭故障数量"
                              },
                              "total_incidents_timeout_closed": {
                                "type": "integer",
                                "description": "超时关闭故障数量",
                                "title": "超时关闭故障数量"
                              },
                              "total_incidents_escalated": {
                                "type": "integer",
                                "description": "升级故障数量",
                                "title": "升级故障数量"
                              },
                              "total_incidents_manually_escalated": {
                                "type": "integer",
                                "description": "手动升级故障数量",
                                "title": "手动升级故障数量"
                              },
                              "total_incidents_timeout_escalated": {
                                "type": "integer",
                                "description": "超时升级故障数量",
                                "title": "超时升级故障数量"
                              },
                              "total_incidents_reassigned": {
                                "type": "integer",
                                "description": "重新分派故障数量",
                                "title": "重新分派故障数量"
                              },
                              "total_notifications": {
                                "type": "integer",
                                "title": "通知总数",
                                "description": "统计所有渠道的分派通知"
                              },
                              "total_interruptions": {
                                "type": "integer",
                                "title": "中断总数",
                                "description": "仅统计短信、语音、APP推送三种渠道的分派通知。一个响应人员多渠道同时推送仅算一次中断，如果距离上一次通知不超过1分钟，不算中断。eg：故障10点发生分派，接下来5分钟持续通知，仅算一次中断"
                              },
                              "mean_seconds_to_ack": {
                                "type": "number",
                                "description": "平均首次认领耗时（ack_time-start_time）",
                                "title": "平均认领耗时"
                              },
                              "mean_seconds_to_close": {
                                "type": "number",
                                "description": "平均关闭耗时（close_time-start_time）",
                                "title": "平均关闭耗时"
                              },
                              "noise_reduction_pct": {
                                "type": "number",
                                "description": "降噪比例，100.0-(total_incident_cnt/total_alert_event_cnt)*100.0",
                                "title": "降噪比例"
                              },
                              "acknowlegement_pct": {
                                "type": "number",
                                "description": "响应比例，(total_incidents_acknowledged/total_incident_cnt)*100.0",
                                "title": "响应比例"
                              },
                              "ts": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "title": "阶段开始时间",
                                "description": "秒时间戳，根据是否是时间粒度汇聚数据决定是否展示。如aggregate_unit为day时，此值将根据time_zone确定为当天零点的时间戳"
                              },
                              "hours": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "enum": [
                                  "work",
                                  "off",
                                  "sleep"
                                ],
                                "title": "时间类型",
                                "description": "将每一小时定义为工作时间、休息时间和睡眠时间中的任一种。来区分不同时间段下的指标差异。当不进行时间段筛选时，不展示此字段。一个故障的时间类型仅取决于其发生时间，即使该故障存活时间跨越多个时间类型，也不会进行拆分。"
                              },
                              "channel_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "title": "协作空间ID",
                                "description": "协作空间ID，分组数据，根据分组情况可有可无"
                              },
                              "channel_name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "title": "协作空间名称",
                                "description": "协作空间名称，分组数据，根据分组情况可有可无"
                              },
                              "team_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "title": "团队ID",
                                "description": "团队ID，分组数据，根据分组情况可有可无"
                              },
                              "team_name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "title": "团队名称",
                                "description": "团队名称，分组数据，根据分组情况可有可无"
                              },
                              "total_alert_cnt": {
                                "type": "integer",
                                "title": "触发告警数量",
                                "description": "触发告警数量"
                              },
                              "total_alert_event_cnt": {
                                "type": "integer",
                                "title": "触发告警事件数量",
                                "description": "触发告警事件数量"
                              }
                            }
                          }
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/insight/incident/list": {
      "post": {
        "summary": "故障明细查询",
        "deprecated": false,
        "description": "",
        "tags": [
          "分析看板"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "start_time": {
                    "type": "integer",
                    "title": "开始时间",
                    "description": "秒时间戳，故障的触发时间需大于此时间"
                  },
                  "end_time": {
                    "type": "integer",
                    "title": "结束时间",
                    "description": "秒时间戳，故障的触发时间需小于等于此时间。最大时间跨度6个月，若aggregate_unit聚合粒度为day，则最大时间跨度6个月"
                  },
                  "team_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "团队列表",
                    "description": "团队列表，与is_my_team同时传入时，取交集"
                  },
                  "is_my_team": {
                    "type": "boolean",
                    "title": "我的团队",
                    "description": "与team_ids同时传入时，取交集"
                  },
                  "channel_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "协作空间列表",
                    "description": "空间列表，仅可选择您可见的空间"
                  },
                  "severities": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "Info",
                        "Warning",
                        "Critical"
                      ]
                    },
                    "title": "严重程度",
                    "description": "严重程度"
                  },
                  "time_zone": {
                    "type": "string",
                    "title": "时区",
                    "description": "默认时区 Asia/Shanghai，用于结果和分组的时区。必须是 tzdata 格式。请参阅[此处](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)可接受的值列表",
                    "default": "Asia/Shanghai"
                  },
                  "query": {
                    "type": "string",
                    "title": "故障标题",
                    "description": "支持模糊匹配"
                  },
                  "labels": {
                    "type": "object",
                    "properties": {},
                    "title": "故障标签",
                    "description": "以键值对形式表示的一至多个故障标签，精确匹配"
                  },
                  "fields": {
                    "type": "object",
                    "properties": {},
                    "title": "自定义字段",
                    "description": "以键值对形式表示的一至多个自定义字段，仅支持基于非文本类型的自定义字段的数据筛选。精确匹配"
                  },
                  "seconds_to_close_from": {
                    "type": "integer",
                    "title": "最短存活时间",
                    "description": "传入非0值时筛选存活时间大于等于该值的故障，不支持对个人维度指标的筛选"
                  },
                  "seconds_to_close_to": {
                    "type": "integer",
                    "title": "最长存活时间",
                    "description": "传入非0值时筛选存活时间小于该值的故障，不支持对个人维度指标的筛选"
                  },
                  "seconds_to_ack_from": {
                    "type": "integer",
                    "title": "最短认领耗时",
                    "description": "传入非0值时筛选认领耗时大于等于该值的故障"
                  },
                  "seconds_to_ack_to": {
                    "type": "integer",
                    "title": "最长认领耗时",
                    "description": "传入非0值时筛选认领耗时小于该值的故障"
                  },
                  "asc": {
                    "type": "boolean",
                    "title": "是否升序"
                  },
                  "orderby": {
                    "type": "string",
                    "title": "排序字段",
                    "enum": [
                      "created_at"
                    ],
                    "description": "仅支持故障触发时间created_at"
                  },
                  "search_after_ctx": {
                    "type": "string",
                    "description": "游标分页，不设置为第一页。与p参数二选一。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)"
                  },
                  "p": {
                    "type": "integer",
                    "description": "传统分页，不设置从第一页开始，默认值为1，与search_after_ctx参数二选一。基于传统分页时设置，<span style=\"color: red;\">当设置p参数时，p*limit不得超过10000</span>，否则返回参数错误。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)",
                    "default": 1
                  },
                  "limit": {
                    "type": "integer",
                    "description": "分页条数。<span style=\"color: red;\">当设置p参数时，(p-1)*limit不得超过10000</span>，否则返回参数错误。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)",
                    "maximum": 100,
                    "minimum": 0,
                    "default": 20
                  }
                },
                "required": [
                  "start_time",
                  "end_time",
                  "query",
                  "labels",
                  "fields"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "incident_id": {
                                "type": "string",
                                "title": "故障ID",
                                "description": "故障ID"
                              },
                              "title": {
                                "type": "string",
                                "title": "故障标题",
                                "description": "故障标题"
                              },
                              "team_id": {
                                "type": "integer",
                                "title": "团队ID",
                                "description": "团队ID"
                              },
                              "team_name": {
                                "type": "string",
                                "title": "团队名称",
                                "description": "团队名称"
                              },
                              "channel_id": {
                                "type": "integer",
                                "title": "协作空间ID",
                                "description": "协作空间ID"
                              },
                              "channel_name": {
                                "type": "string",
                                "title": "协作空间名称",
                                "description": "协作空间名称"
                              },
                              "progress": {
                                "type": "string",
                                "title": "处理进度",
                                "description": "处理进度",
                                "enum": [
                                  "Triggered",
                                  "Processing",
                                  "Closed"
                                ]
                              },
                              "severity": {
                                "type": "string",
                                "title": "严重程度",
                                "enum": [
                                  "Info",
                                  "Warning",
                                  "Critical"
                                ],
                                "description": "严重程度"
                              },
                              "created_at": {
                                "type": "integer",
                                "title": "创建时间",
                                "description": "创建时间"
                              },
                              "closed_by": {
                                "type": "string",
                                "title": "关闭方式",
                                "enum": [
                                  "timeout",
                                  "auto",
                                  "manually"
                                ],
                                "description": "关闭方式"
                              },
                              "seconds_to_ack": {
                                "type": "integer",
                                "title": "首次认领耗时",
                                "description": "首次认领耗时"
                              },
                              "seconds_to_close": {
                                "type": "integer",
                                "title": "关闭耗时",
                                "description": "关闭耗时"
                              },
                              "engaged_seconds": {
                                "type": "integer",
                                "title": "响应投入",
                                "description": "仅当故障被关闭时存在，所有参与人员总耗时，sum(close_time-ack_time))"
                              },
                              "hours": {
                                "type": "string",
                                "title": "时间段类型",
                                "description": "时间段类型",
                                "enum": [
                                  "work",
                                  "off",
                                  "sleep"
                                ]
                              },
                              "notifications": {
                                "type": "integer",
                                "title": "通知次数",
                                "description": "通知次数，统计所有渠道通知次数"
                              },
                              "interruptions": {
                                "type": "integer",
                                "title": "中断次数",
                                "description": "中断次数，仅统计短信、语音、APP推送三种渠道的分派通知。一个响应人员多渠道同时推送仅算一次中断，如果距离上一次通知不超过1分钟，不算中断。eg：故障10点发生分派，接下来5分钟持续通知，仅算一次中断"
                              },
                              "assignments": {
                                "type": "integer",
                                "title": "分派次数",
                                "description": "分派次数"
                              },
                              "reassignments": {
                                "type": "integer",
                                "title": "重新分派次数",
                                "description": "重新分派次数"
                              },
                              "acknowledgements": {
                                "type": "integer",
                                "title": "认领次数",
                                "description": "认领次数"
                              },
                              "escalations": {
                                "type": "integer",
                                "title": "升级次数",
                                "description": "升级次数"
                              },
                              "manual_escalations": {
                                "type": "integer",
                                "title": "手动升级次数",
                                "description": "手动升级次数"
                              },
                              "timeout_escalations": {
                                "type": "integer",
                                "title": "超时升级次数",
                                "description": "超时升级次数"
                              },
                              "responders": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/Responder"
                                },
                                "title": "处理人员信息",
                                "description": "当前处理人员信息"
                              },
                              "assigned_to": {
                                "$ref": "#/components/schemas/Assignment",
                                "title": "最后一次分派信息",
                                "description": "最后一次分派信息"
                              },
                              "labels": {
                                "type": "object",
                                "properties": {},
                                "description": "标签"
                              },
                              "fields": {
                                "type": "object",
                                "properties": {},
                                "description": "自定义字段"
                              }
                            },
                            "required": [
                              "title",
                              "severity",
                              "created_at",
                              "progress",
                              "incident_id",
                              "hours"
                            ]
                          },
                          "title": "故障列表"
                        },
                        "search_after_ctx": {
                          "type": "string",
                          "description": "游标分页，有此项说明有下一页。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)"
                        },
                        "total": {
                          "type": "integer",
                          "description": "匹配条目总数。请注意，<span style=\"color: red;\">total仅在小于1000时精确，请不要使用该值来计算分页是否结束。</span>当总条数大于1000时，系统仅会返回total=1000，代表系统匹配到了1000+数据。请使用hax_next_page来判断是否还有数据未获取。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)"
                        },
                        "has_next_page": {
                          "type": "boolean",
                          "description": "是否存在更多数据未获取"
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/insight/incident/export": {
      "post": {
        "summary": "故障明细导出",
        "deprecated": false,
        "description": "",
        "tags": [
          "分析看板"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "start_time": {
                    "type": "integer",
                    "title": "开始时间",
                    "description": "秒时间戳，故障的触发时间需大于此时间"
                  },
                  "end_time": {
                    "type": "integer",
                    "title": "结束时间",
                    "description": "秒时间戳，故障的触发时间需小于等于此时间。最大时间跨度6个月，若aggregate_unit聚合粒度为day，则最大时间跨度6个月"
                  },
                  "team_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "团队列表",
                    "description": "团队列表，与is_my_team同时传入时，取交集"
                  },
                  "is_my_team": {
                    "type": "boolean",
                    "title": "我的团队",
                    "description": "与team_ids同时传入时，取交集"
                  },
                  "channel_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "协作空间列表",
                    "description": "空间列表，仅可选择您可见的空间"
                  },
                  "severities": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "Info",
                        "Warning",
                        "Critical"
                      ]
                    },
                    "title": "严重程度",
                    "description": "严重程度"
                  },
                  "time_zone": {
                    "type": "string",
                    "title": "时区",
                    "description": "默认时区 Asia/Shanghai，用于结果和分组的时区。必须是 tzdata 格式。请参阅[此处](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)可接受的值列表",
                    "default": "Asia/Shanghai"
                  },
                  "query": {
                    "type": "string",
                    "title": "故障标题",
                    "description": "支持模糊匹配"
                  },
                  "labels": {
                    "type": "object",
                    "properties": {},
                    "title": "故障标签",
                    "description": "以键值对形式表示的一至多个故障标签，精确匹配"
                  },
                  "fields": {
                    "type": "object",
                    "properties": {},
                    "title": "自定义字段",
                    "description": "以键值对形式表示的一至多个自定义字段，仅支持基于非文本类型的自定义字段的数据筛选。精确匹配"
                  },
                  "seconds_to_close_from": {
                    "type": "integer",
                    "title": "最短存活时间",
                    "description": "传入非0值时筛选存活时间大于等于该值的故障，不支持对个人维度指标的筛选"
                  },
                  "seconds_to_close_to": {
                    "type": "integer",
                    "title": "最长存活时间",
                    "description": "传入非0值时筛选存活时间小于该值的故障，不支持对个人维度指标的筛选"
                  },
                  "seconds_to_ack_from": {
                    "type": "integer",
                    "title": "最短认领耗时",
                    "description": "传入非0值时筛选认领耗时大于等于该值的故障"
                  },
                  "seconds_to_ack_to": {
                    "type": "integer",
                    "title": "最长认领耗时",
                    "description": "传入非0值时筛选认领耗时小于该值的故障"
                  },
                  "asc": {
                    "type": "boolean",
                    "title": "是否升序"
                  },
                  "orderby": {
                    "type": "string",
                    "title": "排序字段",
                    "description": "仅支持故障触发时间created_at"
                  },
                  "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"
                      ]
                    },
                    "title": "导出字段",
                    "description": "默认全导出"
                  },
                  "description_html_to_text": {
                    "type": "boolean",
                    "title": "描述HTML格式转换成文本",
                    "description": "默认不转换"
                  }
                },
                "required": [
                  "start_time",
                  "end_time",
                  "query",
                  "labels",
                  "fields"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "incident_id": {
                            "type": "string",
                            "title": "故障ID"
                          },
                          "account_id": {
                            "type": "integer",
                            "title": "账号ID"
                          },
                          "team_id": {
                            "type": "integer",
                            "title": "团队ID"
                          },
                          "channel_id": {
                            "type": "integer",
                            "title": "协作空间ID"
                          },
                          "severity": {
                            "type": "string",
                            "title": "严重程度"
                          },
                          "created_at": {
                            "type": "integer",
                            "title": "创建时间"
                          },
                          "is_acked": {
                            "type": "boolean",
                            "title": "是否认领"
                          },
                          "is_assigned": {
                            "type": "boolean",
                            "title": "是否分派"
                          },
                          "is_reassigned": {
                            "type": "boolean",
                            "title": "是否重新分派"
                          },
                          "escalated_by": {
                            "type": "string",
                            "title": "升级方式"
                          },
                          "closed_by": {
                            "type": "string",
                            "title": "关闭方式"
                          },
                          "seconds_to_first_ack": {
                            "type": "integer",
                            "title": "首次认领耗时"
                          },
                          "seconds_to_close": {
                            "type": "integer",
                            "title": "关闭耗时"
                          },
                          "seconds_to_engage": {
                            "type": "integer",
                            "title": "处理耗时"
                          }
                        }
                      }
                    },
                    "p": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/insight/team": {
      "post": {
        "summary": "团队维度指标",
        "deprecated": false,
        "description": "按照团队聚合计算故障数据：\n- 如果设置aggregate_unit，则再按照unit进行拆分展示；\n- 如果设置split_hours，则再按照时段进行拆分展示；\n- 以上二者都不设置，则只按照团队进行拆分展示。",
        "tags": [
          "分析看板"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "start_time": {
                    "type": "integer",
                    "title": "开始时间",
                    "description": "秒时间戳，故障的触发时间需大于此时间"
                  },
                  "end_time": {
                    "type": "integer",
                    "title": "结束时间",
                    "description": "秒时间戳，故障的触发时间需小于等于此时间。最大时间跨度6个月，若aggregate_unit聚合粒度为day，则最大时间跨度6个月"
                  },
                  "team_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "团队列表",
                    "description": "团队列表，与is_my_team同时传入时，取交集"
                  },
                  "is_my_team": {
                    "type": "boolean",
                    "title": "我的团队",
                    "description": "与team_ids同时传入时，取交集"
                  },
                  "channel_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "协作空间列表",
                    "description": "空间列表，仅可选择您可见的空间"
                  },
                  "severities": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "Info",
                        "Warning",
                        "Critical"
                      ]
                    },
                    "title": "严重程度",
                    "description": "严重程度"
                  },
                  "time_zone": {
                    "type": "string",
                    "title": "时区",
                    "description": "默认时区 Asia/Shanghai，用于结果和分组的时区。必须是 tzdata 格式。请参阅[此处](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)可接受的值列表",
                    "default": "Asia/Shanghai"
                  },
                  "query": {
                    "type": "string",
                    "title": "故障标题",
                    "description": "支持模糊匹配"
                  },
                  "labels": {
                    "type": "object",
                    "properties": {},
                    "title": "故障标签",
                    "description": "以键值对形式表示的一至多个故障标签，精确匹配"
                  },
                  "fields": {
                    "type": "object",
                    "properties": {},
                    "title": "自定义字段",
                    "description": "以键值对形式表示的一至多个自定义字段，仅支持基于非文本类型的自定义字段的数据筛选。精确匹配"
                  },
                  "seconds_to_close_from": {
                    "type": "integer",
                    "title": "最短存活时间",
                    "description": "传入非0值时筛选存活时间大于等于该值的故障，不支持对个人维度指标的筛选"
                  },
                  "seconds_to_close_to": {
                    "type": "integer",
                    "title": "最长存活时间",
                    "description": "传入非0值时筛选存活时间小于该值的故障，不支持对个人维度指标的筛选"
                  },
                  "seconds_to_ack_from": {
                    "type": "integer",
                    "title": "最短认领耗时",
                    "description": "传入非0值时筛选认领耗时大于等于该值的故障"
                  },
                  "seconds_to_ack_to": {
                    "type": "integer",
                    "title": "最长认领耗时",
                    "description": "传入非0值时筛选认领耗时小于该值的故障"
                  },
                  "aggregate_unit": {
                    "type": "string",
                    "title": "聚合粒度",
                    "description": "聚合指标的时间单位。如果未提供值，则将聚合整个期间的指标。",
                    "enum": [
                      "day",
                      "week",
                      "month"
                    ]
                  },
                  "split_hours": {
                    "type": "boolean",
                    "title": "是否区分时间段",
                    "description": "是否按照工作时间，休息时间以及睡眠时间来进行指标聚合，常用于对不同时间段有不同响应SLA要求的场景"
                  }
                },
                "required": [
                  "start_time",
                  "end_time",
                  "query",
                  "labels",
                  "fields"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "total_engaged_seconds": {
                                "type": "integer",
                                "description": "处理人员参与故障处理的耗时总和。一个人的处理耗时为该人员从认领到故障被关闭的时间差（close_time-ack_time），可能会包含暂缓时间。如果无人认领，该值为0。",
                                "title": "处理人员总响应耗时"
                              },
                              "total_incident_cnt": {
                                "type": "integer",
                                "description": "触发故障数量",
                                "title": "触发故障数量"
                              },
                              "total_incidents_acknowledged": {
                                "type": "integer",
                                "description": "认领故障数量",
                                "title": "认领故障数量"
                              },
                              "total_incidents_closed": {
                                "type": "integer",
                                "description": "关闭故障数量",
                                "title": "关闭故障数量"
                              },
                              "total_incidents_auto_closed": {
                                "type": "integer",
                                "description": "自动恢复故障数量",
                                "title": "自动恢复故障数量"
                              },
                              "total_incidents_manually_closed": {
                                "type": "integer",
                                "description": "手动关闭故障数量",
                                "title": "手动关闭故障数量"
                              },
                              "total_incidents_timeout_closed": {
                                "type": "integer",
                                "description": "超时关闭故障数量",
                                "title": "超时关闭故障数量"
                              },
                              "total_incidents_escalated": {
                                "type": "integer",
                                "description": "升级故障数量",
                                "title": "升级故障数量"
                              },
                              "total_incidents_manually_escalated": {
                                "type": "integer",
                                "description": "手动升级故障数量",
                                "title": "手动升级故障数量"
                              },
                              "total_incidents_timeout_escalated": {
                                "type": "integer",
                                "description": "超时升级故障数量",
                                "title": "超时升级故障数量"
                              },
                              "total_incidents_reassigned": {
                                "type": "integer",
                                "description": "重新分派故障数量",
                                "title": "重新分派故障数量"
                              },
                              "total_notifications": {
                                "type": "integer",
                                "title": "通知总数",
                                "description": "统计所有渠道的分派通知"
                              },
                              "total_interruptions": {
                                "type": "integer",
                                "title": "中断总数",
                                "description": "仅统计短信、语音、APP推送三种渠道的分派通知。一个响应人员多渠道同时推送仅算一次中断，如果距离上一次通知不超过1分钟，不算中断。eg：故障10点发生分派，接下来5分钟持续通知，仅算一次中断"
                              },
                              "mean_seconds_to_ack": {
                                "type": "number",
                                "description": "平均首次认领耗时（ack_time-start_time）",
                                "title": "平均认领耗时"
                              },
                              "mean_seconds_to_close": {
                                "type": "number",
                                "description": "平均关闭耗时（close_time-start_time）",
                                "title": "平均关闭耗时"
                              },
                              "noise_reduction_pct": {
                                "type": "number",
                                "description": "降噪比例，100.0-(total_incident_cnt/total_alert_event_cnt)*100.0",
                                "title": "降噪比例"
                              },
                              "acknowlegement_pct": {
                                "type": "number",
                                "description": "响应比例，(total_incidents_acknowledged/total_incident_cnt)*100.0",
                                "title": "响应比例"
                              },
                              "ts": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "title": "阶段开始时间",
                                "description": "秒时间戳，根据是否是时间粒度汇聚数据决定是否展示。如aggregate_unit为day时，此值将根据time_zone确定为当天零点的时间戳"
                              },
                              "hours": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "enum": [
                                  "work",
                                  "off",
                                  "sleep"
                                ],
                                "title": "时间类型",
                                "description": "将每一小时定义为工作时间、休息时间和睡眠时间中的任一种。来区分不同时间段下的指标差异。当不进行时间段筛选时，不展示此字段。一个故障的时间类型仅取决于其发生时间，即使该故障存活时间跨越多个时间类型，也不会进行拆分。"
                              },
                              "channel_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "title": "协作空间ID",
                                "description": "协作空间ID，分组数据，根据分组情况可有可无"
                              },
                              "channel_name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "title": "协作空间名称",
                                "description": "协作空间名称，分组数据，根据分组情况可有可无"
                              },
                              "team_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "title": "团队ID",
                                "description": "团队ID，分组数据，根据分组情况可有可无"
                              },
                              "team_name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "title": "团队名称",
                                "description": "团队名称，分组数据，根据分组情况可有可无"
                              },
                              "total_alert_cnt": {
                                "type": "integer",
                                "title": "触发告警数量",
                                "description": "触发告警数量"
                              },
                              "total_alert_event_cnt": {
                                "type": "integer",
                                "title": "触发告警事件数量",
                                "description": "触发告警事件数量"
                              }
                            }
                          }
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/insight/team/export": {
      "post": {
        "summary": "团队维度指标导出",
        "deprecated": false,
        "description": "",
        "tags": [
          "分析看板"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "start_time": {
                    "type": "integer",
                    "title": "开始时间",
                    "description": "秒时间戳，故障的触发时间需大于此时间"
                  },
                  "end_time": {
                    "type": "integer",
                    "title": "结束时间",
                    "description": "秒时间戳，故障的触发时间需小于等于此时间。最大时间跨度6个月，若aggregate_unit聚合粒度为day，则最大时间跨度6个月"
                  },
                  "team_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "团队列表",
                    "description": "团队列表，与is_my_team同时传入时，取交集"
                  },
                  "is_my_team": {
                    "type": "boolean",
                    "title": "我的团队",
                    "description": "与team_ids同时传入时，取交集"
                  },
                  "channel_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "协作空间列表",
                    "description": "空间列表，仅可选择您可见的空间"
                  },
                  "severities": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "Info",
                        "Warning",
                        "Critical"
                      ]
                    },
                    "title": "严重程度",
                    "description": "严重程度"
                  },
                  "time_zone": {
                    "type": "string",
                    "title": "时区",
                    "description": "默认时区 Asia/Shanghai，用于结果和分组的时区。必须是 tzdata 格式。请参阅[此处](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)可接受的值列表",
                    "default": "Asia/Shanghai"
                  },
                  "query": {
                    "type": "string",
                    "title": "故障标题",
                    "description": "支持模糊匹配"
                  },
                  "labels": {
                    "type": "object",
                    "properties": {},
                    "title": "故障标签",
                    "description": "以键值对形式表示的一至多个故障标签，精确匹配"
                  },
                  "fields": {
                    "type": "object",
                    "properties": {},
                    "title": "自定义字段",
                    "description": "以键值对形式表示的一至多个自定义字段，仅支持基于非文本类型的自定义字段的数据筛选。精确匹配"
                  },
                  "seconds_to_close_from": {
                    "type": "integer",
                    "title": "最短存活时间",
                    "description": "传入非0值时筛选存活时间大于等于该值的故障，不支持对个人维度指标的筛选"
                  },
                  "seconds_to_close_to": {
                    "type": "integer",
                    "title": "最长存活时间",
                    "description": "传入非0值时筛选存活时间小于该值的故障，不支持对个人维度指标的筛选"
                  },
                  "seconds_to_ack_from": {
                    "type": "integer",
                    "title": "最短认领耗时",
                    "description": "传入非0值时筛选认领耗时大于等于该值的故障"
                  },
                  "seconds_to_ack_to": {
                    "type": "integer",
                    "title": "最长认领耗时",
                    "description": "传入非0值时筛选认领耗时小于该值的故障"
                  },
                  "export_fields": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "team_id",
                        "team_name",
                        "total_incident_cnt",
                        "total_incidents_acknowledged",
                        "total_incidents_closed",
                        "total_incidents_auto_closed",
                        "total_incidents_manually_closed",
                        "total_incidents_timeout_closed",
                        "total_incidents_escalated",
                        "total_incidents_manually_escalated",
                        "total_incidents_timeout_escalated",
                        "total_incidents_reassigned",
                        "total_interruptions",
                        "total_notifications",
                        "total_engaged_seconds",
                        "mean_seconds_to_ack",
                        "mean_seconds_to_close",
                        "noise_reduction_pct",
                        "acknowledgement_pct",
                        "total_alert_cnt",
                        "total_alert_event_cnt",
                        "hours"
                      ]
                    },
                    "title": "导出字段",
                    "description": "默认全导出"
                  }
                },
                "required": [
                  "start_time",
                  "end_time",
                  "query",
                  "labels",
                  "fields"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/insight/channel": {
      "post": {
        "summary": "空间维度指标",
        "deprecated": false,
        "description": "按照空间聚合计算故障数据：\n- 如果设置aggregate_unit，则再按照unit进行拆分展示；\n- 如果设置split_hours，则再按照时段进行拆分展示；\n- 以上二者都不设置，则只按照空间进行拆分展示。",
        "tags": [
          "分析看板"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "start_time": {
                    "type": "integer",
                    "title": "开始时间",
                    "description": "秒时间戳，故障的触发时间需大于此时间"
                  },
                  "end_time": {
                    "type": "integer",
                    "title": "结束时间",
                    "description": "秒时间戳，故障的触发时间需小于等于此时间。最大时间跨度6个月，若aggregate_unit聚合粒度为day，则最大时间跨度6个月"
                  },
                  "team_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "团队列表",
                    "description": "团队列表，与is_my_team同时传入时，取交集"
                  },
                  "is_my_team": {
                    "type": "boolean",
                    "title": "我的团队",
                    "description": "与team_ids同时传入时，取交集"
                  },
                  "channel_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "协作空间列表",
                    "description": "空间列表，仅可选择您可见的空间"
                  },
                  "severities": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "Info",
                        "Warning",
                        "Critical"
                      ]
                    },
                    "title": "严重程度",
                    "description": "严重程度"
                  },
                  "time_zone": {
                    "type": "string",
                    "title": "时区",
                    "description": "默认时区 Asia/Shanghai，用于结果和分组的时区。必须是 tzdata 格式。请参阅[此处](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)可接受的值列表",
                    "default": "Asia/Shanghai"
                  },
                  "query": {
                    "type": "string",
                    "title": "故障标题",
                    "description": "支持模糊匹配"
                  },
                  "labels": {
                    "type": "object",
                    "properties": {},
                    "title": "故障标签",
                    "description": "以键值对形式表示的一至多个故障标签，精确匹配"
                  },
                  "fields": {
                    "type": "object",
                    "properties": {},
                    "title": "自定义字段",
                    "description": "以键值对形式表示的一至多个自定义字段，仅支持基于非文本类型的自定义字段的数据筛选。精确匹配"
                  },
                  "seconds_to_close_from": {
                    "type": "integer",
                    "title": "最短存活时间",
                    "description": "传入非0值时筛选存活时间大于等于该值的故障，不支持对个人维度指标的筛选"
                  },
                  "seconds_to_close_to": {
                    "type": "integer",
                    "title": "最长存活时间",
                    "description": "传入非0值时筛选存活时间小于该值的故障，不支持对个人维度指标的筛选"
                  },
                  "seconds_to_ack_from": {
                    "type": "integer",
                    "title": "最短认领耗时",
                    "description": "传入非0值时筛选认领耗时大于等于该值的故障"
                  },
                  "seconds_to_ack_to": {
                    "type": "integer",
                    "title": "最长认领耗时",
                    "description": "传入非0值时筛选认领耗时小于该值的故障"
                  },
                  "aggregate_unit": {
                    "type": "string",
                    "title": "聚合粒度",
                    "description": "聚合指标的时间单位。如果未提供值，则将聚合整个期间的指标。",
                    "enum": [
                      "day",
                      "week",
                      "month"
                    ]
                  },
                  "split_hours": {
                    "type": "boolean",
                    "title": "是否区分时间段",
                    "description": "是否按照工作时间，休息时间以及睡眠时间来进行指标聚合，常用于对不同时间段有不同响应SLA要求的场景"
                  }
                },
                "required": [
                  "start_time",
                  "end_time",
                  "query",
                  "labels",
                  "fields"
                ]
              },
              "example": {
                "start_time": 1234567890,
                "end_time": 1234567890,
                "team_ids": [
                  123,
                  456
                ],
                "channel_ids": [
                  1,
                  2,
                  3
                ],
                "severities": [
                  "Warning"
                ],
                "order_by": "total_incident_cnt",
                "asc": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "total_engaged_seconds": {
                                "type": "integer",
                                "description": "处理人员参与故障处理的耗时总和。一个人的处理耗时为该人员从认领到故障被关闭的时间差（close_time-ack_time），可能会包含暂缓时间。如果无人认领，该值为0。",
                                "title": "处理人员总响应耗时"
                              },
                              "total_incident_cnt": {
                                "type": "integer",
                                "description": "触发故障数量",
                                "title": "触发故障数量"
                              },
                              "total_incidents_acknowledged": {
                                "type": "integer",
                                "description": "认领故障数量",
                                "title": "认领故障数量"
                              },
                              "total_incidents_closed": {
                                "type": "integer",
                                "description": "关闭故障数量",
                                "title": "关闭故障数量"
                              },
                              "total_incidents_auto_closed": {
                                "type": "integer",
                                "description": "自动恢复故障数量",
                                "title": "自动恢复故障数量"
                              },
                              "total_incidents_manually_closed": {
                                "type": "integer",
                                "description": "手动关闭故障数量",
                                "title": "手动关闭故障数量"
                              },
                              "total_incidents_timeout_closed": {
                                "type": "integer",
                                "description": "超时关闭故障数量",
                                "title": "超时关闭故障数量"
                              },
                              "total_incidents_escalated": {
                                "type": "integer",
                                "description": "升级故障数量",
                                "title": "升级故障数量"
                              },
                              "total_incidents_manually_escalated": {
                                "type": "integer",
                                "description": "手动升级故障数量",
                                "title": "手动升级故障数量"
                              },
                              "total_incidents_timeout_escalated": {
                                "type": "integer",
                                "description": "超时升级故障数量",
                                "title": "超时升级故障数量"
                              },
                              "total_incidents_reassigned": {
                                "type": "integer",
                                "description": "重新分派故障数量",
                                "title": "重新分派故障数量"
                              },
                              "total_notifications": {
                                "type": "integer",
                                "title": "通知总数",
                                "description": "统计所有渠道的分派通知"
                              },
                              "total_interruptions": {
                                "type": "integer",
                                "title": "中断总数",
                                "description": "仅统计短信、语音、APP推送三种渠道的分派通知。一个响应人员多渠道同时推送仅算一次中断，如果距离上一次通知不超过1分钟，不算中断。eg：故障10点发生分派，接下来5分钟持续通知，仅算一次中断"
                              },
                              "mean_seconds_to_ack": {
                                "type": "number",
                                "description": "平均首次认领耗时（ack_time-start_time）",
                                "title": "平均认领耗时"
                              },
                              "mean_seconds_to_close": {
                                "type": "number",
                                "description": "平均关闭耗时（close_time-start_time）",
                                "title": "平均关闭耗时"
                              },
                              "noise_reduction_pct": {
                                "type": "number",
                                "description": "降噪比例，100.0-(total_incident_cnt/total_alert_event_cnt)*100.0",
                                "title": "降噪比例"
                              },
                              "acknowlegement_pct": {
                                "type": "number",
                                "description": "响应比例，(total_incidents_acknowledged/total_incident_cnt)*100.0",
                                "title": "响应比例"
                              },
                              "ts": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "title": "阶段开始时间",
                                "description": "秒时间戳，根据是否是时间粒度汇聚数据决定是否展示。如aggregate_unit为day时，此值将根据time_zone确定为当天零点的时间戳"
                              },
                              "hours": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "enum": [
                                  "work",
                                  "off",
                                  "sleep"
                                ],
                                "title": "时间类型",
                                "description": "将每一小时定义为工作时间、休息时间和睡眠时间中的任一种。来区分不同时间段下的指标差异。当不进行时间段筛选时，不展示此字段。一个故障的时间类型仅取决于其发生时间，即使该故障存活时间跨越多个时间类型，也不会进行拆分。"
                              },
                              "channel_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "title": "协作空间ID",
                                "description": "协作空间ID，分组数据，根据分组情况可有可无"
                              },
                              "channel_name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "title": "协作空间名称",
                                "description": "协作空间名称，分组数据，根据分组情况可有可无"
                              },
                              "team_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "title": "团队ID",
                                "description": "团队ID，分组数据，根据分组情况可有可无"
                              },
                              "team_name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "title": "团队名称",
                                "description": "团队名称，分组数据，根据分组情况可有可无"
                              },
                              "total_alert_cnt": {
                                "type": "integer",
                                "title": "触发告警数量",
                                "description": "触发告警数量"
                              },
                              "total_alert_event_cnt": {
                                "type": "integer",
                                "title": "触发告警事件数量",
                                "description": "触发告警事件数量"
                              }
                            }
                          }
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/insight/channel/export": {
      "post": {
        "summary": "空间维度指标导出",
        "deprecated": false,
        "description": "",
        "tags": [
          "分析看板"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "start_time": {
                    "type": "integer",
                    "title": "开始时间",
                    "description": "秒时间戳，故障的触发时间需大于此时间"
                  },
                  "end_time": {
                    "type": "integer",
                    "title": "结束时间",
                    "description": "秒时间戳，故障的触发时间需小于等于此时间。最大时间跨度6个月，若aggregate_unit聚合粒度为day，则最大时间跨度6个月"
                  },
                  "team_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "团队列表",
                    "description": "团队列表，与is_my_team同时传入时，取交集"
                  },
                  "is_my_team": {
                    "type": "boolean",
                    "title": "我的团队",
                    "description": "与team_ids同时传入时，取交集"
                  },
                  "channel_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "协作空间列表",
                    "description": "空间列表，仅可选择您可见的空间"
                  },
                  "severities": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "Info",
                        "Warning",
                        "Critical"
                      ]
                    },
                    "title": "严重程度",
                    "description": "严重程度"
                  },
                  "time_zone": {
                    "type": "string",
                    "title": "时区",
                    "description": "默认时区 Asia/Shanghai，用于结果和分组的时区。必须是 tzdata 格式。请参阅[此处](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)可接受的值列表",
                    "default": "Asia/Shanghai"
                  },
                  "query": {
                    "type": "string",
                    "title": "故障标题",
                    "description": "支持模糊匹配"
                  },
                  "labels": {
                    "type": "object",
                    "properties": {},
                    "title": "故障标签",
                    "description": "以键值对形式表示的一至多个故障标签，精确匹配"
                  },
                  "fields": {
                    "type": "object",
                    "properties": {},
                    "title": "自定义字段",
                    "description": "以键值对形式表示的一至多个自定义字段，仅支持基于非文本类型的自定义字段的数据筛选。精确匹配"
                  },
                  "seconds_to_close_from": {
                    "type": "integer",
                    "title": "最短存活时间",
                    "description": "传入非0值时筛选存活时间大于等于该值的故障，不支持对个人维度指标的筛选"
                  },
                  "seconds_to_close_to": {
                    "type": "integer",
                    "title": "最长存活时间",
                    "description": "传入非0值时筛选存活时间小于该值的故障，不支持对个人维度指标的筛选"
                  },
                  "seconds_to_ack_from": {
                    "type": "integer",
                    "title": "最短认领耗时",
                    "description": "传入非0值时筛选认领耗时大于等于该值的故障"
                  },
                  "seconds_to_ack_to": {
                    "type": "integer",
                    "title": "最长认领耗时",
                    "description": "传入非0值时筛选认领耗时小于该值的故障"
                  },
                  "export_fields": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "channel_id",
                        "channel_name",
                        "total_incident_cnt",
                        "total_incidents_acknowledged",
                        "total_incidents_closed",
                        "total_incidents_auto_closed",
                        "total_incidents_manually_closed",
                        "total_incidents_timeout_closed",
                        "total_incidents_escalated",
                        "total_incidents_manually_escalated",
                        "total_incidents_timeout_escalated",
                        "total_incidents_reassigned",
                        "total_interruptions",
                        "total_notifications",
                        "total_engaged_seconds",
                        "mean_seconds_to_ack",
                        "mean_seconds_to_close",
                        "noise_reduction_pct",
                        "acknowledgement_pct",
                        "total_alert_cnt",
                        "total_alert_event_cnt",
                        "hours"
                      ]
                    },
                    "title": "导出字段",
                    "description": "默认全导出"
                  }
                },
                "required": [
                  "start_time",
                  "end_time",
                  "query",
                  "labels",
                  "fields"
                ]
              },
              "example": {
                "start_time": 1234567890,
                "end_time": 1234567890,
                "team_ids": [
                  123,
                  456
                ],
                "channel_ids": [
                  1,
                  2,
                  3
                ],
                "severities": [
                  "Warning"
                ],
                "order_by": "total_incident_cnt",
                "asc": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/insight/responder": {
      "post": {
        "summary": "个人维度指标",
        "deprecated": false,
        "description": "按照个人聚合计算故障数据：\n- 如果设置aggregate_unit，则再按照unit进行拆分展示；\n- 如果设置split_hours，则再按照时段进行拆分展示；\n- 以上二者都不设置，则只按照个人进行拆分展示。",
        "tags": [
          "分析看板"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "start_time": {
                    "type": "integer",
                    "title": "开始时间",
                    "description": "秒时间戳，故障的触发时间需大于此时间"
                  },
                  "end_time": {
                    "type": "integer",
                    "title": "结束时间",
                    "description": "秒时间戳，故障的触发时间需小于等于此时间。最大时间跨度6个月，若aggregate_unit聚合粒度为day，则最大时间跨度6个月"
                  },
                  "team_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "团队列表",
                    "description": "团队列表，与is_my_team同时传入时，取交集"
                  },
                  "is_my_team": {
                    "type": "boolean",
                    "title": "我的团队",
                    "description": "与team_ids同时传入时，取交集"
                  },
                  "channel_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "协作空间列表",
                    "description": "空间列表，仅可选择您可见的空间"
                  },
                  "severities": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "Info",
                        "Warning",
                        "Critical"
                      ]
                    },
                    "title": "严重程度",
                    "description": "严重程度"
                  },
                  "time_zone": {
                    "type": "string",
                    "title": "时区",
                    "description": "默认时区 Asia/Shanghai，用于结果和分组的时区。必须是 tzdata 格式。请参阅[此处](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)可接受的值列表",
                    "default": "Asia/Shanghai"
                  },
                  "query": {
                    "type": "string",
                    "title": "故障标题",
                    "description": "支持模糊匹配"
                  },
                  "labels": {
                    "type": "object",
                    "properties": {},
                    "title": "故障标签",
                    "description": "以键值对形式表示的一至多个故障标签，精确匹配"
                  },
                  "fields": {
                    "type": "object",
                    "properties": {},
                    "title": "自定义字段",
                    "description": "以键值对形式表示的一至多个自定义字段，仅支持基于非文本类型的自定义字段的数据筛选。精确匹配"
                  },
                  "seconds_to_close_from": {
                    "type": "integer",
                    "title": "最短存活时间",
                    "description": "传入非0值时筛选存活时间大于等于该值的故障，不支持对个人维度指标的筛选"
                  },
                  "seconds_to_close_to": {
                    "type": "integer",
                    "title": "最长存活时间",
                    "description": "传入非0值时筛选存活时间小于该值的故障，不支持对个人维度指标的筛选"
                  },
                  "seconds_to_ack_from": {
                    "type": "integer",
                    "title": "最短认领耗时",
                    "description": "传入非0值时筛选认领耗时大于等于该值的故障"
                  },
                  "seconds_to_ack_to": {
                    "type": "integer",
                    "title": "最长认领耗时",
                    "description": "传入非0值时筛选认领耗时小于该值的故障"
                  },
                  "responder_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "成员ID列表",
                    "description": "成员ID列表"
                  },
                  "aggregate_unit": {
                    "type": "string",
                    "title": "聚合粒度",
                    "description": "聚合指标的时间单位。如果未提供值，则将聚合整个期间的指标。",
                    "enum": [
                      "day",
                      "week",
                      "month"
                    ]
                  },
                  "split_hours": {
                    "type": "boolean",
                    "title": "是否区分时间段",
                    "description": "是否按照工作时间，休息时间以及睡眠时间来进行指标聚合，常用于对不同时间段有不同响应SLA要求的场景"
                  }
                },
                "required": [
                  "start_time",
                  "end_time",
                  "query",
                  "labels",
                  "fields"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "total_incident_cnt": {
                                "type": "integer",
                                "description": "触发故障总数量",
                                "title": "触发故障数量"
                              },
                              "total_incidents_acknowledged": {
                                "type": "integer",
                                "description": "认领故障总数量",
                                "title": "认领故障数量"
                              },
                              "total_incidents_reassigned": {
                                "type": "integer",
                                "description": "重新分派故障总数量，仅统计分派给此处理人，但又被转派给其他人的情况",
                                "title": "重新分派故障数量"
                              },
                              "total_incidents_escalated": {
                                "type": "integer",
                                "title": "被升级的故障数量",
                                "description": "被升级故障总数量，仅统计分派给此处理人，但又被升级给其他人的情况"
                              },
                              "total_incidents_manually_escalated": {
                                "type": "integer",
                                "title": "被手动升级的故障数量",
                                "description": "被处理人手动升级给除自己以外的其他人的故障总数量"
                              },
                              "total_incidents_timeout_escalated": {
                                "type": "integer",
                                "title": "被自动升级的故障数量",
                                "description": "被自动升级给除当前处理人以外的其他人的故障总数量"
                              },
                              "total_notifications": {
                                "type": "integer",
                                "title": "通知总数",
                                "description": "统计所有渠道的分派通知总次数"
                              },
                              "total_interruptions": {
                                "type": "integer",
                                "title": "中断总数",
                                "description": "仅统计短信、语音、APP推送三种渠道的分派通知。一个响应人员多渠道同时推送仅算一次中断，如果距离上一次通知不超过1分钟，不算中断。eg：故障10点发生分派，接下来5分钟持续通知，仅算一次中断"
                              },
                              "total_engaged_seconds": {
                                "type": "integer",
                                "description": "处理人员参与故障处理的耗时总和。一个人的处理耗时为该人员从认领到故障被关闭的时间差（close_time-ack_time），可能会包含暂缓时间。如果无人认领，该值为0。",
                                "title": "响应投入总时间"
                              },
                              "mean_seconds_to_ack": {
                                "type": "number",
                                "description": "平均认领耗时（ack_time-start_time）。",
                                "title": "平均认领耗时"
                              },
                              "ts": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "title": "时间段开始时间",
                                "description": "秒时间戳，根据是否是时间粒度汇聚数据决定是否展示。如aggregate_unit为day时，此值将根据time_zone确定为当天零点的时间戳"
                              },
                              "hours": {
                                "type": "string",
                                "title": "时间类型",
                                "description": "将每一小时定义为工作时间、休息时间和睡眠时间中的任一种。来区分不同时间段下的指标差异。当不进行时间段筛选时，不展示此字段。一个故障的时间类型仅取决于其发生时间，即使该故障存活时间跨越多个时间类型，也不会进行拆分。",
                                "enum": [
                                  "work",
                                  "off",
                                  "sleep"
                                ]
                              },
                              "responder_id": {
                                "type": "integer",
                                "title": "成员ID",
                                "description": "成员ID"
                              },
                              "responder_name": {
                                "type": "string",
                                "title": "成员名称",
                                "description": "成员名称"
                              }
                            }
                          }
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/insight/responder/export": {
      "post": {
        "summary": "个人维度指标导出",
        "deprecated": false,
        "description": "",
        "tags": [
          "分析看板"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "start_time": {
                    "type": "integer",
                    "title": "开始时间",
                    "description": "秒时间戳，故障的触发时间需大于此时间"
                  },
                  "end_time": {
                    "type": "integer",
                    "title": "结束时间",
                    "description": "秒时间戳，故障的触发时间需小于等于此时间。最大时间跨度6个月，若aggregate_unit聚合粒度为day，则最大时间跨度6个月"
                  },
                  "team_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "团队列表",
                    "description": "团队列表，与is_my_team同时传入时，取交集"
                  },
                  "is_my_team": {
                    "type": "boolean",
                    "title": "我的团队",
                    "description": "与team_ids同时传入时，取交集"
                  },
                  "channel_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "协作空间列表",
                    "description": "空间列表，仅可选择您可见的空间"
                  },
                  "severities": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "Info",
                        "Warning",
                        "Critical"
                      ]
                    },
                    "title": "严重程度",
                    "description": "严重程度"
                  },
                  "time_zone": {
                    "type": "string",
                    "title": "时区",
                    "description": "默认时区 Asia/Shanghai，用于结果和分组的时区。必须是 tzdata 格式。请参阅[此处](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)可接受的值列表",
                    "default": "Asia/Shanghai"
                  },
                  "query": {
                    "type": "string",
                    "title": "故障标题",
                    "description": "支持模糊匹配"
                  },
                  "labels": {
                    "type": "object",
                    "properties": {},
                    "title": "故障标签",
                    "description": "以键值对形式表示的一至多个故障标签，精确匹配"
                  },
                  "fields": {
                    "type": "object",
                    "properties": {},
                    "title": "自定义字段",
                    "description": "以键值对形式表示的一至多个自定义字段，仅支持基于非文本类型的自定义字段的数据筛选。精确匹配"
                  },
                  "seconds_to_close_from": {
                    "type": "integer",
                    "title": "最短存活时间",
                    "description": "传入非0值时筛选存活时间大于等于该值的故障，不支持对个人维度指标的筛选"
                  },
                  "seconds_to_close_to": {
                    "type": "integer",
                    "title": "最长存活时间",
                    "description": "传入非0值时筛选存活时间小于该值的故障，不支持对个人维度指标的筛选"
                  },
                  "seconds_to_ack_from": {
                    "type": "integer",
                    "title": "最短认领耗时",
                    "description": "传入非0值时筛选认领耗时大于等于该值的故障"
                  },
                  "seconds_to_ack_to": {
                    "type": "integer",
                    "title": "最长认领耗时",
                    "description": "传入非0值时筛选认领耗时小于该值的故障"
                  },
                  "responder_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "成员ID列表",
                    "description": "成员ID列表"
                  },
                  "export_fields": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "responder_id",
                        "responder_name",
                        "total_incident_cnt",
                        "total_incidents_acknowledged",
                        "total_incidents_reassigned",
                        "total_incidents_escalated",
                        "total_incidents_manually_escalated",
                        "total_incidents_timeout_escalated",
                        "total_interruptions",
                        "total_notifications",
                        "total_engaged_seconds",
                        "mean_seconds_to_ack",
                        "acknowledgement_pct",
                        "hours"
                      ]
                    },
                    "title": "导出字段",
                    "description": "默认全导出"
                  }
                },
                "required": [
                  "start_time",
                  "end_time",
                  "query",
                  "labels",
                  "fields"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/report/oncall/notifications": {
      "post": {
        "summary": "通知数量",
        "deprecated": false,
        "description": "",
        "tags": [
          "分析看板"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "title": "协作空间列表",
                    "description": "为空代表查全部"
                  },
                  "step": {
                    "type": "string",
                    "title": "统计周期",
                    "description": "天，周，月",
                    "enum": [
                      "day",
                      "week",
                      "month"
                    ]
                  },
                  "start_time": {
                    "type": "integer",
                    "title": "开始时间戳"
                  },
                  "end_time": {
                    "type": "integer",
                    "title": "结束时间戳"
                  }
                },
                "required": [
                  "step",
                  "start_time",
                  "end_time"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "ts": {
                                "title": "时间戳",
                                "type": "integer",
                                "description": "每一个周期的end_time"
                              },
                              "sms_cnt": {
                                "type": "integer",
                                "title": "短信数量"
                              },
                              "voice_cnt": {
                                "type": "integer",
                                "title": "语音数量"
                              },
                              "email_cnt": {
                                "type": "integer",
                                "title": "邮件数量"
                              }
                            },
                            "required": [
                              "ts",
                              "sms_cnt",
                              "email_cnt",
                              "voice_cnt"
                            ]
                          }
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/report/oncall/changes": {
      "post": {
        "summary": "变更数量",
        "deprecated": false,
        "description": "时间跨度最多支持6个月",
        "tags": [
          "分析看板"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "step": {
                    "type": "string",
                    "title": "统计周期",
                    "description": "天，周，月",
                    "enum": [
                      "day",
                      "week",
                      "month"
                    ]
                  },
                  "start_time": {
                    "type": "integer",
                    "title": "开始时间戳"
                  },
                  "end_time": {
                    "type": "integer",
                    "title": "结束时间戳"
                  }
                },
                "required": [
                  "step",
                  "end_time",
                  "start_time"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "ts": {
                                "title": "时间戳",
                                "type": "integer",
                                "description": "每一个周期的end_time"
                              },
                              "change_cnt": {
                                "type": "integer",
                                "title": "变更数量"
                              },
                              "change_event_cnt": {
                                "type": "integer",
                                "title": "变更事件数量"
                              }
                            },
                            "required": [
                              "ts",
                              "change_cnt",
                              "change_event_cnt"
                            ]
                          }
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/person/app-key/create": {
      "post": {
        "summary": "Key创建",
        "deprecated": false,
        "description": "仅账户owner身份可调用此api。常用于自动化场景，后台申请成员身份app-key，并以成员身份调用故障处理（eg.认领故障）相关api。\n\n注意：\n1. 一个成员可至多创建5个app-key，该app-key对成员自身不可见。\n2. app-key完全代表一个成员，拥有其所有权限，请谨慎调用。\n3. <span style=\"color: red;\">响应结果中包含秘钥，请安全的保存并定期更换，您无法通过其他api获取到秘钥。</span>",
        "tags": [
          "APP Key"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key_name": {
                    "type": "string",
                    "description": "key name"
                  },
                  "is_enabled": {
                    "type": "boolean",
                    "description": "是否直接启用"
                  },
                  "person_id": {
                    "type": "integer",
                    "description": "key所属用户，仅使用账户owner身份调用api时可以传入"
                  }
                },
                "required": [
                  "key_name"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "key_id": {
                          "type": "integer",
                          "description": "ID"
                        },
                        "key_name": {
                          "type": "string",
                          "description": "名称"
                        },
                        "key": {
                          "type": "string",
                          "description": "app key <span style=\"color: red;\">请安全的保存此秘钥，您无法通过查询api来获取</span>"
                        }
                      },
                      "required": [
                        "key_id",
                        "key_name",
                        "key"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/person/app-key/delete": {
      "post": {
        "summary": "Key删除",
        "deprecated": false,
        "description": "仅账户owner身份可调用此api，仅可操作由owner申请到的app-key",
        "tags": [
          "APP Key"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Flashcat-Mfa-Code",
            "in": "header",
            "description": "mfa验证码",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Flashcat-Mfa-Device",
            "in": "header",
            "description": "mfa设备",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key_id": {
                    "type": "integer",
                    "description": "ID"
                  },
                  "person_id": {
                    "type": "integer",
                    "description": "key所属用户，仅使用账户owner身份调用api时可以传入"
                  }
                },
                "required": [
                  "key_id"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/person/app-key/enable": {
      "post": {
        "summary": "Key启用",
        "deprecated": false,
        "description": "仅账户owner身份可调用此api，仅可操作由owner申请到的app-key",
        "tags": [
          "APP Key"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Flashcat-Mfa-Code",
            "in": "header",
            "description": "mfa验证码",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Flashcat-Mfa-Device",
            "in": "header",
            "description": "mfa设备",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key_id": {
                    "type": "integer",
                    "description": "ID"
                  },
                  "person_id": {
                    "type": "integer",
                    "description": "key所属用户，仅使用账户owner身份调用api时可以传入"
                  }
                },
                "required": [
                  "key_id"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/person/app-key/disable": {
      "post": {
        "summary": "Key禁用",
        "deprecated": false,
        "description": "仅账户owner身份可调用此api，仅可操作由owner申请到的app-key",
        "tags": [
          "APP Key"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Flashcat-Mfa-Code",
            "in": "header",
            "description": "mfa验证码",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Flashcat-Mfa-Device",
            "in": "header",
            "description": "mfa设备",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key_id": {
                    "type": "integer",
                    "description": "ID"
                  },
                  "person_id": {
                    "type": "integer",
                    "description": "key所属用户，仅使用账户owner身份调用api时可以传入"
                  }
                },
                "required": [
                  "key_id"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/person/app-key/name/reset": {
      "post": {
        "summary": "Key更新名称",
        "deprecated": false,
        "description": "仅账户owner身份可调用此api，仅可操作由owner申请到的app-key",
        "tags": [
          "APP Key"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key_id": {
                    "type": "integer",
                    "description": "ID"
                  },
                  "key_name": {
                    "type": "string",
                    "description": "新名称"
                  },
                  "person_id": {
                    "type": "integer",
                    "description": "key所属用户，仅使用账户owner身份调用api时可以传入"
                  }
                },
                "required": [
                  "key_id",
                  "key_name"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/person/app-key/list": {
      "post": {
        "summary": "Key列表",
        "deprecated": false,
        "description": "仅账户owner身份可调用此api，仅可查询由owner申请到的app-key",
        "tags": [
          "APP Key"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "p": {
                    "type": "integer",
                    "description": "页码",
                    "default": 1
                  },
                  "limit": {
                    "type": "integer",
                    "description": "页内数量",
                    "maximum": 20
                  },
                  "orderby": {
                    "type": "string",
                    "description": "排序依据 支持created_at updated_at"
                  },
                  "asc": {
                    "type": "boolean",
                    "description": "是否升序"
                  },
                  "person_id": {
                    "type": "integer",
                    "description": "key所属用户，仅使用账户owner身份调用api时可以传入"
                  }
                },
                "required": [
                  "p",
                  "limit",
                  "asc",
                  "orderby"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "$ref": "#/components/schemas/APP%20Key"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/rum/application/list": {
      "post": {
        "summary": "应用列表",
        "deprecated": false,
        "description": "",
        "tags": [
          "RUM/应用管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "p": {
                    "type": "integer",
                    "description": "页码，从1开始"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "分页条数"
                  },
                  "asc": {
                    "type": "boolean",
                    "description": "是否升序"
                  },
                  "orderby": {
                    "type": "string",
                    "description": "排序依据",
                    "enum": [
                      "created_at"
                    ]
                  },
                  "query": {
                    "type": "string",
                    "description": "查询关键词，检索范围：名称"
                  },
                  "team_id": {
                    "type": "integer",
                    "description": "团队ID，筛选此团队管理的空间"
                  },
                  "is_my_team": {
                    "type": "boolean",
                    "description": "我团队的，筛选我所在团队下属的应用"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Application"
                          },
                          "description": "应用列表"
                        },
                        "has_next_page": {
                          "type": "boolean",
                          "description": "是否有下一页"
                        },
                        "total": {
                          "type": "integer",
                          "description": "总条目数"
                        }
                      },
                      "required": [
                        "items",
                        "has_next_page",
                        "total"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/rum/application/info": {
      "post": {
        "summary": "应用详情",
        "deprecated": false,
        "description": "",
        "tags": [
          "RUM/应用管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "application_id": {
                    "type": "string",
                    "description": "应用ID"
                  }
                },
                "required": [
                  "application_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Application"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/rum/application/infos": {
      "post": {
        "summary": "批量应用详情",
        "deprecated": false,
        "description": "",
        "tags": [
          "RUM/应用管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "application_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "应用ID列表"
                  }
                },
                "required": [
                  "application_ids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Application"
                          }
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/rum/application/create": {
      "post": {
        "summary": "应用创建",
        "deprecated": false,
        "description": "",
        "tags": [
          "RUM/应用管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "application_name": {
                    "type": "string",
                    "description": "应用名称",
                    "maxLength": 40,
                    "minLength": 1
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "browser"
                    ],
                    "description": "应用类型"
                  },
                  "team_id": {
                    "type": "integer",
                    "description": "负责团队ID"
                  },
                  "is_private": {
                    "type": "boolean",
                    "description": "是否私有访问，不传默认公开"
                  },
                  "no_geo": {
                    "type": "boolean",
                    "description": "是否避免收集地理信息"
                  },
                  "no_ip": {
                    "type": "boolean",
                    "description": "是否避免收集ip信息"
                  },
                  "alerting": {
                    "$ref": "#/components/schemas/ApplicationAlerting",
                    "description": "告警配置"
                  },
                  "tracing": {
                    "$ref": "#/components/schemas/ApplicationTracing",
                    "description": "Tracing配置"
                  }
                },
                "required": [
                  "application_name",
                  "type",
                  "team_id"
                ]
              },
              "example": {
                "application_name": "app-from-bai",
                "type": "web",
                "team_id": 4291079133131,
                "is_private": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "application_id": {
                          "type": "string",
                          "description": "应用ID"
                        },
                        "application_name": {
                          "type": "string",
                          "title": "名称",
                          "description": "应用名称"
                        },
                        "client_token": {
                          "type": "string",
                          "description": "应用client_token"
                        }
                      },
                      "required": [
                        "application_id",
                        "application_name",
                        "client_token"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/rum/application/update": {
      "post": {
        "summary": "应用更新",
        "deprecated": false,
        "description": "",
        "tags": [
          "RUM/应用管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "application_id": {
                    "type": "string",
                    "description": "应用ID"
                  },
                  "application_name": {
                    "type": "string",
                    "description": "应用名称，不传不更新",
                    "maxLength": 40,
                    "minLength": 1
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "browser"
                    ],
                    "description": "应用类型，不传不更新"
                  },
                  "team_id": {
                    "type": "integer",
                    "description": "负责团队ID"
                  },
                  "is_private": {
                    "type": "boolean",
                    "description": "是否私有访问，不传不更新"
                  },
                  "no_geo": {
                    "type": "boolean",
                    "description": "是否避免收集地理信息，不传不更新"
                  },
                  "no_ip": {
                    "type": "boolean",
                    "description": "是否避免收集ip信息，不传不更新"
                  },
                  "alerting": {
                    "$ref": "#/components/schemas/ApplicationAlerting",
                    "description": "告警配置，不传不更新"
                  },
                  "tracing": {
                    "$ref": "#/components/schemas/ApplicationTracing",
                    "description": "Tracing配置，不传不更新"
                  }
                },
                "required": [
                  "team_id",
                  "application_id"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/rum/application/delete": {
      "post": {
        "summary": "应用删除",
        "deprecated": false,
        "description": "",
        "tags": [
          "RUM/应用管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "application_id": {
                    "type": "string",
                    "description": "应用ID"
                  }
                },
                "required": [
                  "application_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "refs": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Reference"
                          },
                          "title": "关联资源列表"
                        }
                      },
                      "required": [
                        "refs"
                      ],
                      "description": "仅code=ReferenceExist时存在"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/rum/issue/list": {
      "post": {
        "summary": "Issue列表",
        "deprecated": false,
        "description": "",
        "tags": [
          "RUM/错误追踪"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "start_time": {
                    "type": "integer",
                    "description": "开始时间戳，单位毫秒"
                  },
                  "end_time": {
                    "type": "integer",
                    "description": "结束时间戳，单位毫秒"
                  },
                  "p": {
                    "type": "integer",
                    "description": "页码，从1开始"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "分页条数"
                  },
                  "asc": {
                    "type": "boolean",
                    "description": "是否升序"
                  },
                  "orderby": {
                    "type": "string",
                    "description": "排序依据",
                    "enum": [
                      "created_at",
                      "updated_at",
                      "session_count",
                      "error_count"
                    ]
                  },
                  "dql": {
                    "type": "string",
                    "description": "DQL模式，与SQL模式只能有一个存在"
                  },
                  "sql": {
                    "type": "string",
                    "description": "过滤条件SQL模式，与DQL模式二者仅能有一个，同时存在报错。注意sql仅可包含where条件部分，如'a=b and c > 10'，不包含limit/order/group/select等部分"
                  },
                  "team_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "负责团队"
                  },
                  "application_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "应用ID列表"
                  },
                  "statuses": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "for_review",
                        "reviewed",
                        "ignored",
                        "resolved"
                      ]
                    },
                    "description": "状态列表"
                  },
                  "suspected_causes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "api.failed_request",
                        "network.error",
                        "code.exception",
                        "code.invalid_object_access",
                        "code.invalid_argument",
                        "unknown"
                      ]
                    },
                    "description": "可疑原因列表"
                  },
                  "error_required": {
                    "type": "boolean",
                    "description": "是否仅返回error已完成（异步）写入的issue"
                  },
                  "by_intersection": {
                    "type": "boolean",
                    "description": "是否交集查询，如果是则查询条件为 created_at < end_time and last_seen_timestamp >= start_time。否则默认为点查询，查询条件为 start_time <= created_at < end_time"
                  }
                },
                "required": [
                  "start_time",
                  "end_time"
                ]
              },
              "example": {
                "end_time": 1743560987,
                "start_time": 1743474587,
                "sql": "env = 'production' "
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "错误描述"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Issue"
                          },
                          "description": "Issue列表"
                        },
                        "has_next_page": {
                          "type": "boolean",
                          "description": "是否有下一页"
                        },
                        "total": {
                          "type": "integer",
                          "description": "Issue总数"
                        }
                      },
                      "required": [
                        "items",
                        "total",
                        "has_next_page"
                      ],
                      "description": "响应数据"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/rum/issue/info": {
      "post": {
        "summary": "Issue详情",
        "deprecated": false,
        "description": "",
        "tags": [
          "RUM/错误追踪"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "issue_id": {
                    "type": "string",
                    "description": "Issue ID"
                  }
                },
                "required": [
                  "issue_id"
                ]
              },
              "example": ""
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "issue_id": {
                          "description": "Issue ID",
                          "type": "string"
                        },
                        "application_id": {
                          "type": "string",
                          "description": "应用ID"
                        },
                        "application_name": {
                          "type": "string",
                          "description": "应用名称"
                        },
                        "service": {
                          "type": "string",
                          "description": "服务名称，来源于sdk上报"
                        },
                        "status": {
                          "type": "string",
                          "description": "状态",
                          "enum": [
                            "for_review",
                            "reviewed",
                            "ignored",
                            "resolved"
                          ]
                        },
                        "error_count": {
                          "description": "错误累计次数",
                          "type": "integer"
                        },
                        "session_count": {
                          "type": "integer",
                          "description": "会话累计次数"
                        },
                        "is_crash": {
                          "description": "是否导致崩溃",
                          "type": "boolean",
                          "title": "？"
                        },
                        "first_seen": {
                          "$ref": "#/components/schemas/IssueSeenRecord",
                          "description": "首次发生记录"
                        },
                        "last_seen": {
                          "$ref": "#/components/schemas/IssueSeenRecord",
                          "description": "上一次发生记录"
                        },
                        "age": {
                          "type": "integer",
                          "description": "持续时间，秒，last_seen.timestamp-first_seen.timestamp"
                        },
                        "error": {
                          "type": "object",
                          "properties": {
                            "message": {
                              "type": "string",
                              "description": "错误信息"
                            },
                            "type": {
                              "type": "string",
                              "description": "错误类型"
                            }
                          },
                          "required": [
                            "message",
                            "type"
                          ],
                          "description": "错误描述"
                        },
                        "suspected_cause": {
                          "$ref": "#/components/schemas/SuspectedCause",
                          "description": "原因描述"
                        },
                        "team_id": {
                          "type": "integer",
                          "description": "团队ID"
                        },
                        "regression": {
                          "$ref": "#/components/schemas/IssueRegression",
                          "description": "重开描述"
                        }
                      },
                      "required": [
                        "issue_id",
                        "application_id",
                        "application_name",
                        "service",
                        "status",
                        "error_count",
                        "session_count",
                        "first_seen",
                        "last_seen",
                        "age",
                        "error",
                        "suspected_cause",
                        "team_id"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/rum/issue/update": {
      "post": {
        "summary": "Issue更新",
        "deprecated": false,
        "description": "",
        "tags": [
          "RUM/错误追踪"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "issue_id": {
                    "type": "string",
                    "description": "Issue ID"
                  },
                  "status": {
                    "type": "string",
                    "description": "状态",
                    "enum": [
                      "for_review",
                      "reviewed",
                      "ignored",
                      "resolved"
                    ]
                  },
                  "suspected_cause": {
                    "type": "string",
                    "description": "可疑来源"
                  }
                },
                "required": [
                  "issue_id"
                ]
              },
              "example": ""
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/rum/data/query": {
      "post": {
        "summary": "数据查询",
        "deprecated": false,
        "description": "",
        "tags": [
          "RUM/通用接口"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "queries": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/SqlQueryInput"
                    },
                    "description": "并行请求列表"
                  },
                  "start_time": {
                    "type": "integer",
                    "description": "开始时间戳，单位毫秒"
                  },
                  "end_time": {
                    "type": "integer",
                    "description": "结束时间戳，单位毫秒"
                  }
                },
                "required": [
                  "queries",
                  "start_time",
                  "end_time"
                ]
              },
              "example": "{\n    \"start_time\": 1742440860,\n    \"end_time\": 1743088862,\n    \"queries\": [\n        {\n            \"id\": \"errorCountGraph\",\n            \"sql\": \"select count(*) as `cnt` from `errors` where `issue_id` = \\'M9qGLr7g9RAGbiHqPEDMCY\\' and `application_id` = \\'eWbr4xk3ZRnLabRa6unqwD\\' limit 200\",\n            \"format\": \"time_series\",\n            \"interval\": 86400,\n            \"max_points\": 1226\n        }\n    ]\n}\n\n"
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "错误信息，仅当错误时返回"
                    },
                    "data": {
                      "type": "object",
                      "patternProperties": {
                        "^.*$": {
                          "$ref": "#/components/schemas/SqlQueryResult",
                          "description": "请求 ID 编号"
                        }
                      },
                      "additionalProperties": false,
                      "properties": {},
                      "description": "数据响应，仅当正常时返回，每个请求id作为索引，对应内容为此请求的响应，一个请求失败不影响其他请求的执行。"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/rum/field/list": {
      "post": {
        "summary": "字段列表",
        "deprecated": false,
        "description": "字段列表返回包含facets，以及其他可供查询的字段",
        "tags": [
          "RUM/通用接口"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "session",
                        "long_task",
                        "issues",
                        "error",
                        "resource",
                        "action",
                        "vital",
                        "sourcemap",
                        "view"
                      ]
                    },
                    "description": "生效范围，不传查全部"
                  },
                  "is_facet": {
                    "type": "boolean",
                    "description": "是否来自facet"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "description": "错误描述"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Field"
                          },
                          "description": "字段列表"
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/rum/facet/count": {
      "post": {
        "summary": "分值统计",
        "deprecated": false,
        "description": "",
        "tags": [
          "RUM/通用接口"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "start_time": {
                    "type": "integer",
                    "description": "开始时间戳，单位毫秒"
                  },
                  "end_time": {
                    "type": "integer",
                    "description": "结束时间戳，单位毫秒"
                  },
                  "scope": {
                    "type": "string",
                    "description": "查找范围",
                    "enum": [
                      "session",
                      "view",
                      "action",
                      "error",
                      "resource",
                      "long_task",
                      "vital",
                      "issue",
                      "sourcemap"
                    ]
                  },
                  "facet_key": {
                    "type": "string",
                    "enum": [
                      "created_at"
                    ],
                    "description": "分面Key"
                  },
                  "facet_value": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      }
                    ],
                    "description": "搜索给定分面值。<span style=\"color: red;\">如果不传</span>，将执行占位符搜索，返回所搜索分面的所有分面值，最多返回limit指定个数。<span style=\"color: red;\">如果传入（即使是零值）</span>，将精确检索此分面值。"
                  },
                  "dql": {
                    "type": "string",
                    "description": "过滤条件，与sql可同时存在"
                  },
                  "sql": {
                    "type": "string",
                    "description": "标准SQL，但仅可包含where条件部分，如'a=b and c > 10'，不包含limit/order/group/select等部分，也不包含WHERE关键字。与dql可同时存在"
                  },
                  "limit": {
                    "type": "integer",
                    "default": 50,
                    "maximum": 100,
                    "description": "返回分面值个数"
                  }
                },
                "required": [
                  "facet_key",
                  "scope",
                  "start_time",
                  "end_time"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/FacetCount"
                          },
                          "description": "应用列表"
                        }
                      },
                      "required": [
                        "items"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/sourcemap/upload": {
      "post": {
        "summary": "上传",
        "deprecated": false,
        "description": "",
        "tags": [
          "RUM/Sourcemap"
        ],
        "parameters": [
          {
            "name": "DD-EVP-ORIGIN",
            "in": "header",
            "description": "来源标识，固定值",
            "required": true,
            "example": "datadog-ci_sourcemaps",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "DD-EVP-ORIGIN-VERSION",
            "in": "header",
            "description": "当前cli版本号",
            "required": true,
            "example": "3.0.2",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Encoding",
            "in": "header",
            "description": "",
            "required": true,
            "example": "gzip",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "encoding": {
                "event": {
                  "contentType": "application/json"
                },
                "repository": {
                  "contentType": "application/json"
                }
              },
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "description": "sourcemap元信息",
                    "example": "\"{\n  \"cli_version\": \"3.0.2\",\n  \"minified_url\": \"/assets/xml-edfbbf8a.js\",\n  \"project_path\": \"\",\n  \"service\": \"fd-console\",\n  \"type\": \"js_sourcemap\",\n  \"version\": \"1.0.0\",\n  \"git_repository_url\": \"git@github.com:flashcatcloud/fc-foundation-app.git\",\n  \"git_commit_sha\": \"2577bcc913e7d8a94d8dfacca4c73bca1fa91dc2\"\n}\"",
                    "type": "string"
                  },
                  "source_map": {
                    "format": "binary",
                    "type": "string",
                    "description": "sourcemap文件流（JavaScript）",
                    "example": "saas-web/assets/xml-edfbbf8a.js.map"
                  },
                  "minified_file": {
                    "format": "binary",
                    "type": "string",
                    "description": "混淆后的文件流（JavaScript）",
                    "example": "saas-web/assets/xml-edfbbf8a.js"
                  },
                  "repository": {
                    "description": "git payload信息（trackedFiles）",
                    "example": "{\n  \"gitCommitSha\": \"\",\n  \"gitRepositoryPayload\": {\n    \"data\": [\n      {\n        \"files\": [],\n        \"hash\": \"\",\n        \"repository_url\": \"\"\n      }\n    ],\n    \"version\": 1\n  },\n  \"gitRepositoryURL\": \"\"\n}",
                    "type": "string"
                  },
                  "jvm_mapping_file": {
                    "format": "binary",
                    "type": "string",
                    "description": "mapping.txt（Android）",
                    "example": ""
                  }
                },
                "required": [
                  "event"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "错误响应"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-header-DD-API-KEY": []
          }
        ]
      }
    },
    "/sourcemap/list": {
      "post": {
        "summary": "列表",
        "deprecated": false,
        "description": "",
        "tags": [
          "RUM/Sourcemap"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "sourcemap类型",
                    "enum": [
                      "browser",
                      "android",
                      "ios",
                      "react native",
                      "flutter"
                    ]
                  },
                  "services": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "服务名称列表"
                  },
                  "versions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "服务版本号列表"
                  },
                  "build_id": {
                    "type": "string",
                    "description": "（仅Android）构建ID"
                  },
                  "uuid": {
                    "type": "string",
                    "description": "（仅iOS）UUID"
                  },
                  "query": {
                    "type": "string",
                    "description": "文件名称模糊匹配"
                  },
                  "p": {
                    "type": "integer",
                    "description": "分页",
                    "minimum": 1,
                    "default": 1
                  },
                  "limit": {
                    "type": "integer",
                    "description": "页内数量",
                    "maximum": 100,
                    "default": 20,
                    "minimum": 1
                  },
                  "start_time": {
                    "type": "integer",
                    "description": "开始时间戳，单位毫秒"
                  },
                  "end_time": {
                    "type": "integer",
                    "description": "结束时间戳，单位毫秒"
                  },
                  "orderby": {
                    "type": "string",
                    "description": "排序依据，支持created_at和updated_at，默认使用created_at"
                  },
                  "asc": {
                    "type": "string",
                    "description": "是否正序，默认false"
                  }
                },
                "required": [
                  "type",
                  "start_time",
                  "end_time"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "错误响应"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Sourcemap"
                          },
                          "description": "匹配列表"
                        },
                        "total": {
                          "type": "integer",
                          "description": "总条目数"
                        }
                      },
                      "required": [
                        "items",
                        "total"
                      ],
                      "description": "数据响应"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/sourcemap/stack/enrich": {
      "post": {
        "summary": "错误栈信息丰富",
        "deprecated": false,
        "description": "",
        "tags": [
          "RUM/Sourcemap"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "sourcemap类型",
                    "enum": [
                      "browser",
                      "android",
                      "ios",
                      "react native",
                      "flutter"
                    ]
                  },
                  "service": {
                    "type": "string",
                    "description": "服务名称"
                  },
                  "version": {
                    "type": "string",
                    "description": "服务版本号"
                  },
                  "stack": {
                    "type": "string",
                    "description": "原始错误栈"
                  },
                  "near": {
                    "type": "integer",
                    "description": "返回前后多少行代码",
                    "maximum": 20,
                    "minimum": 1
                  },
                  "build_id": {
                    "type": "string",
                    "description": "（仅Android）构建ID， Gradle plugin >= 1.13.0"
                  },
                  "Variant": {
                    "type": "string",
                    "description": "（仅Android）变量，Gradle plugin 老版本"
                  },
                  "binary_images": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/BinaryImage"
                    },
                    "description": "（仅iOS）运行信息"
                  }
                },
                "required": [
                  "service",
                  "stack",
                  "type",
                  "binary_images"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "错误响应"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "frames": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/StackFrame"
                          },
                          "description": "匹配列表"
                        }
                      },
                      "required": [
                        "frames"
                      ],
                      "description": "数据响应"
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/rum/session-replay/metadata": {
      "post": {
        "summary": "获取元数据",
        "deprecated": false,
        "description": "",
        "tags": [
          "RUM/会话回放"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "session_id": {
                    "type": "string",
                    "description": "会话ID"
                  },
                  "ts": {
                    "type": "integer",
                    "description": "会话时间戳，毫秒"
                  }
                },
                "required": [
                  "session_id",
                  "ts"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError"
                    },
                    "data": {
                      "$ref": "#/components/schemas/ReplayMeta"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/rum/session-replay/segments": {
      "post": {
        "summary": "获取回放片段",
        "deprecated": false,
        "description": "",
        "tags": [
          "RUM/会话回放"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": false,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "session_id": {
                    "type": "string",
                    "description": "会话ID"
                  },
                  "search_after_ctx": {
                    "type": "string",
                    "description": "起始查询游标"
                  },
                  "view_id": {
                    "type": "string",
                    "description": "视图ID，如果指定则仅获取该视图下的回放片段"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "每页返回数量",
                    "default": 20,
                    "maximum": 100,
                    "minimum": 1
                  },
                  "ts": {
                    "type": "integer",
                    "description": "起始查询时间（毫秒），当search_after_ctx为空时生效。用于按时间点进行跳跃播放。如果传入，系统将返回早于此时间点的全量快照记录之后的记录。"
                  },
                  "url_mode": {
                    "type": "boolean",
                    "description": "是否启用URL模式，如果是，将返回segment下载地址，需要通过下载地址获取数据并解压。否则将返回json line格式的原始数据"
                  }
                },
                "required": [
                  "session_id"
                ]
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/DutyError",
                      "description": "错误"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/ReplaySegment",
                                "description": "segment数据"
                              },
                              {
                                "type": "string",
                                "description": "预签名segment下载地址"
                              }
                            ]
                          },
                          "description": "片段列表"
                        }
                      },
                      "required": [
                        "items"
                      ],
                      "description": "数据"
                    },
                    "search_after_ctx": {
                      "type": "string",
                      "description": "如果存在额外数据，返回此游标"
                    }
                  }
                }
              }
            },
            "headers": {
              "Content-Type": {
                "example": "application/json",
                "required": false,
                "description": "",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/monit/rule/create": {
      "post": {
        "summary": "创建告警规则",
        "deprecated": false,
        "description": "在指定分组节点下创建一条新的告警规则。",
        "tags": [
          "Monitors/告警规则/管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "固定值 application/json。",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertRuleCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "创建成功，data 为完整规则对象（含服务端填充的 id、创建者、时间戳等）。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertRuleResponse"
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/monit/rule/info": {
      "post": {
        "summary": "查询告警规则详情",
        "deprecated": false,
        "description": "根据 ID 查询单条告警规则。若规则不存在或不属于当前租户，返回 'alert rule not found' 错误（出于安全考虑，不区分这两种情况）。",
        "tags": [
          "Monitors/告警规则/管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "固定值 application/json。",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IDRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "data 为完整规则对象。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertRuleResponse"
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/monit/rule/update": {
      "post": {
        "summary": "更新告警规则（全量）",
        "deprecated": false,
        "description": "全量覆盖告警规则的可编辑字段。需要对规则所在分组节点有权限。",
        "tags": [
          "Monitors/告警规则/管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "固定值 application/json。",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertRuleUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "更新成功，data 为更新后的完整规则对象。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertRuleResponse"
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/monit/rule/update/fields": {
      "post": {
        "summary": "批量部分字段更新",
        "deprecated": false,
        "description": "仅更新 fields 列表中声明的字段。每条规则独立返回结果，单条失败不影响其他条目。若 fields 中包含未知字段名，则整批请求失败。",
        "tags": [
          "Monitors/告警规则/管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "固定值 application/json。",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertRuleUpdateFieldsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "data 为每条规则的更新结果。message 为空字符串表示成功。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NameWithMessageListResponse"
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/monit/rule/delete": {
      "post": {
        "summary": "删除告警规则",
        "deprecated": false,
        "description": "根据 ID 删除单条规则。规则不存在则静默返回成功。",
        "tags": [
          "Monitors/告警规则/管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "固定值 application/json。",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IDRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "成功，data 为空对象。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyDataResponse"
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/monit/rule/delete/batch": {
      "post": {
        "summary": "批量删除告警规则",
        "deprecated": false,
        "description": "根据 ID 列表批量删除规则。遇到任一规则鉴权或删除失败，立即返回错误，前序成功的删除不回滚。",
        "tags": [
          "Monitors/告警规则/管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "固定值 application/json。",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IDsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "成功，data 为空对象。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyDataResponse"
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/monit/rule/list/basic": {
      "post": {
        "summary": "列出分组节点下的告警规则（精简信息）",
        "deprecated": false,
        "description": "返回指定分组节点下所有规则的精简信息，并附带各规则在 FlashDuty 中的实时触发状态。",
        "tags": [
          "Monitors/告警规则/管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "固定值 application/json。",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FolderIDRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "data 为精简规则信息列表。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertRuleBasicListResponse"
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/monit/rule/move": {
      "post": {
        "summary": "批量移动告警规则",
        "deprecated": false,
        "description": "将一批规则移动到目标分组节点。需要对目标节点和每条规则原分组节点都有权限。移动失败的规则保持原位置。",
        "tags": [
          "Monitors/告警规则/管理"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "固定值 application/json。",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertRuleMoveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "data 为每条规则的移动结果。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NameWithMessageListResponse"
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/monit/rule/import": {
      "post": {
        "summary": "批量导入告警规则",
        "deprecated": false,
        "description": "批量导入多条告警规则。每条规则独立返回结果，允许部分成功部分失败（例如名称重复）。调用方需在每条规则中预先填充 folder_id、ds_type、ds_list 等字段。",
        "tags": [
          "Monitors/告警规则/导入导出"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "固定值 application/json。",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertRuleImportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "data 为每条规则的导入结果。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NameWithMessageListResponse"
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/monit/rule/export": {
      "post": {
        "summary": "导出告警规则",
        "deprecated": false,
        "description": "按 ID 列表导出规则，返回便于跨环境导入的 AlertRuleExport 对象（去除 id、folder_id、创建者、时间戳等）。",
        "tags": [
          "Monitors/告警规则/导入导出"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "固定值 application/json。",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IDsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "data 为导出的告警规则列表。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertRuleExportListResponse"
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/monit/rule/audits": {
      "post": {
        "summary": "列出规则的审计记录",
        "deprecated": false,
        "description": "按 rule_id 查询该规则的审计记录列表，按时间倒序排列。列表中不返回 content 字段，详情请调用 /monit/rule/audit/detail。",
        "tags": [
          "Monitors/告警规则/审计日志"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "固定值 application/json。",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IDRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "data 为审计记录列表。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertRuleAuditListResponse"
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/monit/rule/audit/detail": {
      "post": {
        "summary": "查询审计记录详情",
        "deprecated": false,
        "description": "根据 audit_id 查询单条审计记录，返回包含 content 字段（规则 JSON 快照）的完整对象。",
        "tags": [
          "Monitors/告警规则/审计日志"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "固定值 application/json。",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IDRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "data 为审计记录详情。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertRuleAuditResponse"
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/monit/rule/status": {
      "post": {
        "summary": "按分组节点直属子节点统计规则触发状态",
        "deprecated": false,
        "description": "以指定分组节点的每个直属子节点为维度，统计其家族（子树）下的规则总数与活跃告警规则数。子节点或规则数过多时会返回错误以自保。",
        "tags": [
          "Monitors/告警规则/统计"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "固定值 application/json。",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FolderIDRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "data 为每个直属子节点一条统计记录。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertRuleStatusListResponse"
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/monit/rule/counter/total": {
      "post": {
        "summary": "规则数量历史快照",
        "deprecated": false,
        "description": "首页统计接口：返回本租户历史各时刻的规则总数快照，按时间升序。",
        "tags": [
          "Monitors/告警规则/统计"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "固定值 application/json。",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "data 为规则数量快照列表。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertRuleCounterListResponse"
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/monit/rule/counter/node": {
      "post": {
        "summary": "按顶级分组节点统计规则数量",
        "deprecated": false,
        "description": "首页统计接口：返回顶级分组节点名称到规则数量的映射。",
        "tags": [
          "Monitors/告警规则/统计"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "固定值 application/json。",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "data 为分组名称到规则数量的映射。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringInt64MapResponse"
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/monit/rule/counter/channel": {
      "post": {
        "summary": "按通知通道统计规则数量",
        "deprecated": false,
        "description": "首页统计接口：返回通道名称到引用该通道的规则数量的映射。若通道名无法解析，则使用通道 ID 的字符串形式作为键。",
        "tags": [
          "Monitors/告警规则/统计"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "固定值 application/json。",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "data 为通道名称到规则数量的映射。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringInt64MapResponse"
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/monit/rule/counter/status": {
      "post": {
        "summary": "按顶级分组节点统计触发状态",
        "deprecated": false,
        "description": "首页统计接口：以每个顶级分组节点为维度，统计其家族下的规则总数和活跃告警规则数。",
        "tags": [
          "Monitors/告警规则/统计"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "固定值 application/json。",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "data 为顶级分组节点触发状态列表。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertRuleStatusListResponse"
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    },
    "/monit/rule/dstypes": {
      "post": {
        "summary": "列出规则编辑页可用的数据源类型",
        "deprecated": false,
        "description": "返回当前租户可用的数据源类型，包含公共类型（account_id=0）与本租户私有类型。",
        "tags": [
          "Monitors/告警规则/数据源"
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "固定值 application/json。",
            "required": true,
            "example": "application/json",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "data 为数据源类型列表。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DSTypeListResponse"
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-query-app_key": []
          }
        ]
      }
    }
  },
  "webhooks": {},
  "components": {
    "schemas": {
      "i_new": {
        "type": "object",
        "properties": {
          "severity": {
            "type": "string",
            "title": "严重程度"
          },
          "title": {
            "type": "string",
            "title": "故障标题"
          }
        },
        "required": [
          "severity",
          "title"
        ]
      },
      "i_assign": {
        "type": "object",
        "properties": {
          "to": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "title": "最终分派人员ID列表"
          },
          "type": {
            "type": "string",
            "description": "分派类型",
            "enum": [
              "assign",
              "reassign",
              "escalate",
              "reopen"
            ]
          },
          "person_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "description": "人员ID"
            },
            "description": "（直接分派）人员ID列表，与escalate_rule_id二选一"
          },
          "escalate_rule_id": {
            "type": "string",
            "description": "（策略分派）分派策略ID，当时存在，与person_ids二选一"
          },
          "escalate_rule_name": {
            "type": "string",
            "description": "（策略分派）分派策略名称"
          },
          "layer_idx": {
            "type": "integer",
            "description": "（策略分派）本次分派层级，当策略分派时，可以指定分派的层级，比如直接升级到第二环节"
          },
          "notify": {
            "$ref": "#/components/schemas/RequestNotify",
            "description": "本次分派通知配置（目前仅支持单聊和模板指定），可同时用于直接分派和策略分派。"
          },
          "layer_person_reset": {
            "type": "object",
            "properties": {
              "0": {
                "$ref": "#/components/schemas/PersonGroup",
                "title": "层级ID到人员替换"
              }
            },
            "description": "（策略分派）层级人员替换，当策略分派时，可以同时设置不同层级的人员，key为层级索引，从0开始。仅特殊场景使用，您可以直接忽略",
            "required": [
              "0"
            ]
          },
          "layer_webhook_reset": {
            "type": "object",
            "properties": {
              "0": {
                "$ref": "#/components/schemas/EscalateWebhook"
              }
            },
            "description": "（策略分派）层级Webhook替换，当策略分派时，可以同时设置不同层级的Webhook，key为层级索引，从0开始。仅特殊场景使用，您可以直接忽略",
            "required": [
              "0"
            ]
          },
          "emails": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "（直接分派）人员邮箱列表，可以使用此值替代person_ids，等同于进行直接分派。仅特殊场景使用，您可以直接忽略"
          }
        },
        "required": [
          "to",
          "type"
        ]
      },
      "i_notify": {
        "type": "object",
        "properties": {
          "fire_type": {
            "type": "string",
            "title": "通知类型，枚举值：fire：通知，refire：循环通知",
            "enum": [
              "fire",
              "refire"
            ]
          },
          "escalate_rule_name": {
            "type": "string",
            "title": "分派策略名称"
          },
          "escalate_rule_id": {
            "type": "string",
            "title": "分派策略ID"
          },
          "layer_idx": {
            "type": "string",
            "title": "分派环节",
            "description": " "
          },
          "by": {
            "type": "string",
            "title": "通知渠道",
            "enum": [
              "email",
              "voice",
              "sms",
              "feishu",
              "dingtalk",
              "wecom",
              "feishu_app",
              "dingtalk_app",
              "wecom_app",
              "slack_app"
            ]
          },
          "persons": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "person_id": {
                  "type": "integer",
                  "title": "人员ID"
                },
                "failed_reason": {
                  "type": "string",
                  "title": "失败原因"
                }
              },
              "required": [
                "person_id"
              ]
            },
            "title": "单聊对象列表",
            "description": "by为sms/email/vioce时一定存在，by为feishu_app/wecom_app/dingtalk_app时可能存在"
          },
          "chats": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "chat_id": {
                  "type": "string",
                  "title": "群聊ID"
                },
                "chat_name": {
                  "type": "string",
                  "title": "群聊名称"
                },
                "failed_reason": {
                  "type": "string",
                  "title": "失败原因"
                }
              },
              "required": [
                "chat_id",
                "chat_name"
              ]
            },
            "title": "群聊对象列表",
            "description": "by为feishu_app/wecom_app/dingtalk_app时可能存在"
          },
          "robots": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "token": {
                  "type": "string",
                  "title": "webhook token或url"
                },
                "alias": {
                  "type": "string",
                  "title": "别名"
                },
                "failed_reason": {
                  "type": "string",
                  "title": "失败原因"
                }
              },
              "required": [
                "token"
              ]
            },
            "title": "机器人对象列表",
            "description": "by为feishu/wecom/dingtalk时一定存在"
          }
        },
        "required": [
          "fire_type",
          "by",
          "layer_idx",
          "escalate_rule_id",
          "escalate_rule_name",
          "persons"
        ]
      },
      "i_ack": {
        "type": "object",
        "properties": {}
      },
      "i_unack": {
        "type": "object",
        "properties": {}
      },
      "i_a_rspd": {
        "type": "object",
        "properties": {
          "to": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "title": "新增分派人员ID列表"
          }
        },
        "required": [
          "to"
        ]
      },
      "i_snooze": {
        "type": "object",
        "properties": {
          "minutes": {
            "type": "integer",
            "title": "",
            "description": "屏蔽分钟"
          }
        }
      },
      "i_wake": {
        "type": "object",
        "properties": {}
      },
      "i_rslv": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "title": "动作来源",
            "enum": [
              "event",
              "autorslv",
              "console",
              "card",
              "wcard"
            ]
          }
        }
      },
      "i_reopen": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "reason"
        ]
      },
      "i_merge": {
        "type": "object",
        "properties": {
          "source_incidents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "incident_id": {
                  "type": "string",
                  "description": "故障ID"
                },
                "title": {
                  "type": "string",
                  "description": "故障标题"
                }
              },
              "required": [
                "incident_id",
                "title"
              ]
            },
            "description": "被合并故障"
          },
          "target_incident": {
            "type": "object",
            "properties": {
              "incident_id": {
                "type": "string"
              },
              "title": {
                "type": "string"
              }
            },
            "required": [
              "incident_id",
              "title"
            ],
            "description": "目标故障"
          },
          "comment": {
            "type": "string",
            "description": "评论"
          },
          "title": {
            "type": "string",
            "description": "新title"
          },
          "remove_source_incidents": {
            "type": "boolean",
            "description": "是否同时删除源故障"
          }
        },
        "required": [
          "source_incidents",
          "target_incident",
          "comment"
        ]
      },
      "i_m_flapping": {
        "type": "object",
        "properties": {
          "max_changes": {
            "type": "integer",
            "title": "状态最大变化次数"
          },
          "in_mins": {
            "type": "integer",
            "title": "单位时间，分钟"
          },
          "mute_mins": {
            "type": "integer",
            "title": "收敛时长，分钟"
          },
          "end_time": {
            "type": "integer",
            "title": "收敛结束时间戳",
            "description": "非首次收敛时存在"
          }
        },
        "required": [
          "max_changes",
          "mute_mins",
          "in_mins"
        ]
      },
      "i_storm": {
        "type": "object",
        "properties": {
          "threshold": {
            "type": "integer",
            "title": "聚合告警条数"
          }
        },
        "required": [
          "threshold"
        ]
      },
      "i_r_rc": {
        "type": "object",
        "properties": {}
      },
      "i_r_desc": {
        "type": "object",
        "properties": {}
      },
      "i_r_rsltn": {
        "type": "object",
        "properties": {}
      },
      "i_r_impact": {
        "type": "object",
        "properties": {}
      },
      "i_r_title": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "title": "修改前标题"
          },
          "to": {
            "type": "string"
          }
        },
        "required": [
          "from",
          "to"
        ]
      },
      "i_r_severity": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "title": "修改前等级"
          },
          "to": {
            "type": "string"
          }
        },
        "required": [
          "from",
          "to"
        ]
      },
      "i_r_field": {
        "type": "object",
        "properties": {
          "field_name": {
            "type": "string",
            "title": "字段名称"
          },
          "to": {
            "type": "string",
            "title": "更新值"
          }
        },
        "required": [
          "field_name",
          "to"
        ]
      },
      "i_custom": {
        "type": "object",
        "properties": {
          "integration_id": {
            "type": "integer",
            "title": "自定义操作集成ID"
          }
        },
        "required": [
          "integration_id"
        ]
      },
      "i_comm": {
        "type": "object",
        "properties": {
          "comment": {
            "type": "string"
          }
        },
        "required": [
          "comment"
        ]
      },
      "a_new": {
        "type": "object",
        "properties": {
          "severity": {
            "type": "string",
            "title": "",
            "description": "等级"
          },
          "status": {
            "type": "string",
            "description": "状态"
          }
        },
        "required": [
          "severity",
          "status"
        ]
      },
      "a_update": {
        "type": "object",
        "properties": {
          "severity": {
            "type": "string",
            "title": "",
            "description": "等级"
          },
          "status": {
            "type": "string",
            "description": "状态"
          },
          "progress": {
            "type": "string",
            "description": "仅当变更时返回"
          }
        },
        "required": [
          "severity",
          "status"
        ]
      },
      "a_merge": {
        "type": "object",
        "properties": {
          "target_incident": {
            "type": "object",
            "properties": {
              "incident_id": {
                "type": "string"
              },
              "title": {
                "type": "string"
              }
            },
            "required": [
              "incident_id",
              "title"
            ],
            "description": "目标故障"
          },
          "source_alerts": {
            "title": "",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "alert_id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                }
              },
              "required": [
                "alert_id",
                "title"
              ]
            },
            "description": "被合并告警"
          },
          "comment": {
            "type": "string",
            "title": "",
            "description": "评论"
          },
          "owner_id": {
            "type": "string",
            "description": "如有则展示。新的负责人"
          },
          "title": {
            "type": "string",
            "description": "如有则展示。新的标题"
          }
        }
      },
      "a_close": {
        "type": "object",
        "properties": {}
      },
      "a_comm": {
        "type": "object",
        "properties": {
          "comment": {
            "type": "string",
            "title": "评论"
          }
        },
        "required": [
          "comment"
        ]
      },
      "a_m_inhibit": {
        "type": "object",
        "properties": {
          "rule_id": {
            "type": "string",
            "title": "抑制规则ID"
          },
          "rule_name": {
            "type": "string",
            "title": "抑制规则名称"
          },
          "source_alert_id": {
            "type": "string",
            "title": "源告警ID"
          },
          "source_alert_title": {
            "type": "string",
            "title": "源告警标题"
          }
        },
        "required": [
          "rule_id",
          "source_alert_id",
          "rule_name",
          "source_alert_title"
        ]
      },
      "a_m_silence": {
        "type": "object",
        "properties": {
          "rule_id": {
            "type": "string",
            "title": "静默规则ID"
          },
          "rule_name": {
            "type": "string",
            "title": "静默规则名称"
          }
        },
        "required": [
          "rule_id",
          "rule_name"
        ]
      },
      "i_m_silence": {
        "type": "object",
        "properties": {
          "silence_rule_id": {
            "type": "string",
            "title": "静默规则ID"
          },
          "silence_rule_name": {
            "type": "string",
            "title": "静默规则名称"
          }
        },
        "required": [
          "silence_rule_id",
          "silence_rule_name"
        ]
      },
      "i_m_inhibit": {
        "type": "object",
        "properties": {
          "inhibit_rule_id": {
            "type": "string",
            "title": "抑制规则ID"
          },
          "inhibit_rule_name": {
            "type": "string",
            "title": "抑制规则名称"
          },
          "source_incident_id": {
            "type": "string",
            "title": "源故障ID"
          },
          "source_incident_title": {
            "type": "string",
            "title": "源故障标题"
          }
        },
        "required": [
          "inhibit_rule_id",
          "source_incident_id",
          "inhibit_rule_name",
          "source_incident_title"
        ]
      },
      "FeishuApp": {
        "type": "object",
        "properties": {
          "data_source_id": {
            "type": "integer",
            "description": "IM集成ID"
          },
          "chat_ids": {
            "type": "string",
            "description": "群聊ID列表"
          },
          "reply_mode": {
            "type": "string",
            "description": "回复模式，为空代表不回复",
            "enum": [
              "threads",
              "verbose"
            ]
          },
          "reply_event_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "订阅事件列表，在列表内的事件触发时将更新故障消息。当列表为空时，代表所有事件均需更新。"
          },
          "disable_at": {
            "type": "boolean",
            "description": "是否禁用AT提醒"
          },
          "put_top_notice": {
            "type": "boolean",
            "description": "是否置顶消息（仅作战室场景有效）"
          },
          "severities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Info",
                "Warning",
                "Critial"
              ]
            },
            "description": "是否仅针对特定严重程度的故障生效，为空代表对所有故障生效"
          }
        },
        "required": [
          "data_source_id",
          "chat_ids"
        ]
      },
      "SlackApp": {
        "type": "object",
        "properties": {
          "data_source_id": {
            "type": "integer",
            "description": "IM集成ID"
          },
          "chat_ids": {
            "type": "string",
            "description": "群聊ID列表"
          },
          "reply_mode": {
            "type": "string",
            "description": "回复模式，为空代表不回复",
            "enum": [
              "threads",
              "verbose"
            ]
          },
          "reply_event_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "订阅事件列表，在列表内的事件触发时将更新故障消息。当列表为空时，代表所有事件均需更新。"
          },
          "disable_at": {
            "type": "boolean",
            "description": "是否禁用AT提醒"
          },
          "severities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Info",
                "Warning",
                "Critical"
              ]
            },
            "description": "是否仅针对特定严重程度的故障生效，为空代表对所有故障生效"
          }
        },
        "required": [
          "data_source_id",
          "chat_ids"
        ]
      },
      "TeamsApp": {
        "type": "object",
        "properties": {
          "data_source_id": {
            "type": "integer",
            "description": "IM集成ID"
          },
          "chat_ids": {
            "type": "string",
            "description": "群聊ID列表"
          },
          "reply_mode": {
            "type": "string",
            "description": "回复模式，为空代表不回复",
            "enum": [
              "threads",
              "verbose"
            ]
          },
          "reply_event_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "订阅事件列表，在列表内的事件触发时将更新故障消息。当列表为空时，代表所有事件均需更新。"
          },
          "disable_at": {
            "type": "boolean",
            "description": "是否禁用AT提醒"
          },
          "severities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Info",
                "Warning",
                "Critical"
              ]
            },
            "description": "是否仅针对特定严重程度的故障生效，为空代表对所有故障生效"
          }
        },
        "required": [
          "data_source_id",
          "chat_ids"
        ]
      },
      "DingtalkApp": {
        "type": "object",
        "properties": {
          "data_source_id": {
            "type": "integer",
            "description": "IM集成ID"
          },
          "chat_ids": {
            "type": "string",
            "description": "群聊ID列表"
          },
          "reply_event_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "订阅事件列表，在列表内的事件触发时将更新故障消息。当列表为空时，代表所有事件均需更新。"
          },
          "disable_at": {
            "type": "boolean",
            "description": "是否禁用AT提醒"
          },
          "serverities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Info",
                "Warning",
                "Critical"
              ]
            },
            "description": "是否仅针对特定严重程度的故障生效，为空代表对所有故障生效"
          }
        },
        "required": [
          "data_source_id",
          "chat_ids"
        ]
      },
      "DingtalkRobot": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "自定义机器人token或完整推送地址，支持非官方域名地址"
          },
          "alias": {
            "type": "string",
            "description": "别名"
          },
          "reply_event_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "订阅事件列表，在列表内的事件触发时将发送更新消息。当列表为空时，代表所有事件均订阅。"
          },
          "disable_at": {
            "type": "boolean",
            "description": "是否禁用AT提醒"
          },
          "is_at_all": {
            "type": "boolean",
            "description": "是否开启AtAll"
          },
          "severities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Info",
                "Warning",
                "Critical"
              ]
            },
            "description": "是否仅针对特定严重程度的故障生效，为空代表对所有故障生效"
          }
        },
        "required": [
          "token",
          "alias"
        ]
      },
      "WecomRobot": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "自定义机器人token或完整推送地址，支持非官方域名地址"
          },
          "alias": {
            "type": "string",
            "description": "别名"
          },
          "reply_event_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "订阅事件列表，在列表内的事件触发时将发送更新消息。当列表为空时，代表所有事件均订阅。"
          },
          "disable_at": {
            "type": "boolean",
            "description": "是否禁用AT提醒"
          },
          "user_schema_id": {
            "type": "string",
            "description": "wecom用户信息映射表，source_labels只能是email，result_labels只能是wecom_userid"
          },
          "serverities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Info",
                "Warning",
                "Critical"
              ]
            },
            "description": "是否仅针对特定严重程度的故障生效，为空代表对所有故障生效"
          }
        },
        "required": [
          "token",
          "alias"
        ]
      },
      "FeishuRobot": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "自定义机器人token或完整推送地址，支持非官方域名地址"
          },
          "alias": {
            "type": "string",
            "description": "别名"
          },
          "reply_event_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "订阅事件列表，在列表内的事件触发时将发送更新消息。当列表为空时，代表所有事件均订阅。"
          },
          "user_schema_id": {
            "type": "string",
            "description": "feishu用户信息映射表，source_labels只能是email，result_labels只能是lark_userid"
          },
          "serverities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Info",
                "Warning",
                "Critical"
              ]
            },
            "description": "是否仅针对特定严重程度的故障生效，为空代表对所有故障生效"
          }
        },
        "required": [
          "token",
          "alias"
        ]
      },
      "SlackRobot": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "自定义机器人token或完整推送地址，支持非官方域名地址"
          },
          "alias": {
            "type": "string",
            "description": "别名"
          },
          "reply_event_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "订阅事件列表，在列表内的事件触发时将发送更新消息。当列表为空时，代表所有事件均订阅。"
          },
          "severities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Info",
                "Warning",
                "Critical"
              ]
            },
            "description": "是否仅针对特定严重程度的故障生效，为空代表对所有故障生效"
          }
        },
        "required": [
          "token",
          "alias"
        ]
      },
      "TelegramRobot": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "自定义机器人token或完整推送地址，支持非官方域名地址"
          },
          "alias": {
            "type": "string",
            "description": "别名"
          },
          "chat_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "群聊ID列表"
          },
          "reply_event_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "订阅事件列表，在列表内的事件触发时将发送更新消息。当列表为空时，代表所有事件均订阅。"
          },
          "severities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Info",
                "Warning",
                "Critical"
              ]
            },
            "description": "是否仅针对特定严重程度的故障生效，为空代表对所有故障生效"
          }
        },
        "required": [
          "token",
          "alias",
          "chat_ids"
        ]
      },
      "ZoomRobot": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "自定义机器人token或完整推送地址，支持非官方域名地址"
          },
          "verify_token": {
            "type": "string",
            "description": "校验token"
          },
          "alias": {
            "type": "string",
            "description": "别名"
          },
          "reply_event_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "订阅事件列表，在列表内的事件触发时将发送更新消息。当列表为空时，代表所有事件均订阅。"
          },
          "user_schema_id": {
            "type": "string",
            "description": "zoom用户信息映射表，source_labels只能是email，result_labels只能是zoom_jid"
          },
          "severities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Info",
                "Warning",
                "Critical"
              ]
            },
            "description": "是否仅针对特定严重程度的故障生效，为空代表对所有故障生效"
          }
        },
        "required": [
          "token",
          "alias",
          "verify_token"
        ]
      },
      "BrowserMapping": {
        "type": "object",
        "properties": {
          "minified_url": {
            "type": "string",
            "description": "JavaScript文件路径"
          }
        },
        "required": [
          "minified_url"
        ]
      },
      "AndroidMapping": {
        "type": "object",
        "properties": {
          "build_id": {
            "type": "string",
            "description": "构建ID， Gradle plugin 1.13.0 及以上版本"
          },
          "variant": {
            "type": "string",
            "description": "构建类型"
          },
          "version_code": {
            "type": "integer",
            "description": "版本代码"
          }
        }
      },
      "Field": {
        "type": "object",
        "properties": {
          "field_key": {
            "type": "string",
            "description": "字段标识"
          },
          "field_name": {
            "type": "string",
            "description": "字段名称"
          },
          "value_type": {
            "type": "string",
            "description": "值类型",
            "enum": [
              "number",
              "string",
              "bool",
              "array<number>",
              "array<string>"
            ]
          },
          "show_type": {
            "type": "string",
            "enum": [
              "list",
              "range"
            ],
            "description": "展示类型"
          },
          "description": {
            "type": "string",
            "description": "分面描述"
          },
          "group": {
            "type": "string",
            "description": "所属分组"
          },
          "unit_family": {
            "type": "string",
            "description": "单位族",
            "enum": [
              "time",
              "bytes"
            ]
          },
          "unit_name": {
            "type": "string",
            "description": "单位名称",
            "enum": [
              "nanosecond",
              "microsecond",
              "millisecond",
              "second",
              "byte",
              "unix_millisecond",
              "unix_second"
            ]
          },
          "edit_able": {
            "type": "boolean",
            "description": "是否可编辑"
          },
          "is_facet": {
            "type": "boolean",
            "description": "是否为分面字段，如果是分面，则一定可以查询"
          },
          "queryable": {
            "type": "boolean",
            "description": "是否可查询"
          },
          "enum_values": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "枚举值，当存在此值，往往意味着无法执行分面值计算"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "session",
                "view",
                "action",
                "error",
                "resource",
                "long_task",
                "vital",
                "sourcemap"
              ]
            },
            "description": "生效范围"
          }
        },
        "required": [
          "field_name",
          "description",
          "field_key",
          "value_type",
          "show_type",
          "edit_able",
          "scopes",
          "enum_values"
        ]
      },
      "ApplicationAlerting": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "是否开启"
          },
          "channel_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer"
            },
            "description": "投递协作空间列表"
          }
        },
        "required": [
          "enabled",
          "channel_ids"
        ]
      },
      "ApplicationTracing": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "是否开启"
          },
          "endpoint": {
            "type": "string",
            "description": "跳转链接，支持变量"
          },
          "open_type": {
            "type": "string",
            "enum": [
              "popup",
              "tab"
            ],
            "description": "跳转方式"
          }
        },
        "required": [
          "enabled",
          "open_type",
          "endpoint"
        ]
      },
      "BinaryImage": {
        "type": "object",
        "description": "BinaryImage represents a loaded binary at crash time (dSYM, .so, etc.)",
        "required": [
          "uuid",
          "name",
          "is_system"
        ],
        "properties": {
          "uuid": {
            "type": "string",
            "description": "Build UUID that uniquely identifies the binary image"
          },
          "name": {
            "type": "string",
            "description": "Name of the library"
          },
          "is_system": {
            "type": "boolean",
            "description": "Determines if it's a system or user library"
          },
          "load_address": {
            "oneOf": [
              {
                "type": "string",
                "description": "Runtime load address as hexadecimal string (e.g., \"0x100000000\")"
              },
              {
                "type": "integer",
                "description": "Runtime load address as decimal number",
                "minimum": 0
              }
            ],
            "description": "Runtime load address (hex string like \"0x100000000\" or decimal number)"
          },
          "max_address": {
            "oneOf": [
              {
                "type": "string",
                "description": "Max value from the library address range as hexadecimal string (e.g., \"0x100000000\")"
              },
              {
                "type": "integer",
                "description": "Max value from the library address range as decimal number",
                "minimum": 0
              }
            ],
            "description": "Max value from the library address range"
          },
          "arch": {
            "type": "string",
            "description": "CPU architecture from the library"
          }
        }
      },
      "PageQuery": {
        "type": "object",
        "properties": {
          "p": {
            "type": "integer",
            "description": "页码，从1开始"
          },
          "limit": {
            "type": "integer",
            "description": "分页条数"
          },
          "asc": {
            "type": "boolean",
            "description": "是否升序"
          }
        }
      },
      "TimeRange": {
        "type": "object",
        "properties": {
          "start_time": {
            "type": "integer",
            "description": "开始时间戳，单位毫秒"
          },
          "end_time": {
            "type": "integer",
            "description": "结束时间戳，单位毫秒"
          }
        },
        "required": [
          "start_time",
          "end_time"
        ]
      },
      "Reference": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "schedule",
              "team",
              "escalate_rule",
              "silence_rule",
              "channel",
              "template",
              "integration",
              "calendar"
            ],
            "description": "关联资源类型"
          },
          "href": {
            "type": "string",
            "description": "关联资源跳转地址"
          },
          "name": {
            "type": "string",
            "description": "关联资源名称"
          }
        },
        "required": [
          "kind",
          "href",
          "name"
        ]
      },
      "SqlQueryInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "请求 ID 编号。eg：A，返回结果将通过此ID索引"
          },
          "sql": {
            "type": "string",
            "description": "标准SQL，但存在以下限制：\n1. 仅支持查询语句，且只能单表查询\n2. 不支持对表或字段进行qualifier\n3. 函数字段必须设置别名\n4. 当format=table时且limit未指定，limit默认值为1226\n5. 当同时指定了offset和limit，二者之和应该小于等于10000\n6. 目前查询表名仅支持sessions/views/actions/errors/long_tasks/resources/vitals/issues/sourcemaps"
          },
          "dql": {
            "type": "string",
            "description": "可选查询条件，用于简化筛选，这部分内容将append到sql的where条件中。举例如下：\nsql: \"select view_name from views order by event time\"\ndql: \"login\"\n实际查询：\"select view_name from views where  match_any(message, 'login') order by event time;\""
          },
          "format": {
            "type": "string",
            "enum": [
              "time_series",
              "table"
            ],
            "description": "返回数据类型"
          },
          "interval": {
            "type": "integer",
            "description": "当format=time_series时有效，建议的最小间隔毫秒，实际间隔（存在于响应中）可能不会与此值相同，具体计算逻辑：\n1. 计算总时间范围（et - st）\n2. 验证时间范围和最大点数是否有效（都必须 > 0）\n3. 计算最小需要的时间间隔：（et - st）/ max_points\n4. 将计算出的最小间隔与建议间隔进行比较，取较大值\n5. 将间隔调整为预定义的\"合理\"时间间隔之一：\n    - 毫秒级：1, 2, 5, 10, 20, 50, 100, 200, 500毫秒\n    - 秒级：1, 2, 5, 10, 15, 30, 60秒\n    - 分钟到小时：2, 5, 10, 15, 30分钟，1小时\n    - 小时级：2, 3, 6, 12小时\n    - 天到周：1, 2, 3, 7天\n    - 月级：30, 60, 90, 180天\n6. 如果需要的间隔超过预定义的最大值，则按30天（一个月）的倍数递增"
          },
          "max_points": {
            "type": "integer",
            "description": "当format=time_series时有效，此参数控制返回数据的粒度。较小的 max_points 值会导致较大的时间间隔，从而减少返回的数据点数量，适合长时间范围的概览。较大的 max_points 值会产生较小的时间间隔，提供更细粒度的数据视图。",
            "maximum": 1266,
            "minimum": 0
          },
          "time_zone": {
            "type": "string",
            "description": "当format=time_series时有效，指定时序数据切割时区，默认按照UTC时区进行分割。必须使用 IANA 时区数据库名称，否则无法解析。"
          },
          "search_after_ctx": {
            "type": "string",
            "description": "下一页查询游标。\n\n---\n\n<span style=\"color: red;\">仅当sql满足下述条件才会生成游标</span>\n\n1. sql必须指定limit参数\n2. sql不可指定offset参数\n3. sql必须指定排序字段\n4. sql不可做聚合查询，即不包含COUNT/SUM/Group by等逻辑\n\n否则您需要自行通过limit offset等参数实现传统分页查询。\n\n---\n\n注意：\n<span style=\"color: red;\">为了确保分页查询的稳定，您必须确保排序字段的唯一性（一般通过加入决胜字段来实现），否则您的查询可能丢失数据</span>\n\n示例：分页查询session列表\nsql：select * from sessions order by event_time desc, session_id asc;\n如果仅使用event_time倒排，无法保证唯一性，但加入决胜字段session_id即可保证唯一性。"
          }
        },
        "required": [
          "format",
          "sql",
          "id"
        ]
      },
      "SqlQueryResult": {
        "type": "object",
        "properties": {
          "error": {
            "description": "错误信息，仅失败时存在",
            "$ref": "#/components/schemas/DutyError"
          },
          "data": {
            "type": "object",
            "properties": {
              "search_after_ctx": {
                "type": "string",
                "description": "下一次查询游标，仅table类型查询时可能存在"
              },
              "interval": {
                "type": "integer",
                "description": "当format=time_series时存在，实际最小间隔毫秒，此值通过查询参数interval和max_points共同推导得出。"
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "字段名称"
                    },
                    "type": {
                      "type": "string",
                      "description": "字段类型"
                    }
                  },
                  "required": [
                    "name",
                    "nullable",
                    "type"
                  ]
                },
                "description": "字段列表"
              },
              "values": {
                "type": "array",
                "items": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": [
                      "string",
                      "integer",
                      "boolean",
                      "array",
                      "object",
                      "number",
                      "null"
                    ],
                    "description": "对应字段值"
                  }
                },
                "description": "值列表，二维数组"
              }
            },
            "required": [
              "fields",
              "values"
            ]
          }
        }
      },
      "FacetCount": {
        "type": "object",
        "properties": {
          "facet_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              }
            ],
            "description": "满足facet_query的分面值"
          },
          "count": {
            "type": "integer",
            "description": "对应分面值的数据条目总数"
          }
        },
        "required": [
          "facet_value",
          "count"
        ]
      },
      "Issue": {
        "type": "object",
        "properties": {
          "issue_id": {
            "description": "Issue ID",
            "type": "string"
          },
          "application_id": {
            "type": "string",
            "description": "应用ID"
          },
          "application_name": {
            "type": "string",
            "description": "应用名称"
          },
          "service": {
            "type": "string",
            "description": "服务名称，来源于sdk上报"
          },
          "status": {
            "type": "string",
            "description": "状态",
            "enum": [
              "for_review",
              "reviewed",
              "ignored",
              "resolved"
            ]
          },
          "error_count": {
            "description": "错误累计次数",
            "type": "integer"
          },
          "session_count": {
            "type": "integer",
            "description": "会话累计次数"
          },
          "is_crash": {
            "description": "是否导致崩溃",
            "type": "boolean",
            "title": "？"
          },
          "first_seen": {
            "$ref": "#/components/schemas/IssueSeenRecord",
            "description": "首次发生记录"
          },
          "last_seen": {
            "$ref": "#/components/schemas/IssueSeenRecord",
            "description": "上一次发生记录"
          },
          "age": {
            "type": "integer",
            "description": "持续时间，秒，last_seen.timestamp-first_seen.timestamp"
          },
          "error": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "description": "错误信息"
              },
              "type": {
                "type": "string",
                "description": "错误类型"
              }
            },
            "required": [
              "message",
              "type"
            ],
            "description": "错误描述"
          },
          "suspected_cause": {
            "$ref": "#/components/schemas/SuspectedCause",
            "description": "原因描述"
          },
          "team_id": {
            "type": "integer",
            "description": "团队ID"
          },
          "regression": {
            "$ref": "#/components/schemas/IssueRegression",
            "description": "重开描述"
          }
        },
        "required": [
          "issue_id",
          "status",
          "suspected_cause",
          "first_seen",
          "last_seen",
          "error",
          "session_count",
          "application_name",
          "application_id",
          "error_count",
          "service",
          "team_id",
          "age"
        ]
      },
      "IssueSeenRecord": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "integer",
            "description": "发生时间戳，毫秒"
          },
          "version": {
            "type": "string",
            "description": "版本号"
          }
        },
        "required": [
          "timestamp"
        ]
      },
      "IssueRegression": {
        "type": "object",
        "properties": {
          "resolved_at": {
            "type": "integer",
            "description": "上次解决时间戳，毫秒"
          },
          "regressed_at": {
            "type": "integer",
            "description": "重新打开时间戳，毫秒"
          },
          "regressed_at_version": {
            "type": "string",
            "description": "重新打开版本"
          }
        },
        "required": [
          "regressed_at",
          "resolved_at"
        ]
      },
      "SuspectedCause": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "enum": [
              "auto",
              "user"
            ],
            "description": "来源"
          },
          "value": {
            "type": "string",
            "enum": [
              "api.failed_request",
              "network.error",
              "code.exception",
              "code.invalid_object_access",
              "code.invalid_argument",
              "unknown"
            ],
            "description": "类型"
          },
          "reason": {
            "type": "string",
            "description": "AI给出的依据"
          },
          "person_id": {
            "type": "integer",
            "description": "当来源为用户时，其用户ID"
          }
        },
        "required": [
          "source",
          "value",
          "reason"
        ]
      },
      "Sourcemap": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "文件key"
          },
          "service": {
            "type": "string",
            "description": "服务名称"
          },
          "version": {
            "type": "string",
            "description": "服务版本"
          },
          "size": {
            "type": "integer",
            "description": "文件大小"
          },
          "git_repository_url": {
            "type": "string",
            "description": "git地址。例如：git@github.com:flashcatcloud/fc-foundation-app.git"
          },
          "git_commit_sha": {
            "type": "string",
            "description": "git commit标识。例如：2577bcc913e7d8a94d8dfacca4c73bca1fa91dc2"
          },
          "created_at": {
            "type": "integer",
            "description": "创建时间"
          },
          "updated_at": {
            "type": "integer",
            "description": "更新时间"
          },
          "metadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BrowserMapping"
              },
              {
                "$ref": "#/components/schemas/AndroidMapping"
              }
            ],
            "description": "不同类型的元信息"
          }
        },
        "required": [
          "service",
          "created_at",
          "updated_at",
          "size",
          "key",
          "metadata"
        ]
      },
      "StackFrame": {
        "type": "object",
        "properties": {
          "file": {
            "type": "string",
            "description": "文件（各平台）"
          },
          "line": {
            "type": "integer",
            "description": "行号（各平台）"
          },
          "function": {
            "type": "string",
            "description": "函数或方法名（各平台）"
          },
          "column": {
            "type": "integer",
            "description": "列号（Browser, JavaScript/Flutter）"
          },
          "class_name": {
            "type": "string",
            "description": "完整的class 名称 （Android, Java/Kotlin）"
          },
          "method_name": {
            "type": "string",
            "description": "不带 class 前缀的方法名（Android, Java/Kotlin）"
          },
          "module": {
            "type": "string",
            "description": "Module name (e.g., \"MyApp\", \"UIKitCore\")（iOS, Swift/Objective-C）"
          },
          "address": {
            "type": "string",
            "description": "Memory address (e.g., \"0x000000010001abcd\")（iOS, Swift/Objective-C）"
          },
          "offset": {
            "type": "number",
            "description": "Symbol offset from function start（iOS, Swift/Objective-C）"
          },
          "native_address": {
            "type": "string",
            "description": "IL offset address (e.g., \"[0x00012]\")（Unity, C#）"
          },
          "converted": {
            "type": "boolean",
            "description": "是否已转换"
          },
          "third_party": {
            "type": "boolean",
            "description": "是否第三方（Android, Java/Kotlin）"
          },
          "code_snippets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CodeSnippet"
            },
            "description": "代码片段，将包含问题行，以及前后near行非空行代码"
          },
          "minified": {
            "type": "object",
            "properties": {
              "file": {
                "type": "string",
                "description": "被转换的文件"
              },
              "function": {
                "type": "string",
                "description": "被转换的函数"
              },
              "line": {
                "type": "integer",
                "description": "被转换的行号"
              },
              "column": {
                "type": "integer",
                "description": "被转换的列号"
              }
            },
            "description": "压缩文件信息，仅converted为true时存在",
            "required": [
              "file",
              "line",
              "function"
            ]
          }
        },
        "required": [
          "converted",
          "function"
        ]
      },
      "CodeSnippet": {
        "type": "object",
        "properties": {
          "line": {
            "type": "integer",
            "description": "行号"
          },
          "code": {
            "type": "string",
            "description": "源代码"
          }
        },
        "required": [
          "line",
          "code"
        ]
      },
      "ReplayMeta": {
        "type": "object",
        "properties": {
          "session": {
            "type": "object",
            "properties": {
              "start": {
                "type": "integer",
                "description": "开始时间，毫秒时间戳"
              },
              "end": {
                "type": "integer",
                "description": "结束时间，毫秒时间戳"
              },
              "is_active": {
                "type": "boolean",
                "description": "是否活跃"
              },
              "source": {
                "type": "string",
                "description": "来源"
              },
              "server_time_delta": {
                "type": "integer",
                "description": "?"
              }
            },
            "required": [
              "start",
              "end",
              "is_active",
              "source",
              "server_time_delta"
            ],
            "description": "会话信息"
          },
          "views": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "container_view_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "当前视图的wrapper视图ID"
                },
                "container_source": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "当前视图的wrapper视图来源",
                  "enum": [
                    "android",
                    "ios",
                    "browser",
                    "flutter",
                    "react-native",
                    "roku",
                    "unity",
                    "kotlin-multiplatform"
                  ]
                },
                "source": {
                  "type": "string",
                  "enum": [
                    "android",
                    "ios",
                    "browser",
                    "flutter",
                    "react-native",
                    "roku",
                    "unity",
                    "kotlin-multiplatform"
                  ],
                  "description": "视图来源"
                },
                "loading_type": {
                  "type": "string",
                  "enum": [
                    "initial_load",
                    "route_change",
                    "activity_display",
                    "activity_redisplay",
                    "fragment_display",
                    "fragment_redisplay",
                    "view_controller_display",
                    "view_controller_redisplay"
                  ],
                  "description": "加载类型"
                },
                "view_id": {
                  "type": "string",
                  "description": "视图ID"
                },
                "start": {
                  "type": "integer",
                  "description": "开始时间，毫秒时间戳"
                },
                "end": {
                  "type": "integer",
                  "description": "结束时间，毫秒时间戳"
                },
                "server_time_delta": {
                  "type": "integer",
                  "description": "?"
                },
                "is_active": {
                  "type": "boolean",
                  "description": "是否活跃"
                },
                "name": {
                  "type": "string",
                  "description": "视图名称"
                }
              },
              "required": [
                "source",
                "loading_type",
                "view_id",
                "end",
                "start",
                "server_time_delta",
                "is_active",
                "name"
              ]
            },
            "description": "视图列表"
          },
          "foreground_periods": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "view_id": {
                  "type": "string",
                  "description": "视图ID"
                },
                "start": {
                  "type": "integer",
                  "description": "开始时间，毫秒时间戳"
                },
                "end": {
                  "type": "integer",
                  "description": "结束时间，毫秒时间戳"
                }
              },
              "required": [
                "view_id",
                "end",
                "start"
              ]
            },
            "description": "前台周期"
          },
          "device": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "description": "设备类型",
                "enum": [
                  "Mobile",
                  "Desktop",
                  "Tablet",
                  "TV",
                  "Gaming_console",
                  "Bot",
                  "Other"
                ]
              }
            },
            "required": [
              "type"
            ],
            "description": "设备信息"
          },
          "application": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "应用ID"
              }
            },
            "required": [
              "id"
            ],
            "description": "应用信息"
          }
        },
        "required": [
          "session",
          "views",
          "foreground_periods",
          "device",
          "application"
        ]
      },
      "ReplaySegment": {
        "type": "object",
        "properties": {
          "start": {
            "type": "integer",
            "description": "开始时间，毫秒时间戳"
          },
          "end": {
            "type": "integer",
            "description": "结束时间，毫秒时间戳"
          },
          "creation_reason": {
            "type": "string",
            "enum": [
              "init",
              "segment_duration_limit",
              "segment_bytes_limit",
              "view_change",
              "before_unload",
              "visibility_hidden",
              "page_frozen"
            ],
            "description": "片段创建原因"
          },
          "records_count": {
            "type": "integer",
            "description": "片段内的记录数量"
          },
          "has_full_snapshot": {
            "type": "boolean",
            "description": "当前片段是否包含全量快照"
          },
          "index_in_view": {
            "type": "integer",
            "description": "当前片段索引，从0开始"
          },
          "source": {
            "type": "string",
            "enum": [
              "browser"
            ],
            "description": "来源"
          },
          "application": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "应用ID"
              }
            },
            "required": [
              "id"
            ],
            "description": "应用"
          },
          "session": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "会话ID"
              }
            },
            "required": [
              "id"
            ],
            "description": "会话"
          },
          "view": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "视图ID"
              }
            },
            "required": [
              "id"
            ],
            "description": "视图"
          },
          "records": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {}
            },
            "description": "记录列表"
          }
        },
        "required": [
          "start",
          "end",
          "creation_reason",
          "records_count",
          "source",
          "application",
          "session",
          "view",
          "records"
        ]
      },
      "Application": {
        "type": "object",
        "properties": {
          "application_id": {
            "type": "string",
            "description": "应用ID"
          },
          "application_name": {
            "type": "string",
            "description": "应用名称"
          },
          "type": {
            "type": "string",
            "enum": [
              "browser"
            ],
            "description": "应用类型"
          },
          "client_token": {
            "type": "string",
            "description": "应用token"
          },
          "team_id": {
            "type": "integer",
            "description": "负责团队ID，团队内成员对协作空间有编辑权限"
          },
          "is_private": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "是否私有访问。如果是，仅空间创建者、空间所属团队成员以及账户管理员可访问"
          },
          "no_ip": {
            "type": "boolean",
            "description": "是否避免收集geo信息"
          },
          "no_geo": {
            "type": "boolean",
            "description": "是否避免收集ip信息"
          },
          "alerting": {
            "$ref": "#/components/schemas/ApplicationAlerting",
            "description": "告警配置"
          },
          "tracing": {
            "$ref": "#/components/schemas/ApplicationTracing",
            "description": "Tracing 配置"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "deleted"
            ],
            "description": "状态"
          },
          "created_by": {
            "type": "integer",
            "description": "创建成员ID"
          },
          "updated_by": {
            "type": "integer",
            "description": "上次更新成员ID"
          },
          "created_at": {
            "type": "integer",
            "description": "创建时间戳"
          },
          "updated_at": {
            "type": "integer",
            "description": "更新时间戳"
          }
        },
        "required": [
          "status",
          "application_name",
          "application_id",
          "updated_at",
          "created_at",
          "created_by",
          "updated_by",
          "client_token",
          "team_id",
          "type",
          "no_geo",
          "no_ip"
        ]
      },
      "Integration": {
        "type": "object",
        "properties": {
          "integration_id": {
            "type": "integer",
            "description": "集成ID"
          },
          "team_id": {
            "type": "integer",
            "description": "团队ID，未配置时为0"
          },
          "name": {
            "type": "string",
            "description": "集成名称"
          },
          "status": {
            "type": "string",
            "description": "集成状态",
            "enum": [
              "enabled",
              "disabled",
              "deleted"
            ]
          },
          "plugin_id": {
            "type": "integer",
            "description": "集成类型ID"
          },
          "plugin_type": {
            "type": "string",
            "description": "集成类型"
          },
          "plugin_type_name": {
            "type": "string",
            "description": "集成类型名称"
          },
          "description": {
            "type": "string",
            "description": "集成描述"
          },
          "integration_key": {
            "type": "string",
            "description": "集成Key"
          },
          "settings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {}
            },
            "description": "集成配置，每个集成的配置结构会有区别"
          },
          "creator_id": {
            "type": "string",
            "description": "创建者ID"
          },
          "created_at": {
            "type": "string",
            "description": "创建时间"
          },
          "updated_at": {
            "type": "string",
            "description": "更新时间"
          }
        },
        "required": [
          "status",
          "name",
          "plugin_id",
          "plugin_type",
          "integration_key",
          "description",
          "plugin_type_name",
          "creator_id",
          "settings",
          "integration_id",
          "updated_at",
          "created_at"
        ]
      },
      "Layers": {
        "type": "object",
        "properties": {
          "layers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "layer_name": {
                  "type": "string",
                  "title": "规则名"
                },
                "mode": {
                  "type": "integer",
                  "title": "模式(普通/临时)",
                  "enum": [
                    0,
                    1
                  ],
                  "description": "mode为1的规则放到为0的后面"
                },
                "groups": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "group_name": {
                        "type": "string",
                        "title": "分组名称"
                      },
                      "members": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "role_id": {
                              "type": "integer",
                              "title": "角色id"
                            },
                            "person_ids": {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              },
                              "title": "人员id"
                            }
                          }
                        }
                      }
                    }
                  },
                  "title": "值班分组"
                },
                "fair_rotation": {
                  "type": "boolean",
                  "title": "公平轮转开关"
                },
                "handoff_time": {
                  "type": "integer",
                  "title": "接手时间",
                  "description": "接手时间，1周粒度的值班周期使用，从周一00:00到接手的秒数"
                },
                "layer_start": {
                  "type": "integer",
                  "title": "开始时间",
                  "description": "最小粒度半小时"
                },
                "layer_end": {
                  "type": "integer",
                  "title": "结束时间",
                  "description": "最小粒度半小时"
                },
                "restrict_mode": {
                  "type": "integer",
                  "title": "周期内限定模式",
                  "enum": [
                    0,
                    1,
                    2
                  ],
                  "description": "0 无限制  1  天粒度  2 周粒度"
                },
                "restrict_periods": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "restrict_start": {
                        "type": "integer",
                        "title": "限定开始时间",
                        "description": "只针对restrict_mode 天粒度和周粒度生效，天粒度 从当天00：00到限制开始时间的 Unix时间秒数，周粒度从周一00：00到限定开始时间的秒数"
                      },
                      "restrict_end": {
                        "type": "integer",
                        "title": "限定结束时间",
                        "description": "只针对restrict_mode 天粒度和周粒度生效，天粒度 从当天00：00到限制结束时间的时间秒数，周粒度从周一00：00到限定结束时间的秒数"
                      }
                    }
                  },
                  "title": "限定时间区间列表"
                },
                "day_mask": {
                  "type": "object",
                  "properties": {
                    "repeat": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "enum": [
                          0,
                          1,
                          2,
                          3,
                          4,
                          5,
                          6
                        ],
                        "description": "周日为0，选中日期会被计算，否则会被排除"
                      },
                      "title": "星期掩码列表"
                    }
                  },
                  "required": [
                    "repeat"
                  ],
                  "title": "日期掩码"
                },
                "mask_continuous_enabled": {
                  "type": "boolean",
                  "title": "掩码连续轮转",
                  "description": "日期掩码连续轮转，按照开始时间的时分，顺延到第二天，实现跨天日期掩码增强"
                },
                "rotation_unit": {
                  "type": "string",
                  "title": "周期单位",
                  "enum": [
                    "hour",
                    "day",
                    "week",
                    "month"
                  ],
                  "description": "month 自然月"
                },
                "rotation_value": {
                  "type": "integer",
                  "title": "周期值"
                }
              },
              "required": [
                "mode",
                "layer_start",
                "layer_name"
              ]
            },
            "title": "规则"
          }
        },
        "required": [
          "layers"
        ]
      },
      "OrFilters": {
        "type": "array",
        "items": {
          "description": "内层条件",
          "$ref": "#/components/schemas/AndFilters"
        },
        "description": "外层条件，条件之间为OR关系"
      },
      "AndFilters": {
        "type": "array",
        "items": {
          "description": "内层条件",
          "$ref": "#/components/schemas/Filter"
        },
        "description": "外层条件，条件之间为And关系"
      },
      "Filter": {
        "type": "object",
        "properties": {
          "key": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "title",
                  "description",
                  "severity",
                  "data_source_id"
                ],
                "title": "属性"
              },
              {
                "type": "string",
                "title": "标签",
                "pattern": "^labels\\..+$"
              }
            ],
            "title": "属性或标签",
            "description": "以labels.为前缀的是标签，否则为属性，如title、severity、description等。"
          },
          "oper": {
            "type": "string",
            "title": "操作类型",
            "description": "支持等于：IN,不等于：NOTIN",
            "enum": [
              "IN",
              "NOTIN"
            ]
          },
          "vals": {
            "title": "取值范围",
            "description": "等oper=IN，只要匹配到一个值即为匹配成功；当oper=NOTIN，如果有一个值不匹配，即匹配失败。标签value支持精确（字符串）、正则（以'/'作为前后缀的字符串）和通配符（包含'*'和'?'但不是正则的字符串）匹配。举例：您可指定('datacenter' IN ['bj01','sh-*','']) AND ('host' IN '/api-server-\\d+/')，来关联产生于'bj01'和'sh-01'、'sh-02'三个数据中心并且主机名满足'api-server-\\d+'正则的告警事件",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "key",
          "vals",
          "oper"
        ]
      },
      "Labels": {
        "type": "object",
        "patternProperties": {
          "^[a-zA-Z_][a-zA-Z0-9_]*$": {
            "type": "string",
            "title": "key为任意label名称，值为字符串",
            "description": "label格式需要满足正则^[a-zA-Z_][a-zA-Z0-9_]*$，value的长度不超过512字节",
            "maxLength": 512
          }
        },
        "properties": {}
      },
      "Channel": {
        "type": "object",
        "properties": {
          "channel_id": {
            "type": "integer",
            "description": "协作空间ID"
          },
          "team_id": {
            "type": "integer",
            "description": "归属团队ID。团队内成员对协作空间有编辑权限和读取权限"
          },
          "managing_team_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer"
            },
            "description": "代管团队IDs。当设置此项，代管团队将接管归属团队对协作空间的编辑权限，但二者都具备读取权限。"
          },
          "channel_name": {
            "type": "string",
            "description": "协作空间名称"
          },
          "description": {
            "type": "string",
            "description": "协作空间描述"
          },
          "auto_resolve_timeout": {
            "type": "integer",
            "description": "超时自动恢复时间，单位s"
          },
          "auto_resolve_mode": {
            "type": "string",
            "enum": [
              "trigger",
              "update"
            ],
            "description": "超时自动恢复模式"
          },
          "is_private": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "是否私有访问。如果是，仅空间创建者、空间所属团队成员以及账户管理员可访问"
          },
          "flapping": {
            "$ref": "#/components/schemas/Flapping",
            "description": "故障抖动检测配置"
          },
          "group": {
            "$ref": "#/components/schemas/Group",
            "description": "告警聚合配置"
          },
          "status": {
            "type": "string",
            "description": "协作空间状态",
            "enum": [
              "enabled",
              "disabled",
              "deleted"
            ]
          },
          "created_at": {
            "type": "integer",
            "description": "创建时间戳，单位秒"
          },
          "updated_at": {
            "type": "integer",
            "description": "更新时间戳，单位秒"
          },
          "progress_to_incident_cnts": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "Triggered": {
                "type": "integer",
                "title": "待处理个数",
                "description": "超过1000仅展示1000"
              },
              "Processing": {
                "type": "integer",
                "title": "处理中个数",
                "description": "超过1000仅展示1000"
              }
            },
            "description": "活跃故障统计",
            "required": [
              "Triggered",
              "Processing"
            ]
          },
          "active_incident_highest_severity": {
            "type": [
              "string",
              "null"
            ],
            "description": "活跃故障最高严重程度。如无活跃故障，字段为空或不返回"
          },
          "disable_outlier_detection": {
            "type": "boolean",
            "description": "是否关闭新奇告警检测。默认开启新奇告警，没有该字段表示开启新奇告警"
          }
        },
        "required": [
          "status",
          "channel_name",
          "channel_id",
          "updated_at",
          "created_at",
          "team_id"
        ]
      },
      "EscalateRule": {
        "type": "object",
        "properties": {
          "channel_id": {
            "title": "所属channel",
            "type": "integer"
          },
          "rule_id": {
            "type": "string",
            "title": "策略id"
          },
          "rule_name": {
            "type": "string",
            "title": "策略名称"
          },
          "template_id": {
            "type": "string",
            "title": "模板id"
          },
          "description": {
            "type": "string",
            "title": "策略描述"
          },
          "status": {
            "type": "string",
            "title": "状态",
            "enum": [
              "enabled",
              "disabled",
              "deleted"
            ]
          },
          "priority": {
            "type": "integer",
            "title": "优先级"
          },
          "created_at": {
            "type": "string",
            "title": "创建时间戳"
          },
          "updated_at": {
            "type": "string",
            "title": "更新时间戳"
          },
          "updated_by": {
            "type": "integer",
            "title": "上次修改人ID"
          },
          "layers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EscalateLayer"
            },
            "title": "通知环节"
          },
          "aggr_window": {
            "title": "聚合窗口，单位秒",
            "type": "integer"
          },
          "time_filters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeFilter"
            },
            "title": "时间过滤",
            "description": "不设置即为全部时间"
          },
          "filters": {
            "title": "匹配条件",
            "description": "不设置即为全部故障",
            "$ref": "#/components/schemas/OrFilters"
          }
        },
        "required": [
          "channel_id",
          "template_id",
          "status",
          "updated_at",
          "created_at",
          "description",
          "updated_by",
          "rule_id",
          "rule_name",
          "layers",
          "aggr_window",
          "priority"
        ]
      },
      "EscalateLayer": {
        "type": "object",
        "properties": {
          "max_times": {
            "type": "integer",
            "title": "最大通知次数",
            "description": "默认2"
          },
          "notify_step": {
            "type": "integer",
            "title": "通知间隔周期，单位分钟",
            "description": "默认10"
          },
          "escalate_window": {
            "title": "超过多少分钟，升级到下一窗口",
            "type": "integer",
            "description": "默认30"
          },
          "force_escalate": {
            "type": "boolean",
            "title": "是否强制升级",
            "description": "默认故障认领后不升级，设置为true，认领后也升级"
          },
          "target": {
            "title": "分派对象",
            "$ref": "#/components/schemas/EscalateTarget"
          }
        },
        "required": [
          "max_times",
          "notify_step",
          "escalate_window",
          "target"
        ]
      },
      "EscalateTarget": {
        "type": "object",
        "properties": {
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "description": "团队ID"
            },
            "description": "团队ID列表。team_ids，person_ids，emails和schedule_to_role_ids三者至少有一个"
          },
          "person_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "description": "个人ID"
            },
            "description": "个人ID列表。team_ids，person_ids，emails和schedule_to_role_ids三者至少有一个"
          },
          "schedule_to_role_ids": {
            "type": "object",
            "properties": {
              "{schedule_id}": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "description": "角色ID列表"
                },
                "description": "值班ID"
              }
            },
            "description": "值班ID与角色ID列表。team_ids，person_ids，emails和schedule_to_role_ids三者至少有一个"
          },
          "by": {
            "title": "个人渠道",
            "description": "和webhooks至少有一个",
            "type": "object",
            "properties": {
              "follow_preference": {
                "type": "boolean",
                "title": "遵循个人偏好"
              },
              "critical": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "email",
                        "voice",
                        "sms",
                        "push"
                      ]
                    },
                    {
                      "type": "string",
                      "pattern": "^(feishu_app|dingtalk_app|wecom_app|teams_app):\\d+$"
                    }
                  ],
                  "description": "短信、语音、邮件、push或者具体的IM集成"
                },
                "title": "Critical告警通知方式"
              },
              "warning": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "email",
                        "voice",
                        "sms",
                        "push"
                      ]
                    },
                    {
                      "type": "string",
                      "pattern": "^(feishu_app|dingtalk_app|wecom_app|teams_app):\\d+$"
                    }
                  ],
                  "description": "短信、语音、邮件、push或者具体的IM集成"
                },
                "title": "Warning告警通知方式"
              },
              "info": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "email",
                        "voice",
                        "sms",
                        "push"
                      ]
                    },
                    {
                      "type": "string",
                      "pattern": "^(feishu_app|dingtalk_app|wecom_app|teams_app):\\d+$"
                    }
                  ],
                  "description": "短信、语音、邮件、push或者具体的IM集成"
                },
                "title": "Info告警通知方式"
              }
            },
            "required": [
              "critical",
              "warning",
              "info"
            ]
          },
          "webhooks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EscalateWebhook"
            },
            "title": "群聊渠道",
            "description": "和by至少有一个"
          }
        },
        "title": ""
      },
      "SeverityToBy": {
        "type": "object",
        "properties": {
          "critical": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string",
                  "enum": [
                    "email",
                    "voice",
                    "sms",
                    "push"
                  ]
                },
                {
                  "type": "string",
                  "pattern": "^(feishu_app|dingtalk_app|wecom_app|teams_app):\\d+$"
                }
              ],
              "description": "短信、语音、邮件、push或者具体的IM集成"
            },
            "title": "Critical告警通知方式"
          },
          "warning": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string",
                  "enum": [
                    "email",
                    "voice",
                    "sms",
                    "push"
                  ]
                },
                {
                  "type": "string",
                  "pattern": "^(feishu_app|dingtalk_app|wecom_app|teams_app):\\d+$"
                }
              ],
              "description": "短信、语音、邮件、push或者具体的IM集成"
            },
            "title": "Warning告警通知方式"
          },
          "info": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string",
                  "enum": [
                    "email",
                    "voice",
                    "sms",
                    "push"
                  ]
                },
                {
                  "type": "string",
                  "pattern": "^(feishu_app|dingtalk_app|wecom_app|teams_app):\\d+$"
                }
              ],
              "description": "短信、语音、邮件、push或者具体的IM集成"
            },
            "title": "Info告警通知方式"
          }
        },
        "required": [
          "critical",
          "warning",
          "info"
        ]
      },
      "PersonGroup": {
        "type": "object",
        "properties": {
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "description": "团队ID"
            },
            "description": "团队ID列表。team_ids，person_ids，emails和schedule_to_role_ids三者至少有一个"
          },
          "person_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "description": "个人ID"
            },
            "description": "个人ID列表。team_ids，person_ids，emails和schedule_to_role_ids三者至少有一个"
          },
          "emails": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "个人邮件"
            },
            "description": "个人邮件列表。team_ids，person_ids，emails和schedule_to_role_ids三者至少有一个"
          },
          "schedule_to_role_ids": {
            "type": "object",
            "properties": {
              "{schedule_id}": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "description": "角色ID列表"
                },
                "description": "值班ID"
              }
            },
            "description": "值班ID与角色ID列表。team_ids，person_ids，emails和schedule_to_role_ids三者至少有一个"
          }
        },
        "title": "",
        "required": [
          "emails"
        ]
      },
      "SubscribeRule": {
        "type": "object",
        "properties": {
          "channel_id": {
            "title": "所属channel",
            "type": "integer"
          },
          "rule_id": {
            "type": "string",
            "title": "策略id"
          },
          "rule_name": {
            "type": "string",
            "title": "策略名称"
          },
          "description": {
            "type": "string",
            "title": "策略描述"
          },
          "filters": {
            "title": "匹配条件",
            "$ref": "#/components/schemas/OrFilters"
          },
          "status": {
            "type": "string",
            "title": "状态",
            "enum": [
              "enabled",
              "disabled",
              "deleted"
            ]
          },
          "created_at": {
            "type": "string",
            "title": "创建时间戳"
          },
          "updated_at": {
            "type": "string",
            "title": "更新时间戳"
          },
          "updated_by": {
            "type": "integer"
          }
        },
        "required": [
          "channel_id",
          "status",
          "updated_at",
          "created_at",
          "description",
          "filters",
          "updated_by",
          "rule_id",
          "rule_name"
        ]
      },
      "UnsubscribeRule": {
        "type": "object",
        "properties": {
          "channel_id": {
            "title": "所属channel",
            "type": "integer"
          },
          "rule_id": {
            "type": "string",
            "title": "策略id"
          },
          "rule_name": {
            "type": "string",
            "title": "策略名称"
          },
          "description": {
            "type": "string",
            "title": "策略描述"
          },
          "filters": {
            "title": "匹配条件",
            "$ref": "#/components/schemas/OrFilters"
          },
          "status": {
            "type": "string",
            "title": "状态",
            "enum": [
              "enabled",
              "disabled",
              "deleted"
            ]
          },
          "created_at": {
            "type": "string",
            "title": "创建时间戳"
          },
          "updated_at": {
            "type": "string",
            "title": "更新时间戳"
          },
          "updated_by": {
            "type": "integer"
          }
        },
        "required": [
          "channel_id",
          "status",
          "updated_at",
          "created_at",
          "description",
          "filters",
          "updated_by",
          "rule_id",
          "rule_name"
        ]
      },
      "SilenceRule": {
        "type": "object",
        "properties": {
          "channel_id": {
            "title": "所属channel",
            "type": "integer"
          },
          "rule_id": {
            "type": "string",
            "title": "策略id",
            "description": "更新时必传"
          },
          "rule_name": {
            "type": "string",
            "title": "策略名称",
            "description": "默认就是策略1，策略2"
          },
          "description": {
            "type": "string",
            "title": "策略描述"
          },
          "from_incident_id": {
            "type": "string",
            "title": "快速静默故障ID"
          },
          "filters": {
            "title": "匹配条件",
            "$ref": "#/components/schemas/OrFilters"
          },
          "time_filter": {
            "type": "object",
            "properties": {
              "start_time": {
                "type": "integer"
              },
              "end_time": {
                "type": "integer"
              }
            },
            "title": "单次时间过滤"
          },
          "time_filters": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "start": {
                  "title": "开始时间，小于end",
                  "type": "string",
                  "description": "精度到分钟，如10:00"
                },
                "end": {
                  "title": "结束时间",
                  "type": "string",
                  "description": "精度到分钟，如23:59"
                },
                "repeat": {
                  "type": "array",
                  "items": {
                    "type": "integer",
                    "description": "0=周日，1，2，3，4，5，6",
                    "enum": [
                      0,
                      1,
                      2,
                      3,
                      4,
                      5,
                      6
                    ]
                  },
                  "title": "星期模式，星期列表",
                  "description": "与日历模式相关参数互斥，只能有一个"
                },
                "cal_id": {
                  "type": "string",
                  "title": "日历模式，日历ID",
                  "description": "与星期模式相关参数互斥，只能有一个"
                },
                "is_off": {
                  "type": "boolean",
                  "title": "日历模式，是否为休息日",
                  "description": "true为休息日"
                }
              },
              "required": [
                "start",
                "end"
              ]
            },
            "title": "重复时间过滤"
          },
          "is_directly_discard": {
            "type": "boolean",
            "title": "匹配告警是否直接丢弃，默认保留"
          },
          "is_effective": {
            "type": "boolean",
            "title": "是否生效中",
            "description": "查看当前时间是否满足时间条件"
          },
          "status": {
            "type": "string",
            "title": "状态",
            "enum": [
              "enabled",
              "disabled",
              "deleted"
            ]
          },
          "created_at": {
            "type": "string",
            "title": "创建时间戳"
          },
          "updated_at": {
            "type": "string",
            "title": "更新时间戳"
          },
          "updated_by": {
            "type": "integer"
          }
        },
        "required": [
          "channel_id",
          "status",
          "updated_at",
          "created_at",
          "description",
          "filters",
          "time_filter",
          "updated_by",
          "time_filters",
          "is_effective",
          "rule_id",
          "rule_name"
        ]
      },
      "InhibitRule": {
        "type": "object",
        "properties": {
          "channel_id": {
            "title": "所属channel",
            "type": "integer"
          },
          "rule_id": {
            "type": "string",
            "title": "策略id"
          },
          "rule_name": {
            "type": "string",
            "title": "策略名称"
          },
          "description": {
            "type": "string",
            "title": "策略描述"
          },
          "source_filters": {
            "title": "源事件过滤",
            "$ref": "#/components/schemas/OrFilters"
          },
          "target_filters": {
            "title": "被抑制事件过滤",
            "$ref": "#/components/schemas/OrFilters"
          },
          "equals": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "title": "相同项",
            "description": "以label.开头的是label项，其他是属性项"
          },
          "is_directly_discard": {
            "type": "boolean",
            "title": "匹配告警是否直接丢弃"
          },
          "status": {
            "type": "string",
            "title": "状态",
            "enum": [
              "enabled",
              "disabled",
              "deleted"
            ]
          },
          "created_at": {
            "type": "string",
            "title": "创建时间戳"
          },
          "updated_at": {
            "type": "string",
            "title": "更新时间戳"
          },
          "updated_by": {
            "type": "integer",
            "title": "上次修改人ID"
          }
        },
        "required": [
          "channel_id",
          "status",
          "updated_at",
          "created_at",
          "description",
          "source_filters",
          "target_filters",
          "equals",
          "updated_by",
          "rule_id",
          "rule_name"
        ]
      },
      "Template": {
        "type": "object",
        "properties": {
          "template_id": {
            "type": "string",
            "title": "channel ID"
          },
          "team_id": {
            "title": "团队ID",
            "type": "integer"
          },
          "account_id": {
            "type": "integer",
            "title": "账户ID"
          },
          "template_name": {
            "type": "string",
            "title": "名称"
          },
          "description": {
            "type": "string",
            "title": "描述"
          },
          "email": {
            "type": "string",
            "title": "email模板"
          },
          "sms": {
            "type": "string",
            "title": "sms模板"
          },
          "feishu": {
            "type": "string",
            "title": "飞书机器人"
          },
          "dingtalk": {
            "type": "string",
            "title": "钉钉机器人"
          },
          "wecom": {
            "type": "string",
            "title": "企业微信机器人"
          },
          "feishu_app": {
            "type": "string",
            "title": "飞书应用"
          },
          "dingtalk_app": {
            "type": "string",
            "title": "钉钉应用"
          },
          "wecom_app": {
            "type": "string",
            "title": "企微应用"
          },
          "status": {
            "type": "string",
            "title": "状态",
            "description": "enabled, disabled, deleted",
            "enum": [
              "enabled",
              "disabled",
              "deleted"
            ]
          },
          "creator_id": {
            "type": "integer",
            "title": "创建者ID",
            "description": "如果负责团队内没人，只能依靠创建者来管理了"
          },
          "updated_by": {
            "type": "integer",
            "title": "更新者ID"
          },
          "created_at": {
            "type": "integer",
            "title": "创建时间戳"
          },
          "updated_at": {
            "type": "integer",
            "title": "更新时间戳"
          }
        },
        "required": [
          "status",
          "template_name",
          "template_id",
          "updated_at",
          "created_at",
          "creator_id",
          "account_id",
          "updated_by"
        ]
      },
      "TimeFilter": {
        "type": "object",
        "properties": {
          "start": {
            "title": "开始时间，小于end",
            "type": "string",
            "description": "精度到分钟，如10:00"
          },
          "end": {
            "title": "结束时间",
            "type": "string",
            "description": "精度到分钟，如23:59"
          },
          "repeat": {
            "type": "array",
            "items": {
              "type": "integer",
              "description": "0=周日，1，2，3，4，5，6",
              "enum": [
                0,
                1,
                2,
                3,
                4,
                5,
                6
              ]
            },
            "title": "星期模式，星期列表",
            "description": "与日历模式相关参数互斥，只能有一个"
          },
          "cal_id": {
            "type": "string",
            "title": "日历模式，日历ID",
            "description": "与星期模式相关参数互斥，只能有一个"
          },
          "is_off": {
            "type": "boolean",
            "title": "日历模式，是否为休息日",
            "description": "true为休息日"
          }
        },
        "required": [
          "start",
          "end"
        ]
      },
      "CardView": {
        "type": "object",
        "properties": {
          "view_id": {
            "title": "所属channel",
            "type": "string"
          },
          "view_name": {
            "type": "string",
            "title": "视图名称"
          },
          "priority": {
            "title": "优先级",
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "title": "创建时间戳"
          },
          "updated_at": {
            "type": "string",
            "title": "更新时间戳"
          },
          "equals": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "labels.{x}",
                "severity",
                "title"
              ]
            },
            "title": "相同项",
            "description": "以labels.开头的是label项，其他是属性项，支持集成data_source_id、严重程度alert_severity、标题title、告警状态alert_status"
          }
        },
        "required": [
          "view_id",
          "updated_at",
          "created_at",
          "equals",
          "view_name"
        ]
      },
      "Incident": {
        "type": "object",
        "properties": {
          "incident_id": {
            "type": "string",
            "description": "故障ID，类型为ObjectID"
          },
          "start_time": {
            "type": "integer",
            "description": "开始时间戳，单位秒"
          },
          "end_time": {
            "type": "integer",
            "description": "结束时间戳，单位秒。当故障自动恢复时，此值不为0；手动关闭故障时，该值可能为0"
          },
          "last_time": {
            "type": "integer",
            "description": "最后一条合入当前故障的告警的开始时间戳，单位秒"
          },
          "ack_time": {
            "type": "integer",
            "description": "首次认领时间戳，单位秒。如果有多个人认领告警，该字段为首次认领时间。如果取消认领，该值重置为0"
          },
          "close_time": {
            "type": "integer",
            "description": "手动关闭时间戳，单位秒。故障自动恢复时，故障也将自动关闭"
          },
          "snoozed_before": {
            "type": "integer",
            "description": "暂缓截止时间戳，单位秒。取消关闭或认领时，该值重置为0"
          },
          "incident_status": {
            "type": "string",
            "description": "故障状态。枚举值：Info，Warning，Critical，Ok",
            "enum": [
              "Info",
              "Warning",
              "Critical",
              "Ok"
            ]
          },
          "incident_severity": {
            "type": "string",
            "description": "严重程度。枚举值：Info，Warning，Critical",
            "enum": [
              "Info",
              "Warning",
              "Critical"
            ]
          },
          "progress": {
            "type": "string",
            "description": "处理进度。枚举值：Triggered, In Progress, Closed ",
            "enum": [
              "Triggered",
              "Processing",
              "Closed"
            ]
          },
          "creator_id": {
            "type": "integer",
            "description": "发起人ID，仅手动创建故障存在"
          },
          "closer_id": {
            "type": "integer",
            "description": "关闭人ID，仅手动关闭时存在"
          },
          "assigned_to": {
            "description": "指派信息。最新一次手动或自动指派的信息，升级或重新指派时会发更新该值",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "type": {
                "type": "string",
                "description": "分派类型",
                "enum": [
                  "assign",
                  "reassign",
                  "escalate",
                  "reopen"
                ]
              },
              "person_ids": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "description": "人员ID"
                },
                "description": "（直接分派）人员ID列表，与escalate_rule_id二选一"
              },
              "escalate_rule_id": {
                "type": "string",
                "description": "（策略分派）分派策略ID，当时存在，与person_ids二选一"
              },
              "escalate_rule_name": {
                "type": "string",
                "description": "（策略分派）分派策略名称"
              },
              "layer_idx": {
                "type": "integer",
                "description": "（策略分派）本次分派层级，当策略分派时，可以指定分派的层级，比如直接升级到第二环节"
              }
            },
            "required": [
              "type"
            ]
          },
          "responders": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/Responder"
            },
            "description": "处理人列表。该值跟assigned_to无绝对关系，该值可能因人员直接认领或关闭故障而更新。该人员列表信息可能多于assigned_to人员列表"
          },
          "alert_cnt": {
            "type": "integer",
            "description": "关联告警数量"
          },
          "title": {
            "type": "string",
            "description": "故障标题"
          },
          "description": {
            "type": "string",
            "description": "故障描述，可能为传文本、markdown或html类型"
          },
          "impact": {
            "type": "string",
            "description": "故障影响",
            "deprecated": true
          },
          "root_cause": {
            "type": "string",
            "description": "故障根本原因",
            "deprecated": true
          },
          "resolution": {
            "type": "string",
            "description": "故障解决办法",
            "deprecated": true
          },
          "num": {
            "type": "string",
            "description": "短标识，可能重复，仅用于快速识别"
          },
          "labels": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Labels"
              },
              {
                "type": "null"
              }
            ],
            "description": "标签信息，kv，代表故障不同维度信息，提取自集成上报内容"
          },
          "channel_id": {
            "type": "integer",
            "description": "协作空间ID，为0代表全局故障"
          },
          "channel_name": {
            "type": "string",
            "description": "协作空间名称"
          },
          "integration_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "来源集成ID列表"
          },
          "integration_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "来源集成类型列表"
          },
          "dedup_key": {
            "type": "string",
            "description": "故障去重key，故障聚合的第一条告警的alert_key"
          },
          "group_method": {
            "type": "string",
            "enum": [
              "i",
              "p",
              "n"
            ],
            "description": "聚合方式"
          },
          "ever_muted": {
            "type": "boolean",
            "description": "是否抖动提醒/暂缓过，此类故障将不会统计分析指标"
          },
          "frequency": {
            "type": "string",
            "description": "触发频率。如果为rare，代表30天内仅发生一次。如果为frequent，代表30天内至少发生20次",
            "enum": [
              "rare",
              "frequent"
            ]
          },
          "images": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "alt": {
                  "type": "string",
                  "description": "图片的替代文本"
                },
                "src": {
                  "type": "string",
                  "description": "图片来源，http/https 开头的公共可访问的图片链接地址 或 图片上传接口 返回的 image_key"
                },
                "href": {
                  "type": "string",
                  "description": "超链接引用路径"
                }
              }
            }
          },
          "alert_event_cnt": {
            "type": "integer",
            "description": "告警事件数量"
          }
        },
        "required": [
          "incident_id",
          "incident_status",
          "start_time",
          "incident_severity",
          "progress",
          "creator_id",
          "title",
          "last_time",
          "end_time",
          "snoozed_before",
          "num"
        ],
        "title": ""
      },
      "Alert": {
        "type": "object",
        "properties": {
          "alert_id": {
            "type": "string",
            "description": "告警ID，ObjectID类型"
          },
          "channel_id": {
            "type": "integer",
            "description": "告警所属协作空间ID"
          },
          "channel_name": {
            "type": "string",
            "description": "告警所属协作空间名称"
          },
          "integration_id": {
            "type": "integer",
            "description": "来源集成ID"
          },
          "integration_name": {
            "type": "string",
            "description": "来源集成名称"
          },
          "integration_type": {
            "type": "string",
            "description": "来源集成类型"
          },
          "title": {
            "type": "string",
            "description": "告警标题"
          },
          "title_rule": {
            "type": "string",
            "description": "告警标题生成规则，具体请[参考规则](https://docs.flashcat.cloud/zh/flashduty/customize-incident-attrs)"
          },
          "description": {
            "type": "string",
            "description": "告警描述，可能为纯文本、markdown或html"
          },
          "alert_key": {
            "type": "string",
            "description": "事件关联依据。拥有相同alert_key的告警事件，将合并为同一个告警"
          },
          "alert_severity": {
            "type": "string",
            "enum": [
              "Info",
              "Warning",
              "Critical"
            ],
            "description": "严重程度，注意首字母大写"
          },
          "alert_status": {
            "type": "string",
            "enum": [
              "Info",
              "Warning",
              "Critical",
              "Ok"
            ],
            "description": "告警状态，注意首字母大写。来自源监控系统，自动变更"
          },
          "start_time": {
            "type": "integer",
            "description": "触发时间戳，单位秒。"
          },
          "last_time": {
            "type": "integer",
            "description": "上次合并事件事件戳，单位秒。仅当合入新告警事件时，进行更新，不同于updated_at"
          },
          "end_time": {
            "type": "integer",
            "description": "告警结束时间戳，单位秒。当告警恢复时，进行更新。自动恢复，告警将自动关闭，会同时更新close_time"
          },
          "created_at": {
            "type": "integer",
            "description": "创建时间戳，单位秒。数据库记录的创建时间，一般等于start_time"
          },
          "updated_at": {
            "type": "integer",
            "description": "更新时间戳，单位秒。数据库记录的更新时间，和last_time不同，手动或自动更新告警，该字段都会进行更新"
          },
          "labels": {
            "$ref": "#/components/schemas/Labels",
            "description": "标签列表"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertEvent"
            },
            "description": "关联事件"
          },
          "incident": {
            "type": "object",
            "properties": {
              "incident_id": {
                "type": "string",
                "description": "故障ID"
              },
              "title": {
                "type": "string",
                "description": "故障标题"
              },
              "progress": {
                "type": "string",
                "description": "故障处理进度",
                "enum": [
                  "Triggered",
                  "Processing",
                  "Closed"
                ]
              }
            },
            "required": [
              "incident_id",
              "title",
              "progress"
            ],
            "description": "所属故障"
          },
          "event_cnt": {
            "type": "integer",
            "description": "累计聚合事件数量"
          },
          "ever_muted": {
            "type": "boolean",
            "description": "是否被静默/抑制过"
          }
        },
        "required": [
          "alert_id",
          "integration_id",
          "title",
          "alert_key",
          "last_time",
          "start_time",
          "alert_status",
          "alert_severity",
          "labels",
          "integration_name",
          "channel_name",
          "channel_id",
          "integration_type",
          "updated_at",
          "created_at"
        ]
      },
      "AlertEvent": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "description": "告警事件ID"
          },
          "integration_id": {
            "type": "integer",
            "description": "来源集成ID"
          },
          "channel_id": {
            "type": "integer",
            "description": "协作空间ID"
          },
          "title": {
            "type": "string",
            "description": "告警事件标题"
          },
          "title_rule": {
            "type": "string",
            "description": "标题规则"
          },
          "description": {
            "type": "string",
            "description": "事件描述"
          },
          "alert_id": {
            "type": "string",
            "description": "所属告警ID"
          },
          "event_status": {
            "type": "string",
            "enum": [
              "Info",
              "Warning",
              "Critical",
              "Ok"
            ],
            "description": "事件状态，注意首字母大写"
          },
          "event_severity": {
            "type": "string",
            "enum": [
              "Info",
              "Warning",
              "Critical"
            ],
            "description": "事件严重程度，注意首字母大写"
          },
          "event_time": {
            "type": "integer",
            "description": "发生时间戳，单位秒"
          },
          "labels": {
            "$ref": "#/components/schemas/Labels",
            "description": "标签"
          }
        },
        "required": [
          "event_id",
          "event_status",
          "alert_id",
          "title",
          "integration_id",
          "event_severity",
          "title_rule",
          "event_time",
          "channel_id"
        ]
      },
      "Change": {
        "type": "object",
        "properties": {
          "change_id": {
            "type": "string",
            "title": "变更ID"
          },
          "data_source_id": {
            "title": "数据源ID",
            "type": "integer"
          },
          "data_source_name": {
            "type": "string",
            "title": "数据源名称"
          },
          "title": {
            "type": "string",
            "title": "标题"
          },
          "description": {
            "type": "string",
            "title": "描述"
          },
          "change_key": {
            "type": "string",
            "title": "唯一key"
          },
          "change_status": {
            "type": "string",
            "title": "状态",
            "enum": [
              "Planned",
              "Ready",
              "Processing",
              "Canceled",
              "Done"
            ]
          },
          "start_time": {
            "title": "开始时间戳",
            "type": "integer"
          },
          "last_time": {
            "title": "上次合入事件时间戳",
            "type": "integer"
          },
          "end_time": {
            "title": "结束时间戳",
            "type": "integer"
          },
          "labels": {
            "$ref": "#/components/schemas/Labels",
            "title": "标签"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChangeEvent"
            },
            "title": "关联变更事件"
          }
        },
        "required": [
          "change_id",
          "change_key",
          "title",
          "data_source_id",
          "start_time",
          "change_status",
          "end_time",
          "last_time",
          "data_source_name"
        ]
      },
      "ChangeEvent": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "description": "事件ID"
          },
          "integration_id": {
            "type": "integer",
            "description": "来源集成ID"
          },
          "title": {
            "type": "string",
            "description": "事件标题"
          },
          "description": {
            "type": "string",
            "description": "事件描述"
          },
          "change_key": {
            "type": "string",
            "description": "变更单号"
          },
          "change_status": {
            "type": "string",
            "enum": [
              "Planned",
              "Ready",
              "Processing",
              "Canceled",
              "Done"
            ],
            "description": "变更状态"
          },
          "link": {
            "type": "string",
            "description": "链接"
          },
          "event_time": {
            "type": "integer",
            "description": "触发时间，单位秒"
          },
          "labels": {
            "$ref": "#/components/schemas/Labels",
            "description": "标签"
          }
        },
        "required": [
          "event_id",
          "change_key",
          "title",
          "integration_id",
          "event_time",
          "link",
          "change_status"
        ]
      },
      "Group": {
        "type": "object",
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "i",
              "p",
              "n"
            ],
            "description": "聚合方式"
          },
          "cases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaseEqual"
            },
            "description": "分支聚合维度，仅按策略聚合时存在。优先从上至下匹配分支条件，匹配到即使用分支的维度进行聚合",
            "maxItems": 10
          },
          "equals": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "title",
                  "descritpion",
                  "severity",
                  "labels.xxx"
                ],
                "description": "长度不超过5"
              },
              "description": "集合之间为or关系，集合内为and关系"
            },
            "description": "默认聚合维度，仅按策略聚合时存在。如果所有分支都没有匹配上，则使用此维度兜底。注意此维度是多组聚合维度，任意一组维度满足，则告警被聚合",
            "maxItems": 5
          },
          "all_equals_required": {
            "type": "boolean",
            "description": "是否需要相同项全部存在。仅按策略聚合时存在。默认为false。区别在于配置多个相同项时：- 开启，告警与故障中值都为空的聚合条件将视为不同项。- 不开启，告警与故障中值都为空的聚合条件将视为相同项。"
          },
          "window_type": {
            "type": "string",
            "description": "聚合窗口类别，为空时，自动填充固定窗口tumbling ",
            "enum": [
              "tumbling",
              "sliding"
            ]
          },
          "time_window": {
            "type": "integer",
            "description": "时间窗口，单位分钟，取值范围[0,60]。为0，代表一直合并告警直到故障关闭"
          },
          "storm_threshold": {
            "type": "integer",
            "description": "风暴阈值，聚合告警条数超过该阈值进行风暴预警。取值范围[0,10000]。为0代表不设置风暴预警",
            "deprecated": true
          },
          "i_keys": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string",
                  "enum": [
                    "title",
                    "description"
                  ],
                  "description": "属性"
                },
                {
                  "type": "string",
                  "pattern": "^labels\\..+$",
                  "description": "标签"
                }
              ],
              "description": "以labels.为前缀的是标签，否则为属性，如title、severity、description等。"
            },
            "description": "智能聚合参与计算相似度的字段列表。不传默认按照title,description,labels.service,labels.resource四个字段进行计算"
          },
          "i_score_threshold": {
            "type": "number",
            "description": "智能聚合相似度阈值，仅当告警与故障相似度超过此值，才可将告警聚合入故障",
            "maximum": 1,
            "minimum": 0.5,
            "default": 0.9
          },
          "storm_thresholds": {
            "type": "array",
            "items": {
              "type": "integer",
              "description": "单个风暴阈值，当故障聚合告警条数超过该阈值时，系统将进行风暴预警。",
              "minimum": 2,
              "maximum": 10000
            },
            "description": "风暴阈值列表，为空代表不设置风暴预警。",
            "maxItems": 5,
            "minItems": 0
          }
        },
        "required": [
          "method"
        ]
      },
      "CaseEqual": {
        "type": "object",
        "properties": {
          "if": {
            "$ref": "#/components/schemas/AndFilters",
            "description": "匹配条件，仅当告警满足此条件，才会进行相同项判断"
          },
          "equals": {
            "type": "array",
            "items": {
              "description": "相同项说明",
              "$ref": "#/components/schemas/GroupingEqual"
            },
            "description": "相同项列表，可以选择属性和标签字段，当两个告警所有相同项字段值完全相同时，认为两条告警是相似告警"
          }
        },
        "required": [
          "equals",
          "if"
        ],
        "description": "分支聚合规则"
      },
      "Flapping": {
        "type": "object",
        "properties": {
          "is_disabled": {
            "type": "boolean",
            "description": "是否关闭。true 关闭，false 开启，默认值false"
          },
          "max_changes": {
            "type": "string",
            "enum": [
              "i",
              "p",
              "n"
            ],
            "description": "时间窗口内相同故障最大发生次数。范围[2,100]，默认值4。dedup_key相同时，认为故障相同。dedup_key来自于合并入的第一条告警的alert_key"
          },
          "in_mins": {
            "type": "integer",
            "description": "统计时间窗口，单位分钟。范围[1,1440]，默认值60"
          },
          "mute_mins": {
            "type": "integer",
            "description": "静默时间窗口，单位分钟。范围[0,1440]，默认值120。如果设置为0，代表不对后续触发的故障进行静默"
          }
        },
        "required": [
          "max_changes",
          "in_mins",
          "mute_mins",
          "is_disabled"
        ]
      },
      "Preference": {
        "type": "object",
        "properties": {
          "person_id": {
            "type": "integer",
            "title": "人员ID"
          },
          "trigger_notify": {
            "$ref": "#/components/schemas/SeverityToBy",
            "title": "故障触发时的通知方式"
          },
          "shedule_shift_notify": {
            "type": "object",
            "properties": {
              "personal_channels": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "personal_channels"
            ],
            "title": "换班触发时的通知方式"
          },
          "status_page_notify": {
            "type": "object",
            "properties": {
              "im_integrations": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "具体的IM集成"
              }
            },
            "required": [
              "im_integrations"
            ]
          }
        },
        "required": [
          "person_id",
          "trigger_notify",
          "shedule_shift_notify",
          "status_page_notify"
        ]
      },
      "Responder": {
        "type": "object",
        "properties": {
          "person_id": {
            "type": "integer",
            "description": "处理人员ID"
          },
          "assigned_at": {
            "type": "integer",
            "description": "分派时间戳，单位秒。如果主动认领，认领时间等于分派时间"
          },
          "acknowledged_at": {
            "type": "integer",
            "description": "认领时间戳，单位秒。为0代表此人员还未认领故障"
          },
          "person_name": {
            "type": "string",
            "description": "人员姓名（部分场景下填充）"
          },
          "email": {
            "type": "string",
            "description": "邮箱（部分场景下填充）"
          }
        },
        "required": [
          "person_id",
          "assigned_at",
          "acknowledged_at"
        ]
      },
      "IncidentAction": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "integer",
            "description": "操作时间时间戳，注意是毫秒"
          },
          "creator_id": {
            "description": "操作人员ID，0代表系统",
            "type": "integer"
          },
          "type": {
            "type": "string",
            "enum": [
              "i_comm",
              "i_notify",
              "i_new",
              "i_assign",
              "i_a_rspd",
              "i_ack",
              "i_unack",
              "i_snooze",
              "i_wake",
              "i_rslv",
              "i_reopen",
              "i_merge",
              "i_m_silence",
              "i_m_inhibat",
              "i_m_flapping",
              "i_storm",
              "i_r_rc",
              "i_r_desc",
              "i_r_rsltn",
              "i_r_resp",
              "i_r_impact",
              "i_r_title",
              "i_r_severity",
              "i_r_field",
              "i_custom"
            ],
            "description": "操作类型"
          },
          "detail": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/i_comm"
              },
              {
                "$ref": "#/components/schemas/i_notify"
              },
              {
                "$ref": "#/components/schemas/i_new"
              },
              {
                "$ref": "#/components/schemas/i_assign"
              },
              {
                "$ref": "#/components/schemas/i_a_rspd"
              },
              {
                "$ref": "#/components/schemas/i_ack"
              },
              {
                "$ref": "#/components/schemas/i_unack"
              },
              {
                "$ref": "#/components/schemas/i_snooze"
              },
              {
                "$ref": "#/components/schemas/i_wake"
              },
              {
                "$ref": "#/components/schemas/i_rslv"
              },
              {
                "$ref": "#/components/schemas/i_reopen"
              },
              {
                "$ref": "#/components/schemas/i_merge"
              },
              {
                "$ref": "#/components/schemas/i_m_silence"
              },
              {
                "$ref": "#/components/schemas/i_m_inhibit"
              },
              {
                "$ref": "#/components/schemas/i_m_flapping"
              },
              {
                "$ref": "#/components/schemas/i_storm"
              },
              {
                "$ref": "#/components/schemas/i_r_rc"
              },
              {
                "$ref": "#/components/schemas/i_r_desc"
              },
              {
                "$ref": "#/components/schemas/i_r_rsltn"
              },
              {
                "$ref": "#/components/schemas/i_r_impact"
              },
              {
                "$ref": "#/components/schemas/i_r_title"
              },
              {
                "$ref": "#/components/schemas/i_r_severity"
              },
              {
                "$ref": "#/components/schemas/i_r_field"
              },
              {
                "$ref": "#/components/schemas/i_custom"
              }
            ],
            "description": "操作详情。每一个类型对应不同内容，请根据操作类型解析"
          }
        },
        "required": [
          "created_at",
          "type",
          "creator_id",
          "detail"
        ]
      },
      "Assignment": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "分派类型",
            "enum": [
              "assign",
              "reassign",
              "escalate",
              "reopen"
            ]
          },
          "person_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "description": "人员ID"
            },
            "description": "（直接分派）人员ID列表，与escalate_rule_id二选一"
          },
          "escalate_rule_id": {
            "type": "string",
            "description": "（策略分派）分派策略ID，当时存在，与person_ids二选一"
          },
          "escalate_rule_name": {
            "type": "string",
            "description": "（策略分派）分派策略名称"
          },
          "layer_idx": {
            "type": "integer",
            "description": "（策略分派）本次分派层级，当策略分派时，可以指定分派的层级，比如直接升级到第二环节"
          },
          "notify": {
            "$ref": "#/components/schemas/RequestNotify",
            "description": "本次分派通知配置（目前仅支持单聊和模板指定），可同时用于直接分派和策略分派。"
          },
          "layer_person_reset": {
            "type": "object",
            "properties": {
              "0": {
                "$ref": "#/components/schemas/PersonGroup",
                "title": "层级ID到人员替换"
              }
            },
            "description": "（策略分派）层级人员替换，当策略分派时，可以同时设置不同层级的人员，key为层级索引，从0开始。仅特殊场景使用，您可以直接忽略",
            "required": [
              "0"
            ]
          },
          "layer_webhook_reset": {
            "type": "object",
            "properties": {
              "0": {
                "$ref": "#/components/schemas/EscalateWebhook"
              }
            },
            "description": "（策略分派）层级Webhook替换，当策略分派时，可以同时设置不同层级的Webhook，key为层级索引，从0开始。仅特殊场景使用，您可以直接忽略",
            "required": [
              "0"
            ]
          },
          "emails": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "（直接分派）人员邮箱列表，可以使用此值替代person_ids，等同于进行直接分派。仅特殊场景使用，您可以直接忽略"
          }
        },
        "required": [
          "type"
        ]
      },
      "RequestNotify": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "follow_preference": {
            "type": "boolean",
            "description": "遵循个人偏好，默认为true"
          },
          "personal_channels": {
            "type": "array",
            "description": "个人通知渠道，当follow_preference=false时生效",
            "items": {
              "type": "string",
              "oneOf": [
                {
                  "const": "email",
                  "description": "邮件"
                },
                {
                  "const": "sms",
                  "description": "短信"
                },
                {
                  "const": "voice",
                  "description": "语音"
                },
                {
                  "pattern": "^feishu_app:.+$",
                  "description": "飞书应用"
                },
                {
                  "pattern": "^dingtalk_app:.+$",
                  "description": "钉钉应用"
                },
                {
                  "pattern": "^wecom_app:.+$",
                  "description": "企微应用"
                },
                {
                  "pattern": "^slack_app:.+$",
                  "description": "Slack应用"
                },
                {
                  "pattern": "^teams_app:.+$",
                  "description": "Teams应用"
                },
                {
                  "const": "flashduty_app",
                  "description": "手机应用"
                }
              ]
            }
          },
          "template_id": {
            "type": "string",
            "description": "模板ID，当使用直接分派时，默认为”默认模板“；当使用策略分派时，默认为分派策略中指定的模板"
          }
        }
      },
      "Field1": {
        "type": "object",
        "properties": {
          "field_id": {
            "type": "string",
            "title": "字段ID"
          },
          "account_id": {
            "type": "integer",
            "title": "账户ID"
          },
          "field_name": {
            "type": "string",
            "title": "字段名称"
          },
          "display_name": {
            "type": "string",
            "title": "显示名称"
          },
          "description": {
            "type": "string",
            "title": "描述"
          },
          "field_type": {
            "type": "string",
            "title": "字段类型",
            "enum": [
              "text",
              "single_select",
              "multi_select",
              "checkbox"
            ]
          },
          "value_type": {
            "type": "string",
            "title": "值类型",
            "enum": [
              "string",
              "bool"
            ]
          },
          "options": {
            "type": "array",
            "items": {
              "type": [
                "string",
                "integer",
                "boolean",
                "array",
                "object",
                "number",
                "null"
              ]
            },
            "title": "可选值",
            "description": "数组内元素不可重复，且类型满足value_type定义"
          },
          "default_value": {
            "type": [
              "string",
              "integer",
              "boolean",
              "array",
              "object",
              "number",
              "null"
            ],
            "title": "默认值",
            "description": "类型满足value_type定义"
          },
          "status": {
            "type": "string",
            "title": "状态",
            "description": "enabled, disabled, deleted",
            "enum": [
              "enabled",
              "disabled",
              "deleted"
            ]
          },
          "creator_id": {
            "type": "integer",
            "title": "创建者ID"
          },
          "updated_by": {
            "type": "integer",
            "title": "更新者ID"
          },
          "created_at": {
            "type": "integer",
            "title": "创建时间戳"
          },
          "updated_at": {
            "type": "integer",
            "title": "更新时间戳"
          }
        },
        "required": [
          "status",
          "field_name",
          "field_id",
          "updated_at",
          "created_at",
          "field_type",
          "creator_id",
          "account_id",
          "display_name",
          "updated_by",
          "value_type"
        ]
      },
      "Notify": {
        "type": "object",
        "properties": {
          "notify": {
            "type": "object",
            "properties": {
              "advance_in_time": {
                "type": "integer",
                "title": "提前多久通知",
                "description": "单位s"
              },
              "fixed_time": {
                "type": "object",
                "properties": {
                  "cycle": {
                    "type": "string",
                    "enum": [
                      "day"
                    ],
                    "title": "day",
                    "description": "当前仅支持天粒度"
                  },
                  "start": {
                    "type": "string",
                    "description": "样式：08:00。 cycle和start同时有数据时才生效",
                    "title": "开始时间"
                  }
                },
                "title": "固定时间通知"
              },
              "by": {
                "type": "object",
                "properties": {
                  "follow_preference": {
                    "type": "boolean",
                    "title": "个人偏好设置"
                  },
                  "personal_channels": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "email",
                        "sms",
                        "feishu_app:xxxx",
                        "dingtalk_app:xxxx",
                        "wecom_app:xxxx"
                      ]
                    },
                    "title": "个人自定义设置"
                  }
                },
                "title": "个人通知"
              },
              "webhooks": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "title": "类别",
                      "enum": [
                        "feishu",
                        "dingtalk",
                        "feishu_app",
                        "dingtalk_app",
                        "slack_app"
                      ]
                    },
                    "settings": {
                      "type": "object",
                      "properties": {
                        "token": {
                          "type": "string",
                          "title": "Token"
                        },
                        "alias": {
                          "type": "string",
                          "title": "别名"
                        },
                        "integration_id": {
                          "type": "integer",
                          "title": "集成id"
                        },
                        "chat_ids": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "title": "通知的ids"
                        },
                        "sign_secret": {
                          "type": "string",
                          "title": "签名Secret"
                        }
                      }
                    }
                  }
                },
                "title": "Webhooks通知"
              }
            },
            "title": "值班轮转通知"
          }
        }
      },
      "LayerSchedules": {
        "type": "object",
        "properties": {
          "layer_schedules": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "layer_name": {
                  "type": "string",
                  "title": "规则名称"
                },
                "mode": {
                  "type": "integer",
                  "title": "模式(普通/临时)"
                },
                "schedules": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "start": {
                        "type": "integer",
                        "title": "开始时间"
                      },
                      "end": {
                        "type": "integer",
                        "title": "结束时间"
                      },
                      "hash": {
                        "type": "string",
                        "title": "Hash"
                      },
                      "group": {
                        "type": "object",
                        "properties": {
                          "group_name": {
                            "type": "string",
                            "title": "团队名"
                          },
                          "members": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "role_id": {
                                  "type": "integer",
                                  "title": "角色id"
                                },
                                "person_ids": {
                                  "type": "array",
                                  "items": {
                                    "type": "integer"
                                  },
                                  "title": "值班人员id"
                                }
                              }
                            }
                          }
                        },
                        "required": [
                          "group_name",
                          "members"
                        ],
                        "title": "值班团队"
                      }
                    }
                  },
                  "title": "值班表"
                }
              }
            },
            "title": "值班规则计算"
          }
        },
        "required": [
          "layer_schedules"
        ]
      },
      "FinalSchedule": {
        "type": "object",
        "properties": {
          "final_schedule": {
            "type": "object",
            "properties": {
              "layer_name": {
                "type": "string",
                "description": "规则名"
              },
              "mode": {
                "type": "integer"
              },
              "schedules": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "start": {
                      "type": "integer",
                      "description": "开始时间"
                    },
                    "end": {
                      "type": "integer",
                      "description": "结束时间"
                    },
                    "hash": {
                      "type": "string",
                      "description": "Hash"
                    },
                    "group": {
                      "type": "object",
                      "properties": {
                        "group_name": {
                          "type": "string",
                          "description": "团队名"
                        },
                        "members": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "role_id": {
                                "type": "integer",
                                "description": "角色id"
                              },
                              "person_ids": {
                                "type": "array",
                                "items": {
                                  "type": "integer"
                                },
                                "description": "值班人员id"
                              }
                            }
                          }
                        }
                      },
                      "required": [
                        "group_name",
                        "members"
                      ],
                      "description": "值班团队"
                    }
                  }
                }
              }
            },
            "required": [
              "layer_name",
              "mode",
              "schedules"
            ],
            "description": "最终值班"
          }
        },
        "required": [
          "final_schedule"
        ]
      },
      "Calendar": {
        "type": "object",
        "properties": {
          "team_id": {
            "type": "integer",
            "title": "管理团队ID，如果为0，代表仅创建者和主体账户可以修改配置"
          },
          "cal_id": {
            "type": "string",
            "title": "日历ID"
          },
          "cal_name": {
            "type": "string",
            "title": "日历名称，长度限制[1,40]字节",
            "maxLength": 40
          },
          "description": {
            "type": "string",
            "title": "日历描述，长度限制长度限制[1,500]字节",
            "maxLength": 500
          },
          "kind": {
            "type": "string",
            "title": "日历类型",
            "enum": [
              "personal",
              "region.official.holiday"
            ]
          },
          "timezone": {
            "type": "string",
            "description": "示例值：\"Asia/Shanghai\"",
            "title": "日历时区，格式要求：需满足 IANA Time Zone Database 中的时区定义"
          },
          "workdays": {
            "type": "array",
            "items": {
              "type": "integer",
              "enum": [
                0,
                1,
                2,
                3,
                4,
                5,
                6
              ]
            },
            "title": "工作日列表",
            "description": "公共假日日历此项为空"
          },
          "extra_cal_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "title": "关联的其他日历ID列表，比如中国大陆法定假日",
            "description": "公共假日日历此项为空"
          },
          "created_at": {
            "type": "integer",
            "title": "创建时间戳，单位秒"
          },
          "updated_at": {
            "type": "integer",
            "title": "更新时间戳，单位秒"
          },
          "creator_id": {
            "type": "integer",
            "title": "创建人ID",
            "description": "公共假日日历此项为0"
          },
          "updated_by": {
            "type": "integer",
            "title": "更新人ID",
            "description": "公共假日日历此项为0"
          }
        },
        "required": [
          "cal_name",
          "cal_id",
          "updated_at",
          "created_at",
          "kind",
          "timezone"
        ]
      },
      "CalendarEvent": {
        "type": "object",
        "properties": {
          "cal_id": {
            "type": "string",
            "title": "日历ID"
          },
          "event_id": {
            "type": "string",
            "title": "事件ID"
          },
          "summary": {
            "type": "string",
            "title": "日历名称，长度限制[1,40]字节",
            "maxLength": 40,
            "minLength": 1
          },
          "description": {
            "type": "string",
            "title": "日历描述，长度限制长度限制[1,500]字节",
            "maxLength": 500
          },
          "creator_id": {
            "type": "integer",
            "title": "创建人ID",
            "description": "对于公共假日可能为空"
          },
          "is_off": {
            "type": "boolean",
            "title": "是否工作日，false为工作日"
          },
          "start_at": {
            "type": "string",
            "title": "开始时间",
            "description": "示例值：\"2018-09-01\""
          },
          "end_at": {
            "type": "string",
            "title": "结束时间",
            "description": "示例值：\"2018-09-02\""
          },
          "created_at": {
            "type": "integer",
            "title": "创建时间戳，单位秒"
          },
          "updated_at": {
            "type": "integer",
            "title": "更新时间戳，单位秒"
          }
        },
        "required": [
          "start_at",
          "creator_id",
          "summary",
          "cal_id",
          "updated_at",
          "created_at",
          "end_at",
          "is_off"
        ]
      },
      "MixedPagination": {
        "type": "object",
        "properties": {
          "search_after_ctx": {
            "type": "string",
            "description": "游标分页，不设置为第一页。与p参数二选一。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)"
          },
          "p": {
            "type": "integer",
            "description": "传统分页，不设置从第一页开始，默认值为1，与search_after_ctx参数二选一。基于传统分页时设置，<span style=\"color: red;\">当设置p参数时，p*limit不得超过10000</span>，否则返回参数错误。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)",
            "default": 1
          },
          "limit": {
            "type": "integer",
            "description": "分页条数。<span style=\"color: red;\">当设置p参数时，(p-1)*limit不得超过10000</span>，否则返回参数错误。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)",
            "maximum": 100,
            "minimum": 0,
            "default": 20
          }
        }
      },
      "MixedPageout": {
        "type": "object",
        "properties": {
          "search_after_ctx": {
            "type": "string",
            "description": "游标分页，有此项说明有下一页。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)"
          },
          "total": {
            "type": "integer",
            "description": "匹配条目总数。请注意，<span style=\"color: red;\">total仅在小于1000时精确，请不要使用该值来计算分页是否结束。</span>当总条数大于1000时，系统仅会返回total=1000，代表系统匹配到了1000+数据。请使用hax_next_page来判断是否还有数据未获取。详细解释，请参考 [关于分页](https://developer.flashcat.cloud/doc-3502603)"
          },
          "has_next_page": {
            "type": "boolean",
            "description": "是否存在更多数据未获取"
          }
        }
      },
      "Enrichment": {
        "type": "object",
        "properties": {
          "integration_id": {
            "type": "integer",
            "title": "集成ID"
          },
          "rules": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "title": "规则类型",
                  "enum": [
                    "extraction",
                    "composition",
                    "mapping",
                    "drop"
                  ],
                  "description": "规则将按照顺序依次执行"
                },
                "if": {
                  "$ref": "#/components/schemas/AndFilters",
                  "title": "过滤条件，为空代表全部匹配"
                },
                "settings": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ERuleExtraction"
                    },
                    {
                      "$ref": "#/components/schemas/ERuleComposition"
                    },
                    {
                      "$ref": "#/components/schemas/ERuleMapping"
                    },
                    {
                      "$ref": "#/components/schemas/ERuleDrop"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "settings"
              ]
            },
            "title": "规则列表"
          },
          "creator_id": {
            "type": "integer",
            "title": "创建人ID"
          },
          "updated_by": {
            "type": "integer",
            "title": "更新人ID"
          },
          "created_at": {
            "type": "integer",
            "title": "创建时间戳，单位秒"
          },
          "updated_at": {
            "type": "integer",
            "title": "更新时间戳，单位秒"
          }
        },
        "required": [
          "updated_at",
          "created_at",
          "rules",
          "integration_id"
        ]
      },
      "ERuleExtraction": {
        "type": "object",
        "properties": {
          "source_field": {
            "type": "string",
            "title": "来源标签"
          },
          "result_label": {
            "type": "string",
            "title": "生成标签"
          },
          "pattern": {
            "type": "string",
            "title": "提取正则",
            "description": "需要为合法正则；至少一个自匹配，如果匹配到多个子串，则使用空格拼接；与g_json只能有一个存在"
          },
          "g_json": {
            "type": "string",
            "title": "gjson path",
            "description": "json path语法，具体语法请参考[gjson.dev](https://gjson.dev)；注意与pattern只能有一个存在"
          },
          "override": {
            "type": "boolean",
            "title": "如果结果标签已经存在，是否覆盖"
          }
        },
        "required": [
          "source_field",
          "result_label"
        ],
        "oneOf": [
          {
            "properties": {
              "g_json": {
                "not": {}
              }
            },
            "type": "object"
          },
          {
            "properties": {
              "pattern": {
                "not": {}
              }
            },
            "type": "object"
          }
        ]
      },
      "ERuleComposition": {
        "type": "object",
        "properties": {
          "result_label": {
            "type": "string",
            "title": "生成标签"
          },
          "template": {
            "type": "string",
            "title": "组合规则",
            "description": "一个format字符串，允许设定变量，变量名形如${label}，label为source标签名"
          },
          "override": {
            "type": "boolean",
            "title": "如果结果标签已经存在，是否覆盖"
          }
        },
        "required": [
          "result_label",
          "template"
        ]
      },
      "ERuleMapping": {
        "type": "object",
        "properties": {
          "result_labels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "title": "生成标签列表"
          },
          "mapping_type": {
            "type": "string",
            "title": "映射类别",
            "description": "枚举值 schema和api, 默认 schema",
            "enum": [
              "schema",
              "api"
            ]
          },
          "schema_id": {
            "type": "string",
            "title": "schama ID",
            "description": "映射规则 ID"
          },
          "api_id": {
            "type": "string",
            "title": "api ID",
            "description": "映射接口 ID"
          },
          "override": {
            "type": "boolean",
            "title": "如果结果标签已经存在，是否覆盖"
          }
        },
        "required": [
          "result_labels"
        ]
      },
      "Route": {
        "type": "object",
        "properties": {
          "cases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteCase"
            },
            "title": "条件路由",
            "description": "与默认路由二者至少存在一个"
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteSection"
            },
            "description": "从0开始的section位置，0代表放case 0的前边"
          },
          "default": {
            "type": "object",
            "properties": {
              "channel_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              }
            },
            "title": "默认路由",
            "required": [
              "channel_ids"
            ],
            "description": "与条件路由二者至少存在一个"
          },
          "status": {
            "type": "string",
            "title": "状态",
            "description": "enabled, disabled, deleted",
            "enum": [
              "enabled",
              "disabled",
              "deleted"
            ]
          },
          "version": {
            "type": "integer",
            "title": "版本号"
          },
          "creator_id": {
            "type": "integer",
            "title": "创建者ID"
          },
          "updated_by": {
            "type": "integer",
            "title": "更新者ID"
          },
          "created_at": {
            "type": "integer",
            "title": "创建时间戳"
          },
          "updated_at": {
            "type": "integer",
            "title": "更新时间戳"
          }
        },
        "required": [
          "status",
          "updated_at",
          "created_at",
          "creator_id",
          "updated_by",
          "version"
        ]
      },
      "RouteCase": {
        "type": "object",
        "properties": {
          "if": {
            "$ref": "#/components/schemas/AndFilters"
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "routing_mode为标准版的时候必填，名称映射版的时候不能填"
          },
          "fallthrough": {
            "type": "boolean"
          },
          "routing_mode": {
            "type": "string",
            "description": "路由模式，默认标准版",
            "enum": [
              "standard",
              "name_mapping"
            ]
          },
          "name_mapping_label": {
            "type": "string",
            "description": "labels 字段中的映射键，该键的值即为协作空间的名称，例如 labels.ChannelName"
          }
        },
        "required": [
          "if"
        ]
      },
      "AlertAction": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "integer",
            "title": "操作时间",
            "description": "注意这个是毫秒"
          },
          "creator_id": {
            "title": "操作人",
            "description": "0代表系统",
            "type": "integer"
          },
          "type": {
            "type": "string",
            "title": "操作类型",
            "enum": [
              "a_new",
              "a_close",
              "a_comm"
            ]
          },
          "detail": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/a_comm"
              },
              {
                "$ref": "#/components/schemas/a_new"
              },
              {
                "$ref": "#/components/schemas/a_close"
              },
              {
                "$ref": "#/components/schemas/a_m_inhibit"
              },
              {
                "$ref": "#/components/schemas/a_m_silence"
              },
              {
                "$ref": "#/components/schemas/a_update"
              },
              {
                "$ref": "#/components/schemas/a_merge"
              }
            ],
            "title": "操作详情",
            "description": "每一个类型对应不同内容，请根据操作类型解析"
          }
        },
        "required": [
          "created_at",
          "type",
          "creator_id",
          "detail"
        ]
      },
      "ERuleDrop": {
        "type": "object",
        "properties": {
          "drop_labels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "title": "删除标签列表"
          }
        },
        "required": [
          "drop_labels"
        ]
      },
      "MappingSchema": {
        "type": "object",
        "properties": {
          "schema_id": {
            "type": "string",
            "title": "表ID"
          },
          "schema_name": {
            "type": "string",
            "title": "表名称",
            "maxLength": 40,
            "minLength": 1
          },
          "description": {
            "type": "string",
            "title": "表描述",
            "maxLength": 500
          },
          "source_labels": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*",
              "maxLength": 40,
              "minLength": 1
            },
            "title": "查询字段列表",
            "maxItems": 3,
            "minItems": 1
          },
          "result_labels": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*",
              "maxLength": 40,
              "minLength": 1
            },
            "title": "结果字段列表",
            "maxItems": 10,
            "minItems": 1
          },
          "team_id": {
            "type": "integer",
            "title": "负责团队ID"
          },
          "creator_id": {
            "type": "integer",
            "title": "创建人ID"
          },
          "updated_by": {
            "type": "integer",
            "title": "更新人ID"
          },
          "created_at": {
            "type": "integer",
            "title": "创建时间戳，单位秒"
          },
          "updated_at": {
            "type": "integer",
            "title": "更新时间戳，单位秒"
          }
        },
        "required": [
          "updated_at",
          "created_at",
          "source_labels",
          "schema_id",
          "result_labels",
          "schema_name"
        ]
      },
      "AlertProcessingRule": {
        "type": "object",
        "properties": {
          "integration_id": {
            "type": "integer",
            "title": "集成ID"
          },
          "rules": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "title": "规则类型",
                  "description": "规则将按照顺序依次执行",
                  "enum": [
                    "title_reset",
                    "description_reset",
                    "severity_reset",
                    "alert_drop",
                    "alert_inhibit"
                  ]
                },
                "if": {
                  "title": "过滤条件，为空代表全部匹配",
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AndFilters",
                      "title": "过滤条件，为空代表全部匹配"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "settings": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/APRuleTitleReset"
                    },
                    {
                      "$ref": "#/components/schemas/APRuleDescriptionReset"
                    },
                    {
                      "$ref": "#/components/schemas/APRuleSeverityReset"
                    },
                    {
                      "$ref": "#/components/schemas/APRuleAlertDrop"
                    },
                    {
                      "$ref": "#/components/schemas/APRuleAlertInhibit"
                    }
                  ],
                  "title": "规则配置",
                  "description": "不同规则类型配置不同"
                }
              },
              "required": [
                "kind",
                "settings"
              ]
            },
            "title": "规则列表"
          },
          "creator_id": {
            "type": "integer",
            "title": "创建人ID"
          },
          "updated_by": {
            "type": "integer",
            "title": "更新人ID"
          },
          "created_at": {
            "type": "integer",
            "title": "创建时间戳，单位秒"
          },
          "updated_at": {
            "type": "integer",
            "title": "更新时间戳，单位秒"
          }
        },
        "required": [
          "updated_at",
          "created_at",
          "rules",
          "integration_id"
        ]
      },
      "APRuleTitleReset": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "title": "新的告警标题",
            "minLength": 1,
            "maxLength": 512,
            "description": "支持通过变量生成，参考[定制故障标题](https://docs.flashcat.cloud/zh/flashduty/customize-incident-attrs)"
          }
        },
        "required": [
          "title"
        ]
      },
      "APRuleDescriptionReset": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "title": "新的告警描述",
            "description": "支持通过变量生成，参考[定制故障描述](https://docs.flashcat.cloud/zh/flashduty/customize-incident-attrs)",
            "minLength": 1,
            "maxLength": 2048
          }
        },
        "required": [
          "description"
        ]
      },
      "APRuleSeverityReset": {
        "type": "object",
        "properties": {
          "severity": {
            "type": "string",
            "title": "新的严重程度",
            "description": "支持通过变量生成，参考[定制故障描述](https://docs.flashcat.cloud/zh/flashduty/customize-incident-attrs)",
            "enum": [
              "Critical",
              "Warning",
              "Info"
            ]
          }
        },
        "required": [
          "severity"
        ]
      },
      "APRuleAlertDrop": {
        "type": "object",
        "properties": {}
      },
      "APRuleAlertInhibit": {
        "type": "object",
        "properties": {
          "source_filters": {
            "$ref": "#/components/schemas/AndFilters",
            "title": "活跃告警匹配条件",
            "description": "支持标签、标题、严重度等匹配条件，不支持标签CIDR匹配。注意，此匹配条件不同于故障抑制规则，仅支持一组and条件，不支持多组or条件"
          },
          "equals": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "以label.开头的是label项，其他是属性项",
            "title": "相同项"
          }
        },
        "required": [
          "source_filters",
          "equals"
        ]
      },
      "InsightIncidentFilter": {
        "type": "object",
        "properties": {
          "start_time": {
            "type": "integer",
            "title": "开始时间",
            "description": "秒时间戳，故障的触发时间需大于此时间"
          },
          "end_time": {
            "type": "integer",
            "title": "结束时间",
            "description": "秒时间戳，故障的触发时间需小于等于此时间。最大时间跨度6个月，若aggregate_unit聚合粒度为day，则最大时间跨度6个月"
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "title": "团队列表",
            "description": "团队列表，与is_my_team同时传入时，取交集"
          },
          "is_my_team": {
            "type": "boolean",
            "title": "我的团队",
            "description": "与team_ids同时传入时，取交集"
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "title": "协作空间列表",
            "description": "空间列表，仅可选择您可见的空间"
          },
          "severities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Info",
                "Warning",
                "Critical"
              ]
            },
            "title": "严重程度",
            "description": "严重程度"
          },
          "time_zone": {
            "type": "string",
            "title": "时区",
            "description": "默认时区 Asia/Shanghai，用于结果和分组的时区。必须是 tzdata 格式。请参阅[此处](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)可接受的值列表",
            "default": "Asia/Shanghai"
          },
          "query": {
            "type": "string",
            "title": "故障标题",
            "description": "支持模糊匹配"
          },
          "labels": {
            "type": "object",
            "properties": {},
            "title": "故障标签",
            "description": "以键值对形式表示的一至多个故障标签，精确匹配"
          },
          "fields": {
            "type": "object",
            "properties": {},
            "title": "自定义字段",
            "description": "以键值对形式表示的一至多个自定义字段，仅支持基于非文本类型的自定义字段的数据筛选。精确匹配"
          },
          "seconds_to_close_from": {
            "type": "integer",
            "title": "最短存活时间",
            "description": "传入非0值时筛选存活时间大于等于该值的故障，不支持对个人维度指标的筛选"
          },
          "seconds_to_close_to": {
            "type": "integer",
            "title": "最长存活时间",
            "description": "传入非0值时筛选存活时间小于该值的故障，不支持对个人维度指标的筛选"
          },
          "seconds_to_ack_from": {
            "type": "integer",
            "title": "最短认领耗时",
            "description": "传入非0值时筛选认领耗时大于等于该值的故障"
          },
          "seconds_to_ack_to": {
            "type": "integer",
            "title": "最长认领耗时",
            "description": "传入非0值时筛选认领耗时小于该值的故障"
          }
        },
        "required": [
          "start_time",
          "end_time",
          "query",
          "labels",
          "fields"
        ]
      },
      "InsightIncidentMetrics": {
        "type": "object",
        "properties": {
          "total_engaged_seconds": {
            "type": "integer",
            "description": "处理人员参与故障处理的耗时总和。一个人的处理耗时为该人员从认领到故障被关闭的时间差（close_time-ack_time），可能会包含暂缓时间。如果无人认领，该值为0。",
            "title": "处理人员总响应耗时"
          },
          "total_incident_cnt": {
            "type": "integer",
            "description": "触发故障数量",
            "title": "触发故障数量"
          },
          "total_incidents_acknowledged": {
            "type": "integer",
            "description": "认领故障数量",
            "title": "认领故障数量"
          },
          "total_incidents_closed": {
            "type": "integer",
            "description": "关闭故障数量",
            "title": "关闭故障数量"
          },
          "total_incidents_auto_closed": {
            "type": "integer",
            "description": "自动恢复故障数量",
            "title": "自动恢复故障数量"
          },
          "total_incidents_manually_closed": {
            "type": "integer",
            "description": "手动关闭故障数量",
            "title": "手动关闭故障数量"
          },
          "total_incidents_timeout_closed": {
            "type": "integer",
            "description": "超时关闭故障数量",
            "title": "超时关闭故障数量"
          },
          "total_incidents_escalated": {
            "type": "integer",
            "description": "升级故障数量",
            "title": "升级故障数量"
          },
          "total_incidents_manually_escalated": {
            "type": "integer",
            "description": "手动升级故障数量",
            "title": "手动升级故障数量"
          },
          "total_incidents_timeout_escalated": {
            "type": "integer",
            "description": "超时升级故障数量",
            "title": "超时升级故障数量"
          },
          "total_incidents_reassigned": {
            "type": "integer",
            "description": "重新分派故障数量",
            "title": "重新分派故障数量"
          },
          "total_notifications": {
            "type": "integer",
            "title": "通知总数",
            "description": "统计所有渠道的分派通知"
          },
          "total_interruptions": {
            "type": "integer",
            "title": "中断总数",
            "description": "仅统计短信、语音、APP推送三种渠道的分派通知。一个响应人员多渠道同时推送仅算一次中断，如果距离上一次通知不超过1分钟，不算中断。eg：故障10点发生分派，接下来5分钟持续通知，仅算一次中断"
          },
          "mean_seconds_to_ack": {
            "type": "number",
            "description": "平均首次认领耗时（ack_time-start_time）",
            "title": "平均认领耗时"
          },
          "mean_seconds_to_close": {
            "type": "number",
            "description": "平均关闭耗时（close_time-start_time）",
            "title": "平均关闭耗时"
          },
          "noise_reduction_pct": {
            "type": "number",
            "description": "降噪比例，100.0-(total_incident_cnt/total_alert_event_cnt)*100.0",
            "title": "降噪比例"
          },
          "acknowlegement_pct": {
            "type": "number",
            "description": "响应比例，(total_incidents_acknowledged/total_incident_cnt)*100.0",
            "title": "响应比例"
          },
          "ts": {
            "type": [
              "integer",
              "null"
            ],
            "title": "阶段开始时间",
            "description": "秒时间戳，根据是否是时间粒度汇聚数据决定是否展示。如aggregate_unit为day时，此值将根据time_zone确定为当天零点的时间戳"
          },
          "hours": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "work",
              "off",
              "sleep"
            ],
            "title": "时间类型",
            "description": "将每一小时定义为工作时间、休息时间和睡眠时间中的任一种。来区分不同时间段下的指标差异。当不进行时间段筛选时，不展示此字段。一个故障的时间类型仅取决于其发生时间，即使该故障存活时间跨越多个时间类型，也不会进行拆分。"
          },
          "channel_id": {
            "type": [
              "integer",
              "null"
            ],
            "title": "协作空间ID",
            "description": "协作空间ID，分组数据，根据分组情况可有可无"
          },
          "channel_name": {
            "type": [
              "string",
              "null"
            ],
            "title": "协作空间名称",
            "description": "协作空间名称，分组数据，根据分组情况可有可无"
          },
          "team_id": {
            "type": [
              "integer",
              "null"
            ],
            "title": "团队ID",
            "description": "团队ID，分组数据，根据分组情况可有可无"
          },
          "team_name": {
            "type": [
              "string",
              "null"
            ],
            "title": "团队名称",
            "description": "团队名称，分组数据，根据分组情况可有可无"
          }
        }
      },
      "InsightAlertMetrics": {
        "type": "object",
        "properties": {
          "total_alert_cnt": {
            "type": "integer",
            "title": "触发告警数量",
            "description": "触发告警数量"
          },
          "total_alert_event_cnt": {
            "type": "integer",
            "title": "触发告警事件数量",
            "description": "触发告警事件数量"
          }
        }
      },
      "InsightResponderMetrics": {
        "type": "object",
        "properties": {
          "total_incident_cnt": {
            "type": "integer",
            "description": "触发故障总数量",
            "title": "触发故障数量"
          },
          "total_incidents_acknowledged": {
            "type": "integer",
            "description": "认领故障总数量",
            "title": "认领故障数量"
          },
          "total_incidents_reassigned": {
            "type": "integer",
            "description": "重新分派故障总数量，仅统计分派给此处理人，但又被转派给其他人的情况",
            "title": "重新分派故障数量"
          },
          "total_incidents_escalated": {
            "type": "integer",
            "title": "被升级的故障数量",
            "description": "被升级故障总数量，仅统计分派给此处理人，但又被升级给其他人的情况"
          },
          "total_incidents_manually_escalated": {
            "type": "integer",
            "title": "被手动升级的故障数量",
            "description": "被处理人手动升级给除自己以外的其他人的故障总数量"
          },
          "total_incidents_timeout_escalated": {
            "type": "integer",
            "title": "被自动升级的故障数量",
            "description": "被自动升级给除当前处理人以外的其他人的故障总数量"
          },
          "total_notifications": {
            "type": "integer",
            "title": "通知总数",
            "description": "统计所有渠道的分派通知总次数"
          },
          "total_interruptions": {
            "type": "integer",
            "title": "中断总数",
            "description": "仅统计短信、语音、APP推送三种渠道的分派通知。一个响应人员多渠道同时推送仅算一次中断，如果距离上一次通知不超过1分钟，不算中断。eg：故障10点发生分派，接下来5分钟持续通知，仅算一次中断"
          },
          "total_engaged_seconds": {
            "type": "integer",
            "description": "处理人员参与故障处理的耗时总和。一个人的处理耗时为该人员从认领到故障被关闭的时间差（close_time-ack_time），可能会包含暂缓时间。如果无人认领，该值为0。",
            "title": "响应投入总时间"
          },
          "mean_seconds_to_ack": {
            "type": "number",
            "description": "平均认领耗时（ack_time-start_time）。",
            "title": "平均认领耗时"
          },
          "ts": {
            "type": [
              "integer",
              "null"
            ],
            "title": "时间段开始时间",
            "description": "秒时间戳，根据是否是时间粒度汇聚数据决定是否展示。如aggregate_unit为day时，此值将根据time_zone确定为当天零点的时间戳"
          },
          "hours": {
            "type": "string",
            "title": "时间类型",
            "description": "将每一小时定义为工作时间、休息时间和睡眠时间中的任一种。来区分不同时间段下的指标差异。当不进行时间段筛选时，不展示此字段。一个故障的时间类型仅取决于其发生时间，即使该故障存活时间跨越多个时间类型，也不会进行拆分。",
            "enum": [
              "work",
              "off",
              "sleep"
            ]
          },
          "responder_id": {
            "type": "integer",
            "title": "成员ID",
            "description": "成员ID"
          },
          "responder_name": {
            "type": "string",
            "title": "成员名称",
            "description": "成员名称"
          }
        }
      },
      "MemberItemShort": {
        "type": "object",
        "properties": {
          "MemberID": {
            "type": "integer",
            "description": "成员ID"
          },
          "MemberName": {
            "type": "string",
            "description": "成员名称"
          }
        },
        "required": [
          "MemberID",
          "MemberName"
        ]
      },
      "MemberItem": {
        "type": "object",
        "properties": {
          "member_id": {
            "type": "integer",
            "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": "邮件是否验证通过"
          },
          "account_role_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer"
            },
            "description": "角色ID列表，为空代表没有赋予角色"
          },
          "is_external": {
            "type": "boolean",
            "description": "是否是SSO登录进来的成员"
          },
          "time_zone": {
            "type": "string",
            "default": "Asia/Shanghai",
            "description": "默认时区，必须是 tzdata 格式。请参阅[此处](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)可接受的值列表。"
          },
          "locale": {
            "type": "string",
            "enum": [
              "zh-CN",
              "en-US"
            ],
            "description": "默认语言"
          },
          "status": {
            "type": "string",
            "description": "状态"
          },
          "created_at": {
            "type": "integer",
            "description": "创建时间戳"
          },
          "updated_at": {
            "type": "integer",
            "description": "更新时间戳"
          },
          "ref_id": {
            "type": "string",
            "description": "关联ID，用于第三方同步标识账户，比如夜莺的用户ID"
          }
        },
        "required": [
          "member_id",
          "member_name",
          "created_at",
          "status",
          "updated_at"
        ]
      },
      "RouteHistory": {
        "type": "object",
        "properties": {
          "cases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteCase"
            },
            "title": "条件路由",
            "description": "与默认路由二者至少存在一个"
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteSection"
            }
          },
          "default": {
            "type": "object",
            "properties": {
              "channel_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              }
            },
            "title": "默认路由",
            "required": [
              "channel_ids"
            ],
            "description": "与条件路由二者至少存在一个"
          },
          "version": {
            "type": "integer",
            "title": "版本号"
          },
          "updated_by": {
            "type": "integer",
            "title": "更新者ID"
          },
          "updated_at": {
            "type": "integer",
            "title": "更新时间戳"
          }
        },
        "required": [
          "updated_at",
          "updated_by",
          "version"
        ]
      },
      "GroupingEqual": {
        "anyOf": [
          {
            "type": "string",
            "description": "属性，支持告警标题、描述、严重程度",
            "enum": [
              "title",
              "description",
              "severity"
            ]
          },
          {
            "type": "string",
            "pattern": "^labels\\..+$",
            "description": "标签，以\"labels.\"作为前缀"
          }
        ],
        "description": "相同项"
      },
      "MetricsAggregation": {
        "type": "object",
        "properties": {
          "aggregate_unit": {
            "type": "string",
            "title": "聚合粒度",
            "description": "聚合指标的时间单位。如果未提供值，则将聚合整个期间的指标。",
            "enum": [
              "day",
              "week",
              "month"
            ]
          },
          "split_hours": {
            "type": "boolean",
            "title": "是否区分时间段",
            "description": "是否按照工作时间，休息时间以及睡眠时间来进行指标聚合，常用于对不同时间段有不同响应SLA要求的场景"
          }
        }
      },
      "TeamItem": {
        "type": "object",
        "properties": {
          "team_id": {
            "type": "integer",
            "description": "团队ID，账户下唯一"
          },
          "team_name": {
            "type": "string",
            "description": "团队名称",
            "maxLength": 40
          },
          "description": {
            "type": "string",
            "description": "团队描述",
            "maxLength": 500
          },
          "created_at": {
            "type": "integer",
            "description": "创建时间戳，单位秒"
          },
          "updated_at": {
            "type": "integer",
            "description": "更新时间戳，单位秒"
          },
          "creator_id": {
            "type": "string",
            "description": "创建人ID"
          },
          "updated_by": {
            "type": "integer",
            "description": "更新人ID"
          },
          "updated_by_name": {
            "type": "string",
            "description": "更新人名称"
          },
          "person_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "description": "人员ID，可能是account_id或member_id"
            },
            "description": "团队成员列表"
          },
          "ref_id": {
            "type": "string",
            "description": "关联ID，用于第三方同步标识，如夜莺团队ID"
          }
        },
        "required": [
          "team_id",
          "updated_by",
          "updated_at",
          "team_name",
          "ref_id",
          "creator_id",
          "person_ids",
          "created_at"
        ]
      },
      "APP Key": {
        "type": "object",
        "properties": {
          "key_id": {
            "type": "integer",
            "description": "key ID"
          },
          "key_name": {
            "type": "string",
            "description": "key 名称"
          },
          "key": {
            "type": "string",
            "description": "key 秘钥，列表不会返回此信息，您可以在创建api或详情api种获取信息"
          },
          "status": {
            "type": "string",
            "description": "key 状态"
          },
          "updated_at": {
            "type": "integer",
            "description": "更新时间戳，单位秒"
          },
          "created_at": {
            "type": "integer",
            "description": "创建时间戳，单位秒"
          }
        },
        "required": [
          "key_id",
          "status",
          "key",
          "key_name",
          "updated_at",
          "created_at"
        ]
      },
      "Image": {
        "type": "object",
        "properties": {
          "alt": {
            "type": "string",
            "description": "图片的替代文本"
          },
          "src": {
            "type": "string",
            "description": "图片来源，http/https 开头的公共可访问的图片链接地址 或 图片上传接口 返回的 image_key"
          },
          "href": {
            "type": "string",
            "description": "超链接引用路径"
          }
        },
        "description": "图片"
      },
      "WebhookHistory": {
        "type": "object",
        "properties": {
          "channel_id": {
            "type": "integer",
            "description": "协作空间ID"
          },
          "integration_id": {
            "type": "string",
            "description": "数据集成ID"
          },
          "event_id": {
            "type": "string",
            "description": "动作ID"
          },
          "webhook_type": {
            "type": "string",
            "description": "Webhook类别"
          },
          "event_type": {
            "type": "string",
            "description": "事件类别"
          },
          "ref_id": {
            "type": "string",
            "description": "故障ID或告警ID"
          },
          "attempt": {
            "type": "integer",
            "description": "请求次数"
          },
          "endpoint": {
            "type": "string",
            "description": "Endpoint地址"
          },
          "request_headers": {
            "type": "string",
            "description": "请求Headers"
          },
          "request_body": {
            "type": "string",
            "description": "请求Body"
          },
          "duration": {
            "type": "integer",
            "description": "请求持续时长"
          },
          "status": {
            "type": "string",
            "description": "请求状态",
            "enum": [
              "success",
              "failed"
            ]
          },
          "status_code": {
            "type": "integer",
            "description": "请求状态码"
          },
          "error_message": {
            "type": "string",
            "description": "请求错误消息"
          },
          "response_headers": {
            "type": "string",
            "description": "响应Headers"
          },
          "response_body": {
            "type": "string",
            "description": "响应体"
          },
          "event_time": {
            "type": "string",
            "description": "事件时间，格式 2025-11-17 13:17:30.000000"
          }
        },
        "required": [
          "channel_id",
          "integration_id",
          "event_type",
          "endpoint",
          "request_headers",
          "request_body",
          "duration",
          "status",
          "status_code"
        ]
      },
      "EscalateWebhook": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "title": "webhook类型",
            "enum": [
              "feishu_app",
              "wecom_app",
              "dingtalk_app",
              "slack_app",
              "teams_app",
              "feishu",
              "wecom",
              "dingtalk",
              "zoom",
              "telegram"
            ]
          },
          "settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FeishuApp"
              },
              {
                "$ref": "#/components/schemas/SlackApp"
              },
              {
                "$ref": "#/components/schemas/TeamsApp"
              },
              {
                "$ref": "#/components/schemas/DingtalkApp"
              },
              {
                "$ref": "#/components/schemas/DingtalkRobot"
              },
              {
                "$ref": "#/components/schemas/WecomRobot"
              },
              {
                "$ref": "#/components/schemas/FeishuRobot"
              },
              {
                "$ref": "#/components/schemas/SlackRobot"
              },
              {
                "$ref": "#/components/schemas/TelegramRobot"
              },
              {
                "$ref": "#/components/schemas/ZoomRobot"
              }
            ],
            "title": "webhook设置",
            "description": "类型不同，设置不同"
          }
        }
      },
      "RouteSection": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "名称，不允许重复",
            "title": "名称"
          },
          "position": {
            "type": "integer",
            "description": "从0开始的section位置，0代表放case 0的前边",
            "title": "位置"
          }
        }
      },
      "MappingApi": {
        "type": "object",
        "properties": {
          "api_id": {
            "type": "string",
            "description": "Api ID"
          },
          "api_name": {
            "type": "string",
            "description": "Api 名称，限制长度200字符"
          },
          "team_id": {
            "type": "integer",
            "description": "负责团队ID"
          },
          "url": {
            "type": "string",
            "description": "URL，访问地址，限制长度500字符"
          },
          "insecure_skip_verify": {
            "type": "boolean",
            "description": "是否跳过secure verify"
          },
          "headers": {
            "type": "object",
            "description": "自定义 Headers。已启用安全黑名单机制，禁止填写身份鉴权、IP伪造及协议控制类敏感字段。key 最长 1024字节，value 最长 4096字节",
            "additionalProperties": {
              "type": "string"
            },
            "patternProperties": {
              "^(?i)(authorization|proxy-authorization|cookie|x-api-key|x-access-token|x-forwarded-for|x-real-ip|true-client-ip|x-client-ip|host|x-forwarded-host|x-forwarded-proto|x-internal-id|x-user-id|transfer-encoding|upgrade|connection)$": {
                "not": {}
              }
            },
            "properties": {}
          },
          "timeout": {
            "type": [
              "integer",
              "null"
            ],
            "description": "超时时间，单位 秒，默认 2s， 取值范围 1~ 3 秒",
            "minimum": 1,
            "maximum": 3
          },
          "retry_count": {
            "type": "integer",
            "description": "重试次数，取值范围 0~1 次",
            "minimum": 0,
            "maximum": 1
          },
          "description": {
            "type": "string",
            "description": "描述信息，超长500字符自动截断"
          }
        },
        "required": [
          "url",
          "api_name",
          "api_id"
        ]
      },
      "PostMortemItem": {
        "type": "object",
        "title": "故障复盘完整信息",
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/PostMortemMeta"
          },
          "basics": {
            "$ref": "#/components/schemas/PostMortemBasics"
          },
          "content": {
            "type": "object",
            "title": "报告正文",
            "properties": {
              "content": {
                "type": "string",
                "title": "报告内容（BlockNote JSON 数组）"
              }
            }
          },
          "follow_ups": {
            "type": "string",
            "title": "后续待办（自由文本）"
          }
        },
        "required": [
          "meta",
          "basics"
        ]
      },
      "PostMortemMeta": {
        "type": "object",
        "title": "复盘元数据",
        "properties": {
          "account_id": {
            "type": "integer",
            "title": "账户ID"
          },
          "post_mortem_id": {
            "type": "string",
            "title": "复盘ID（MD5哈希）"
          },
          "title": {
            "type": "string",
            "title": "复盘标题"
          },
          "status": {
            "type": "string",
            "enum": [
              "drafting",
              "published"
            ],
            "title": "复盘状态"
          },
          "template_id": {
            "type": "string",
            "title": "使用的模板ID"
          },
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "title": "关联的故障ID列表"
          },
          "media_count": {
            "type": "integer",
            "title": "媒体文件数量",
            "description": "当前复盘关联的媒体文件数量，上限100"
          },
          "author_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "title": "作者ID列表",
            "description": "编辑过该复盘的成员ID列表"
          },
          "team_id": {
            "type": "integer",
            "title": "团队ID",
            "description": "复盘所属团队，初始化时从首个故障的协作空间推导"
          },
          "channel_id": {
            "type": "integer",
            "title": "协作空间ID",
            "description": "复盘所属协作空间，初始化时从首个故障推导"
          },
          "channel_name": {
            "type": "string",
            "title": "协作空间名称",
            "description": "查询时动态填充，协作空间已删除时返回本地化占位符"
          },
          "created_at_seconds": {
            "type": "integer",
            "title": "创建时间（秒级时间戳）"
          },
          "updated_at_seconds": {
            "type": "integer",
            "title": "更新时间（秒级时间戳）"
          }
        },
        "required": [
          "account_id",
          "post_mortem_id",
          "title",
          "status",
          "incident_ids",
          "team_id",
          "channel_id",
          "created_at_seconds",
          "updated_at_seconds"
        ]
      },
      "PostMortemBasics": {
        "type": "object",
        "title": "复盘基础信息（从故障元数据计算）",
        "properties": {
          "incidents_highest_severity": {
            "type": "string",
            "title": "故障最高严重级别"
          },
          "incidents_earliest_start_seconds": {
            "type": "integer",
            "title": "故障最早开始时间（秒级时间戳）"
          },
          "incidents_latest_close_seconds": {
            "type": "integer",
            "title": "故障最晚结束时间（秒级时间戳）"
          },
          "incidents_total_duration_seconds": {
            "type": "integer",
            "title": "故障总持续时间（秒）"
          },
          "responders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Responder"
            },
            "title": "响应者列表"
          }
        },
        "required": [
          "incidents_highest_severity",
          "incidents_earliest_start_seconds",
          "incidents_latest_close_seconds",
          "incidents_total_duration_seconds",
          "responders"
        ]
      },
      "PostMortemTemplate": {
        "type": "object",
        "title": "复盘模板",
        "properties": {
          "account_id": {
            "type": "integer",
            "title": "账户ID（0为内置模板）"
          },
          "template_id": {
            "type": "string",
            "title": "模板ID"
          },
          "name": {
            "type": "string",
            "title": "模板名称"
          },
          "description": {
            "type": "string",
            "title": "模板描述"
          },
          "content": {
            "type": "string",
            "title": "模板内容（BlockNote JSON 数组）"
          },
          "content_markdown": {
            "type": "string",
            "title": "模板内容的 Markdown 格式（供 AI 生成使用）"
          },
          "team_id": {
            "type": "integer",
            "title": "管理团队ID",
            "description": "管理团队ID，仅管理团队成员和管理员可编辑/删除模板"
          },
          "created_at_seconds": {
            "type": "integer",
            "title": "创建时间（秒级时间戳）"
          },
          "updated_at_seconds": {
            "type": "integer",
            "title": "更新时间（秒级时间戳）"
          }
        },
        "required": [
          "account_id",
          "template_id",
          "name",
          "content"
        ]
      },
      "DutyError": {
        "type": "object",
        "description": "错误信息。仅当请求失败时返回。与 Flashduty 公共响应模型保持一致。",
        "properties": {
          "code": {
            "type": "string",
            "description": "错误码。枚举值：InvalidParameter、Unauthorized、AccessDenied、ResourceNotFound、InternalError 等。"
          },
          "message": {
            "type": "string",
            "description": "错误描述。"
          }
        },
        "required": [
          "code"
        ]
      },
      "Response": {
        "type": "object",
        "description": "统一响应信封。请求成功时填充 data 字段，失败时填充 error 字段。所有 srv.JSON 渲染的接口都遵循此结构。",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/DutyError"
          },
          "data": {
            "type": "object",
            "description": "业务数据对象，结构由具体接口决定。",
            "properties": {}
          }
        }
      },
      "WarRoom": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "integer",
            "description": "账户ID"
          },
          "integration_id": {
            "type": "integer",
            "description": "集成ID"
          },
          "chat_id": {
            "type": "string",
            "description": "群聊ID"
          },
          "chat_name": {
            "type": "string",
            "description": "群聊初始名称"
          },
          "share_link": {
            "type": "string",
            "description": "分享链接，如存在，可以点击链接加入群聊"
          },
          "incident_id": {
            "type": "string",
            "description": "故障ID"
          },
          "created_by": {
            "type": "integer",
            "description": "创建人员ID"
          },
          "created_at": {
            "type": "integer",
            "description": "创建时间戳，单位秒"
          }
        },
        "required": [
          "account_id",
          "incident_id",
          "chat_id",
          "created_by",
          "integration_id",
          "created_at",
          "chat_name"
        ]
      },
      "SuccessResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "description": "请求追踪 ID"
          },
          "data": {
            "type": "object",
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/NotificationDistributionItem"
                }
              }
            },
            "required": [
              "items"
            ]
          }
        },
        "required": [
          "request_id"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "description": "请求追踪 ID"
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "错误码",
                "enum": [
                  "InvalidParameter",
                  "BadRequest",
                  "InternalError"
                ]
              },
              "message": {
                "type": "string",
                "description": "错误详情"
              }
            },
            "required": [
              "code",
              "message"
            ]
          }
        },
        "required": [
          "request_id",
          "error"
        ]
      },
      "NotificationDistributionInput": {
        "type": "object",
        "required": [
          "start_time",
          "end_time",
          "group_by"
        ],
        "properties": {
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "查询起始时间（Unix 秒级时间戳），必须大于 0",
            "examples": [
              1711929600
            ]
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "查询结束时间（Unix 秒级时间戳），必须大于 start_time，且与 start_time 的差不超过 31 天（2678400 秒）",
            "examples": [
              1714521600
            ]
          },
          "group_by": {
            "type": "string",
            "enum": [
              "channel",
              "target"
            ],
            "description": "分组维度。channel: 按 channel_id + notify_channel 分组；target: 按 notify_target + notify_channel 分组"
          },
          "notify_channels": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "voice",
                "sms",
                "email"
              ]
            },
            "description": "可选，按通知类型筛选。支持的值：voice（语音）、sms（短信）、email（邮件）",
            "examples": [
              [
                "sms",
                "email"
              ]
            ]
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "可选，按通知渠道 ID 筛选",
            "examples": [
              [
                1001,
                1002
              ]
            ]
          },
          "limit": {
            "type": "integer",
            "description": "返回的最大条目数，默认 500，最大 500。小于等于 0 时使用默认值",
            "default": 500,
            "maximum": 500,
            "minimum": 0,
            "examples": [
              50
            ]
          }
        }
      },
      "NotificationDistributionItem": {
        "type": "object",
        "description": "分布统计项。group_by=channel 时返回 channel_id/channel_name；group_by=target 时返回 notify_target/member_name（target 中的 PII 会脱敏）",
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "通知渠道 ID（仅 group_by=channel 时返回）"
          },
          "channel_name": {
            "type": "string",
            "description": "通知渠道名称（仅 group_by=channel 时返回）"
          },
          "notify_target": {
            "type": "string",
            "description": "脱敏后的通知目标地址（仅 group_by=target 时返回）。邮箱示例: zhang***@example.com；手机示例: +861****5678"
          },
          "member_name": {
            "type": "string",
            "description": "接收人姓名，若无法解析则回退为脱敏后的 notify_target（仅 group_by=target 时返回）"
          },
          "notify_channel": {
            "type": "string",
            "enum": [
              "voice",
              "sms",
              "email"
            ],
            "description": "通知方式"
          },
          "notify_sum": {
            "type": "integer",
            "format": "int64",
            "description": "该分组的通知发送总量"
          }
        },
        "required": [
          "notify_channel",
          "notify_sum"
        ]
      },
      "Query": {
        "type": "object",
        "description": "告警规则中的一条查询定义。name 为查询别名（A/B/C 等，不可为 R），expr 为查询表达式。",
        "properties": {
          "name": {
            "type": "string",
            "description": "查询别名，例如 A、B、C。R 为保留名称，禁止使用。"
          },
          "expr": {
            "type": "string",
            "description": "查询表达式。具体语法由数据源类型决定（PromQL、ES DSL、SQL 等）。"
          },
          "label_fields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "作为标签的字段列表（日志/数据库类数据源使用）。"
          },
          "value_fields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "作为数值的字段列表（日志/数据库类数据源使用）。"
          },
          "args": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "数据源相关的额外参数，键值对形式。",
            "properties": {}
          }
        },
        "required": [
          "name",
          "expr"
        ]
      },
      "RelateQuery": {
        "type": "object",
        "description": "关联查询。作为辅助查询为主查询提供上下文，不直接参与触发判定。",
        "properties": {
          "name": {
            "type": "string",
            "description": "关联查询的别名，不可与 queries 中的 name 重复。"
          },
          "expr": {
            "type": "string",
            "description": "关联查询表达式。"
          },
          "args": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "关联查询所需的额外参数。",
            "properties": {}
          }
        },
        "required": [
          "name",
          "expr",
          "args"
        ]
      },
      "RecoveryThreshold": {
        "type": "object",
        "description": "阈值检测的恢复条件配置。",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "invert",
              "threshold",
              "ql"
            ],
            "description": "恢复判定模式：invert 取告警条件反义；threshold 使用独立的阈值条件；ql 使用独立的查询语言表达式。"
          },
          "condition": {
            "type": "string",
            "description": "当 mode 为 threshold 或 ql 时填写。invert 模式下为空。"
          },
          "value_fields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "恢复判定时使用的数值字段。"
          },
          "args": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "恢复判定所需的额外参数。",
            "properties": {}
          }
        },
        "required": [
          "mode"
        ]
      },
      "CheckThreshold": {
        "type": "object",
        "description": "阈值检测配置。数据命中阈值即告警。",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "是否启用阈值检测。"
          },
          "alerting_check_times": {
            "type": "integer",
            "description": "连续几次命中阈值才发送告警。"
          },
          "recovery_check_times": {
            "type": "integer",
            "description": "连续几次命中恢复条件才判定为已恢复。"
          },
          "push_recovery_event": {
            "type": "boolean",
            "description": "是否推送恢复事件。"
          },
          "critical": {
            "type": "string",
            "description": "严重级别的阈值表达式，命中则触发 Critical 告警。"
          },
          "warning": {
            "type": "string",
            "description": "警告级别的阈值表达式，命中则触发 Warning 告警。"
          },
          "info": {
            "type": "string",
            "description": "提醒级别的阈值表达式，命中则触发 Info 告警。"
          },
          "recovery": {
            "$ref": "#/components/schemas/RecoveryThreshold"
          }
        },
        "required": [
          "enabled",
          "recovery"
        ]
      },
      "AnyDataRuleRecoveryConfig": {
        "type": "object",
        "description": "有数据检测的恢复条件配置。",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "",
              "nodata",
              "ql"
            ],
            "description": "恢复判定模式：空字符串或 nodata 表示无数据即恢复；ql 表示使用独立查询语言表达式判定。"
          },
          "condition": {
            "type": "string",
            "description": "当 mode 为 ql 时填写。nodata 模式下自动置空。"
          },
          "args": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Elasticsearch 等数据源所需的额外参数。",
            "properties": {}
          }
        }
      },
      "AnyDataRule": {
        "type": "object",
        "description": "有数据检测配置。只要查询返回任意数据就触发告警，常用于日志关键字告警等场景。",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "是否启用有数据检测。"
          },
          "alerting_check_times": {
            "type": "integer",
            "description": "连续几次有数据才发送告警。"
          },
          "recovery_check_times": {
            "type": "integer",
            "description": "连续几次满足恢复条件才判定为已恢复。"
          },
          "push_recovery_event": {
            "type": "boolean",
            "description": "是否推送恢复事件。"
          },
          "severity": {
            "type": "string",
            "enum": [
              "Critical",
              "Warning",
              "Info"
            ],
            "description": "告警级别。"
          },
          "recovery": {
            "$ref": "#/components/schemas/AnyDataRuleRecoveryConfig"
          }
        },
        "required": [
          "enabled",
          "severity"
        ]
      },
      "NoDataRule": {
        "type": "object",
        "description": "无数据检测配置。查询连续返回空即触发告警，常用于探测数据源存活。",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "是否启用无数据检测。"
          },
          "alerting_check_times": {
            "type": "integer",
            "description": "连续几次无数据才发送告警。"
          },
          "recovery_check_times": {
            "type": "integer",
            "description": "连续几次有数据才判定为已恢复。"
          },
          "push_recovery_event": {
            "type": "boolean",
            "description": "是否推送恢复事件。"
          },
          "severity": {
            "type": "string",
            "enum": [
              "Critical",
              "Warning",
              "Info"
            ],
            "description": "告警级别。"
          },
          "resolve_timeout": {
            "type": "integer",
            "description": "无数据告警的自动恢复超时时间，单位为秒。"
          }
        },
        "required": [
          "enabled",
          "severity"
        ]
      },
      "RuleConfigs": {
        "type": "object",
        "description": "告警规则的检测配置，包括查询定义和三类检测器（阈值、有数据、无数据）。",
        "properties": {
          "relate_queries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RelateQuery"
            },
            "description": "关联查询列表，为主查询提供上下文。"
          },
          "queries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Query"
            },
            "description": "主查询列表，至少包含一条。"
          },
          "check_threshold": {
            "$ref": "#/components/schemas/CheckThreshold"
          },
          "check_anydata": {
            "$ref": "#/components/schemas/AnyDataRule"
          },
          "check_nodata": {
            "$ref": "#/components/schemas/NoDataRule"
          }
        },
        "required": [
          "queries"
        ]
      },
      "EnabledTime": {
        "type": "object",
        "description": "告警规则的生效时间窗口。多个窗口之间是或关系。",
        "properties": {
          "days": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "生效的星期集合，0 表示星期日，1-6 表示星期一至星期六。"
          },
          "stime": {
            "type": "string",
            "description": "生效开始时间，格式 HH:mm。"
          },
          "etime": {
            "type": "string",
            "description": "生效结束时间，格式 HH:mm。"
          }
        },
        "required": [
          "days",
          "stime",
          "etime"
        ]
      },
      "AlertRule": {
        "type": "object",
        "description": "告警规则完整对象。",
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "告警规则 ID。创建时由服务端生成。"
          },
          "account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "所属租户 ID。由服务端根据 app_key 自动填充。"
          },
          "folder_id": {
            "type": "integer",
            "format": "uint64",
            "description": "所属分组节点 ID。"
          },
          "name": {
            "type": "string",
            "description": "规则名称，同一租户下需唯一。"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "附加在告警事件上的标签集合。",
            "properties": {}
          },
          "ds_type": {
            "type": "string",
            "description": "数据源类型标识，例如 prometheus、es、clickhouse 等。"
          },
          "ds_list": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "数据源名称列表，支持通配符匹配。与 ds_ids 合并后共同决定规则作用的数据源范围。"
          },
          "ds_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "数据源 ID 列表。引入 ID 列表是为了防止数据源改名后规则失效。与 ds_list 合并使用。"
          },
          "enabled": {
            "type": "boolean",
            "description": "规则是否启用。"
          },
          "debug_log_enabled": {
            "type": "boolean",
            "description": "是否启用调试日志。开启后引擎会记录更详尽的执行信息。"
          },
          "rule_configs": {
            "$ref": "#/components/schemas/RuleConfigs"
          },
          "cron_pattern": {
            "type": "string",
            "description": "规则执行的 cron 表达式。包含秒位，共 6 段。"
          },
          "delay_seconds": {
            "type": "integer",
            "description": "查询延迟秒数。用于规避数据写入延迟，确保查询到完整数据。"
          },
          "enabled_times": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnabledTime"
            },
            "description": "规则的生效时间窗口列表，为空表示始终生效。"
          },
          "annotations": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "附加在告警事件上的注解集合，不参与分组合并。",
            "properties": {}
          },
          "description_type": {
            "type": "string",
            "enum": [
              "markdown",
              "text"
            ],
            "description": "description 字段的格式类型。仅当 description 非空时必填。"
          },
          "description": {
            "type": "string",
            "description": "规则描述正文。"
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "通知通道 ID 列表。为空表示不直接指定通道，由 FlashDuty Integration 根据路由规则决定。"
          },
          "repeat_interval": {
            "type": "integer",
            "format": "int64",
            "description": "重复通知间隔，单位为秒。"
          },
          "repeat_total": {
            "type": "integer",
            "format": "int64",
            "description": "重复通知总次数上限。"
          },
          "creator_id": {
            "type": "integer",
            "format": "uint64",
            "description": "创建者用户 ID。"
          },
          "creator_name": {
            "type": "string",
            "description": "创建者用户名。"
          },
          "updater_id": {
            "type": "integer",
            "format": "uint64",
            "description": "最后修改者用户 ID。"
          },
          "updater_name": {
            "type": "string",
            "description": "最后修改者用户名。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间，Unix 时间戳，单位为秒。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最后更新时间，Unix 时间戳，单位为秒。"
          }
        },
        "required": [
          "name",
          "folder_id",
          "ds_type",
          "cron_pattern",
          "rule_configs"
        ]
      },
      "AlertRuleBasic": {
        "type": "object",
        "description": "告警规则的精简信息，用于列表展示。去除了 rule_configs 等大字段，并附带触发状态。",
        "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": "规则标签。",
            "properties": {}
          },
          "ds_type": {
            "type": "string",
            "description": "数据源类型标识。"
          },
          "enabled": {
            "type": "boolean",
            "description": "规则是否启用。"
          },
          "debug_log_enabled": {
            "type": "boolean",
            "description": "是否启用调试日志。"
          },
          "cron_pattern": {
            "type": "string",
            "description": "执行 cron 表达式。"
          },
          "delay_seconds": {
            "type": "integer",
            "description": "查询延迟秒数。"
          },
          "creator_id": {
            "type": "integer",
            "format": "uint64",
            "description": "创建者用户 ID。"
          },
          "creator_name": {
            "type": "string",
            "description": "创建者用户名。"
          },
          "updater_id": {
            "type": "integer",
            "format": "uint64",
            "description": "最后修改者用户 ID。"
          },
          "updater_name": {
            "type": "string",
            "description": "最后修改者用户名。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "创建时间戳，单位秒。"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "最后更新时间戳，单位秒。"
          },
          "triggered": {
            "type": "boolean",
            "description": "当前是否存在活跃告警。由 FlashDuty 接口实时查询。"
          }
        }
      },
      "AlertRuleExport": {
        "type": "object",
        "description": "导出的告警规则对象。去除了 id、folder_id、创建者、时间戳等环境相关字段，便于跨环境导入。",
        "properties": {
          "name": {
            "type": "string",
            "description": "规则名称。"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "规则标签。",
            "properties": {}
          },
          "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",
            "description": "规则是否启用。"
          },
          "debug_log_enabled": {
            "type": "boolean",
            "description": "是否启用调试日志。"
          },
          "rule_configs": {
            "$ref": "#/components/schemas/RuleConfigs"
          },
          "cron_pattern": {
            "type": "string",
            "description": "执行 cron 表达式。"
          },
          "delay_seconds": {
            "type": "integer",
            "description": "查询延迟秒数。"
          },
          "enabled_times": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnabledTime"
            },
            "description": "生效时间窗口列表。"
          },
          "annotations": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "规则注解。",
            "properties": {}
          },
          "description_type": {
            "type": "string",
            "enum": [
              "markdown",
              "text"
            ],
            "description": "description 的格式类型。"
          },
          "description": {
            "type": "string",
            "description": "规则描述正文。"
          },
          "repeat_interval": {
            "type": "integer",
            "format": "int64",
            "description": "重复通知间隔，单位秒。"
          },
          "repeat_total": {
            "type": "integer",
            "format": "int64",
            "description": "重复通知总次数上限。"
          }
        }
      },
      "AlertRuleStatus": {
        "type": "object",
        "description": "按分组节点维度统计的告警规则触发概览。",
        "properties": {
          "folder_id": {
            "type": "integer",
            "format": "uint64",
            "description": "分组节点 ID。"
          },
          "folder_name": {
            "type": "string",
            "description": "分组节点名称。"
          },
          "rule_total": {
            "type": "integer",
            "format": "int64",
            "description": "该节点（含所有后代）下的告警规则总数。"
          },
          "triggered_rule_count": {
            "type": "integer",
            "format": "int64",
            "description": "该节点（含所有后代）下处于活跃告警状态的规则数。"
          }
        }
      },
      "AlertRuleAudit": {
        "type": "object",
        "description": "告警规则审计记录。每次创建或更新规则都会产生一条。",
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "审计记录 ID。"
          },
          "account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "所属租户 ID。"
          },
          "alert_rule_id": {
            "type": "integer",
            "format": "uint64",
            "description": "关联的告警规则 ID。"
          },
          "action": {
            "type": "string",
            "description": "操作类型，create 表示创建，update 表示更新。"
          },
          "content": {
            "type": "string",
            "description": "规则在此次操作后的完整 JSON 快照。列表接口中为空，仅详情接口返回。"
          },
          "creator_id": {
            "type": "integer",
            "format": "uint64",
            "description": "操作者用户 ID。"
          },
          "creator_name": {
            "type": "string",
            "description": "操作者用户名。"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "操作时间戳，单位秒。"
          }
        }
      },
      "AlertRuleCounter": {
        "type": "object",
        "description": "告警规则数量的历史快照。用于首页规则数量趋势图。",
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "快照记录 ID。"
          },
          "account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "所属租户 ID。"
          },
          "num": {
            "type": "integer",
            "format": "int64",
            "description": "对应时刻的规则总数。"
          },
          "clock": {
            "type": "integer",
            "format": "int64",
            "description": "快照时刻，Unix 时间戳，单位秒。"
          }
        }
      },
      "DSType": {
        "type": "object",
        "description": "数据源类型。",
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "数据源类型 ID。"
          },
          "name": {
            "type": "string",
            "description": "数据源类型显示名称。"
          },
          "ident": {
            "type": "string",
            "description": "数据源类型标识，英文短码。"
          },
          "account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "归属租户 ID。0 表示公共类型，非 0 表示租户私有类型。"
          },
          "weight": {
            "type": "integer",
            "description": "排序权重，越大越靠前。"
          }
        }
      },
      "NameWithMessage": {
        "type": "object",
        "description": "批量操作的单条结果。用于 import/update-fields/move 等场景按项返回成功或失败。",
        "properties": {
          "name": {
            "type": "string",
            "description": "对应的规则名称；若规则本身查找失败，则填充为 'id: <id>' 的形式。"
          },
          "message": {
            "type": "string",
            "description": "操作结果说明。空字符串表示成功；非空表示失败原因或国际化后的成功提示（如 move 接口）。"
          }
        }
      },
      "AlertRuleCreateRequest": {
        "description": "创建告警规则请求体。结构等同 AlertRule，其中 id、account_id、creator_*、updater_*、created_at、updated_at 由服务端自动填充。",
        "allOf": [
          {
            "$ref": "#/components/schemas/AlertRule"
          }
        ]
      },
      "AlertRuleUpdateRequest": {
        "description": "更新告警规则请求体。必须携带 id 字段，服务端按 id 定位规则后全量覆盖可编辑字段。",
        "allOf": [
          {
            "$ref": "#/components/schemas/AlertRule"
          }
        ],
        "required": [
          "id"
        ]
      },
      "AlertRuleUpdateFieldsRequest": {
        "type": "object",
        "description": "批量部分字段更新请求体。只写入 fields 列表中声明的字段。",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "要更新的规则 ID 列表。"
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "labels",
                "ds_type",
                "ds_list",
                "ds_ids",
                "enabled",
                "debug_log_enabled",
                "cron_pattern",
                "delay_seconds",
                "enabled_times",
                "annotations",
                "description",
                "channel_ids",
                "repeat_interval",
                "repeat_total"
              ]
            },
            "description": "本次要更新的字段名集合。仅这些字段会被写入数据库。"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "标签集合。仅当 fields 中包含 labels 时生效。",
            "properties": {}
          },
          "ds_type": {
            "type": "string",
            "description": "数据源类型。仅当 fields 包含 ds_type 时生效。"
          },
          "ds_list": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "数据源名称列表。仅当 fields 包含 ds_list 时生效。"
          },
          "ds_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "数据源 ID 列表。仅当 fields 包含 ds_ids 时生效。"
          },
          "enabled": {
            "type": "boolean",
            "description": "是否启用。仅当 fields 包含 enabled 时生效。"
          },
          "debug_log_enabled": {
            "type": "boolean",
            "description": "是否启用调试日志。仅当 fields 包含 debug_log_enabled 时生效。"
          },
          "cron_pattern": {
            "type": "string",
            "description": "cron 表达式。仅当 fields 包含 cron_pattern 时生效。"
          },
          "delay_seconds": {
            "type": "integer",
            "description": "查询延迟秒数。仅当 fields 包含 delay_seconds 时生效。"
          },
          "enabled_times": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnabledTime"
            },
            "description": "生效时间窗口。仅当 fields 包含 enabled_times 时生效。"
          },
          "annotations": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "注解集合。仅当 fields 包含 annotations 时生效。",
            "properties": {}
          },
          "description": {
            "type": "string",
            "description": "规则描述。仅当 fields 包含 description 时生效。"
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "通知通道 ID 列表。仅当 fields 包含 channel_ids 时生效。"
          },
          "repeat_interval": {
            "type": "integer",
            "format": "int64",
            "description": "重复通知间隔。仅当 fields 包含 repeat_interval 时生效。"
          },
          "repeat_total": {
            "type": "integer",
            "format": "int64",
            "description": "重复通知总次数。仅当 fields 包含 repeat_total 时生效。"
          }
        },
        "required": [
          "ids",
          "fields"
        ]
      },
      "AlertRuleMoveRequest": {
        "type": "object",
        "description": "批量移动告警规则到目标分组节点。",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "要移动的规则 ID 列表。"
          },
          "dest_folder_id": {
            "type": "integer",
            "format": "uint64",
            "description": "目标分组节点 ID。"
          }
        },
        "required": [
          "ids",
          "dest_folder_id"
        ]
      },
      "AlertRuleImportRequest": {
        "type": "array",
        "description": "批量导入的告警规则列表。每条规则需携带 folder_id、ds_type、ds_list 等字段。",
        "items": {
          "$ref": "#/components/schemas/AlertRule"
        }
      },
      "IDRequest": {
        "type": "object",
        "description": "通用单 ID 请求体。",
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "资源 ID。"
          }
        },
        "required": [
          "id"
        ]
      },
      "IDsRequest": {
        "type": "object",
        "description": "通用多 ID 请求体。",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "资源 ID 列表。"
          }
        },
        "required": [
          "ids"
        ]
      },
      "FolderIDRequest": {
        "type": "object",
        "description": "通用分组节点 ID 请求体。",
        "properties": {
          "folder_id": {
            "type": "integer",
            "format": "uint64",
            "description": "分组节点 ID。"
          }
        }
      },
      "EmptyRequest": {
        "type": "object",
        "description": "无请求参数。传空对象或省略请求体均可。",
        "properties": {}
      },
      "EmptyDataResponse": {
        "description": "成功时 data 为空对象的响应。",
        "allOf": [
          {
            "$ref": "#/components/schemas/Response"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "object",
                "description": "空对象。",
                "properties": {}
              }
            }
          }
        ]
      },
      "AlertRuleResponse": {
        "description": "单条告警规则响应。",
        "allOf": [
          {
            "$ref": "#/components/schemas/Response"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/AlertRule"
              }
            }
          }
        ]
      },
      "AlertRuleBasicListResponse": {
        "description": "告警规则精简信息列表响应。",
        "allOf": [
          {
            "$ref": "#/components/schemas/Response"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AlertRuleBasic"
                }
              }
            }
          }
        ]
      },
      "AlertRuleExportListResponse": {
        "description": "导出的告警规则列表响应。",
        "allOf": [
          {
            "$ref": "#/components/schemas/Response"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AlertRuleExport"
                }
              }
            }
          }
        ]
      },
      "NameWithMessageListResponse": {
        "description": "批量操作的逐项结果响应。",
        "allOf": [
          {
            "$ref": "#/components/schemas/Response"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/NameWithMessage"
                }
              }
            }
          }
        ]
      },
      "AlertRuleStatusListResponse": {
        "description": "分组节点触发状态列表响应。",
        "allOf": [
          {
            "$ref": "#/components/schemas/Response"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AlertRuleStatus"
                }
              }
            }
          }
        ]
      },
      "AlertRuleAuditListResponse": {
        "description": "审计记录列表响应。列表项不包含 content 字段。",
        "allOf": [
          {
            "$ref": "#/components/schemas/Response"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AlertRuleAudit"
                }
              }
            }
          }
        ]
      },
      "AlertRuleAuditResponse": {
        "description": "单条审计记录响应。包含 content 字段。",
        "allOf": [
          {
            "$ref": "#/components/schemas/Response"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/AlertRuleAudit"
              }
            }
          }
        ]
      },
      "AlertRuleCounterListResponse": {
        "description": "规则数量历史快照响应。",
        "allOf": [
          {
            "$ref": "#/components/schemas/Response"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AlertRuleCounter"
                }
              }
            }
          }
        ]
      },
      "StringInt64MapResponse": {
        "description": "字符串到整数映射的响应。键通常为分组名称或通道名称，值为规则数量。",
        "allOf": [
          {
            "$ref": "#/components/schemas/Response"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "object",
                "additionalProperties": {
                  "type": "integer",
                  "format": "int64"
                },
                "properties": {}
              }
            }
          }
        ]
      },
      "DSTypeListResponse": {
        "description": "数据源类型列表响应。",
        "allOf": [
          {
            "$ref": "#/components/schemas/Response"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DSType"
                }
              }
            }
          }
        ]
      }
    },
    "responses": {},
    "securitySchemes": {
      "apikey-query-app_key": {
        "type": "apiKey",
        "in": "query",
        "name": "app_key"
      },
      "apikey-query-integration_key": {
        "type": "apiKey",
        "in": "query",
        "name": "integration_key"
      },
      "apikey-header-DD-API-KEY": {
        "type": "apiKey",
        "in": "header",
        "name": "DD-API-KEY"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.flashcat.cloud",
      "description": "Flashduty Open API"
    }
  ],
  "security": []
}