跳转到主要内容
POST
/
incident
/
list-by-card
故障列表-卡片视图
curl --request POST \
  --url 'https://api.flashcat.cloud/incident/list-by-card?app_key=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "view_id": "<string>",
  "start_time": 123,
  "end_time": 123,
  "asc": true,
  "progress": "<string>",
  "title": "<string>",
  "channel_ids": [
    123
  ],
  "responder_ids": [
    123
  ],
  "acker_ids": [
    123
  ],
  "creator_ids": [
    123
  ],
  "incident_ids": [
    "<string>"
  ],
  "range_by": "<string>",
  "incident_severity": "Critical",
  "is_related": true,
  "is_snoozed": true,
  "is_my_team": true,
  "labels": {
    "$key": [
      "<string>"
    ]
  }
}
'
{
  "error": {
    "code": "<string>",
    "message": "<string>"
  },
  "data": {
    "items": [
      {
        "title": "<string>",
        "total": 123,
        "incident_severity": "<string>",
        "incident_ids": [
          "<string>"
        ]
      }
    ]
  }
}

授权

app_key
string
query
必填

请求体

application/json
view_id
string
必填
start_time
integer
必填

单位秒,end_time-start_time不能超过1个月

end_time
integer
必填

单位秒,end_time-start_time不能超过1个月

asc
boolean
progress
string

全部(progress不传) 未关闭(progress传Triggered,Processing) 待处理(progress传Triggered) 处理中(progress传Processing) 已关闭(progress传Closed)

title
string
channel_ids
integer[]

0代表全局故障

responder_ids
integer[]

处理人可能包含未认领的已分派人员

acker_ids
integer[]
creator_ids
integer[]

0代表系统聚合故障

incident_ids
string[]
range_by
string

默认为last_time,支持updated_at last_time start_time。但如果by_intersection=true,range_by只能为last_time或end_time

incident_severity
enum<string>

Critical,Info,Warning 可以传多个,逗号分隔

可用选项:
Critical,
Warning,
Info

登录人为发起人、被指派、关闭人或处理人之一

is_snoozed
boolean

仅看当前状态,与查询时间区间无关

is_my_team
boolean

当设置为true,仅统计我所在团队下属协作空间内的故障

labels
标签筛选 · object

支持精确匹配、正则匹配和通配匹配。以'/'作为前后缀的字符串将被识别为正则。 举例:指定('datacenter' IN ['bj01','sh-*','']) AND ('host' IN '/api-server-\d+/'),可匹配到产生于'bj01'和'sh-01'、'sh-02'三个数据中心并且主机名满足'api-server-\d+'正则的报警事件

响应

200 - application/json
error
object

错误信息,仅失败时存在

data
object