跳转到主要内容
POST
/
insight
/
team
团队维度指标
curl --request POST \
  --url 'https://api.flashcat.cloud/insight/team?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,
  "aggregate_unit": "day",
  "split_hours": true
}
'
{
  "error": {
    "code": "<string>",
    "message": "<string>"
  },
  "data": {
    "items": [
      {
        "total_engaged_seconds": 123,
        "total_incident_cnt": 123,
        "total_incidents_acknowledged": 123,
        "total_incidents_closed": 123,
        "total_incidents_auto_closed": 123,
        "total_incidents_manually_closed": 123,
        "total_incidents_timeout_closed": 123,
        "total_incidents_escalated": 123,
        "total_incidents_manually_escalated": 123,
        "total_incidents_timeout_escalated": 123,
        "total_incidents_reassigned": 123,
        "total_notifications": 123,
        "total_interruptions": 123,
        "mean_seconds_to_ack": 123,
        "mean_seconds_to_close": 123,
        "noise_reduction_pct": 123,
        "acknowlegement_pct": 123,
        "ts": 123,
        "hours": "work",
        "channel_id": 123,
        "channel_name": "<string>",
        "team_id": 123,
        "team_name": "<string>",
        "total_alert_cnt": 123,
        "total_alert_event_cnt": 123
      }
    ]
  }
}

授权

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值时筛选认领耗时小于该值的故障

aggregate_unit
enum<string>

聚合指标的时间单位。如果未提供值,则将聚合整个期间的指标。

可用选项:
day,
week,
month
split_hours
boolean

是否按照工作时间,休息时间以及睡眠时间来进行指标聚合,常用于对不同时间段有不同响应SLA要求的场景

响应

200 - application/json
error
object

错误信息,仅失败时存在

data
object