跳转到主要内容
POST
/
incident
/
create
创建故障
curl --request POST \
  --url 'https://api.flashcat.cloud/incident/create?app_key=' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "title": "<string>",
  "incident_severity": "Critical",
  "description": "<string>",
  "channel_id": 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>"
    ]
  }
}
'
{
  "error": {
    "code": "<string>",
    "message": "<string>"
  },
  "data": {
    "incident_id": "<string>",
    "title": "<string>"
  }
}

授权

app_key
string
query
必填

请求头

Content-Type
string
必填

请求体

application/json
title
string
必填

故障标题

incident_severity
enum<string>
必填

严重程度,注意首字母大写

可用选项:
Critical,
Warning,
Info
description
string

故障描述,可以为纯文本或markdown

channel_id
integer

协作空间ID

assigned_to
object

分派信息。不传时,将匹配协作空间下的分配策略进行分派

响应

200 - application/json
error
object

仅出现错误时返回

data
object