跳转到主要内容
POST
/
insight
/
incident
/
list
故障明细查询
curl --request POST \
  --url 'https://api.flashcat.cloud/insight/incident/list?app_key=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "start_time": 123,
  "end_time": 123,
  "query": "<string>",
  "labels": {},
  "fields": {},
  "team_ids": [
    123
  ],
  "is_my_team": true,
  "channel_ids": [
    123
  ],
  "severities": [
    "Info"
  ],
  "time_zone": "Asia/Shanghai",
  "seconds_to_close_from": 123,
  "seconds_to_close_to": 123,
  "seconds_to_ack_from": 123,
  "seconds_to_ack_to": 123,
  "asc": true,
  "orderby": "created_at",
  "search_after_ctx": "<string>",
  "p": 1,
  "limit": 20
}
'
{
  "error": {
    "code": "<string>",
    "message": "<string>"
  },
  "data": {
    "items": [
      {
        "incident_id": "<string>",
        "title": "<string>",
        "progress": "Triggered",
        "severity": "Info",
        "created_at": 123,
        "hours": "work",
        "team_id": 123,
        "team_name": "<string>",
        "channel_id": 123,
        "channel_name": "<string>",
        "closed_by": "timeout",
        "seconds_to_ack": 123,
        "seconds_to_close": 123,
        "engaged_seconds": 123,
        "notifications": 123,
        "interruptions": 123,
        "assignments": 123,
        "reassignments": 123,
        "acknowledgements": 123,
        "escalations": 123,
        "manual_escalations": 123,
        "timeout_escalations": 123,
        "responders": [
          {
            "person_id": 123,
            "assigned_at": 123,
            "acknowledged_at": 123
          }
        ],
        "assigned_to": {
          "type": "assign",
          "person_ids": [
            123
          ],
          "escalate_rule_id": "<string>",
          "escalate_rule_name": "<string>",
          "layer_idx": 123,
          "notify": {
            "follow_preference": true,
            "personal_channels": [
              "<string>"
            ],
            "template_id": "<string>"
          },
          "layer_person_reset": {
            "0": {
              "emails": [
                "<string>"
              ],
              "team_ids": [
                123
              ],
              "person_ids": [
                123
              ],
              "schedule_to_role_ids": {
                "{schedule_id}": [
                  123
                ]
              }
            }
          },
          "layer_webhook_reset": {
            "0": {
              "type": "feishu_app",
              "settings": {
                "data_source_id": 123,
                "chat_ids": "<string>",
                "reply_mode": "threads",
                "reply_event_types": [
                  "<string>"
                ],
                "disable_at": true,
                "put_top_notice": true,
                "severities": [
                  "Info"
                ]
              }
            }
          },
          "emails": [
            "<string>"
          ]
        },
        "labels": {},
        "fields": {}
      }
    ],
    "search_after_ctx": "<string>",
    "total": 123,
    "has_next_page": true
  }
}

授权

app_key
string
query
必填

请求体

application/json
start_time
integer
必填

秒时间戳,故障的触发时间需大于此时间

end_time
integer
必填

秒时间戳,故障的触发时间需小于等于此时间。最大时间跨度6个月,若aggregate_unit聚合粒度为day,则最大时间跨度6个月

query
string
必填

支持模糊匹配

labels
故障标签 · object
必填

以键值对形式表示的一至多个故障标签,精确匹配

fields
自定义字段 · object
必填

以键值对形式表示的一至多个自定义字段,仅支持基于非文本类型的自定义字段的数据筛选。精确匹配

team_ids
integer[]

团队列表,与is_my_team同时传入时,取交集

is_my_team
boolean

与team_ids同时传入时,取交集

channel_ids
integer[]

空间列表,仅可选择您可见的空间

severities
enum<string>[]

严重程度

可用选项:
Info,
Warning,
Critical
time_zone
string
默认值:Asia/Shanghai

默认时区 Asia/Shanghai,用于结果和分组的时区。必须是 tzdata 格式。请参阅此处可接受的值列表

seconds_to_close_from
integer

传入非0值时筛选存活时间大于等于该值的故障,不支持对个人维度指标的筛选

seconds_to_close_to
integer

传入非0值时筛选存活时间小于该值的故障,不支持对个人维度指标的筛选

seconds_to_ack_from
integer

传入非0值时筛选认领耗时大于等于该值的故障

seconds_to_ack_to
integer

传入非0值时筛选认领耗时小于该值的故障

asc
boolean
orderby
enum<string>

仅支持故障触发时间created_at

可用选项:
created_at
search_after_ctx
string

游标分页,不设置为第一页。与p参数二选一。详细解释,请参考 关于分页

p
integer
默认值:1

传统分页,不设置从第一页开始,默认值为1,与search_after_ctx参数二选一。基于传统分页时设置,当设置p参数时,plimit不得超过10000** ,否则返回参数错误。详细解释,请参考 关于分页

limit
integer
默认值:20

分页条数。*当设置p参数时,(p-1)limit不得超过10000 ,否则返回参数错误。详细解释,请参考 关于分页

必填范围: 0 <= x <= 100

响应

200 - application/json
error
object

错误信息,仅失败时存在

data
object