跳转到主要内容
POST
/
status-page
/
change
/
create
创建状态页事件
curl --request POST \
  --url 'https://api.flashcat.cloud/status-page/change/create?app_key=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "page_id": 5750613685214,
  "type": "incident",
  "title": "Web Console Degraded Performance",
  "description": "We are investigating degraded performance affecting the web console.",
  "status": "investigating",
  "start_at_seconds": 1712000000,
  "notify_subscribers": true,
  "updates": [
    {
      "status": "investigating",
      "description": "We are currently investigating an issue affecting some users.",
      "component_changes": [
        {
          "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
          "status": "degraded"
        }
      ]
    }
  ]
}
'
{
  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
  "data": {
    "change_id": 6294539747131,
    "change_name": "API Test Incident"
  }
}

限制说明

项目说明
速率限制每个账户 1,000 次/分钟50 次/秒
权限要求状态页面事件管理on-call

授权

app_key
string
query
必填

在 Flashduty 控制台 账户 → APP Key 中签发的 app_key。调用任何公开 API 时都必须携带。它等同于所属账户的身份凭证,请妥善保管。

请求体

application/json

创建状态页故障或维护事件所需的参数。首条更新必须包含 component_changes 以声明受影响组件;回溯事件至少需要 2 条更新。

page_id
integer<int64>
必填

状态页 ID。

type
enum<string>
必填

事件类型。

可用选项:
incident,
maintenance
title
string
必填

事件标题,最多 255 个字符。

Maximum string length: 255
status
enum<string>
必填

事件初始状态。故障事件支持 investigating/identified/monitoring/resolved;维护事件支持 scheduled/ongoing/completed

可用选项:
investigating,
identified,
monitoring,
resolved,
scheduled,
ongoing,
completed
updates
object[]
必填

时间线更新列表。即时事件一般只传一条;回溯事件需传入全部历史更新。

description
string

事件描述(支持 Markdown),必填。

start_at_seconds
integer<int64>

事件开始时间(Unix 秒)。留空时默认为当前时间。

responders
integer<int64>[]

事件负责成员 ID 列表。

linked_changes
string[]

关联的事件 ID 列表(相关故障、发布等)。

close_at_seconds
integer<int64>

回溯事件的结束时间,需大于 start_at_seconds

notify_subscribers
boolean

是否通知订阅者本事件及其所有更新。

auto_update_by_schedule
boolean

仅维护事件:根据计划窗口自动推进状态。

is_retrospective
boolean

标记为回溯(历史)事件。

响应

成功

成功响应结构。2xx 响应中 request_id 标识本次调用(同时出现在 Flashcat-Request-Id 响应头中),data 为接口业务 payload。失败响应使用不同结构,参见 ErrorResponse

request_id
string
必填

本次请求的唯一 ID,也会在 Flashcat-Request-Id 响应头中返回。反馈问题时请一并附上。

示例:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"

data
object
必填

创建状态页事件的结果。