跳转到主要内容
POST
/
channel
/
create
空间创建
curl --request POST \
  --url 'https://api.flashcat.cloud/channel/create?app_key=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "channel_name": "<string>",
  "description": "<string>",
  "team_id": 123,
  "escalate_rule": {
    "template_id": "<string>",
    "target": {
      "team_ids": [
        123
      ],
      "person_ids": [
        123
      ],
      "schedule_to_role_ids": {
        "{schedule_id}": [
          123
        ]
      },
      "by": {
        "critical": [
          "email"
        ],
        "warning": [
          "email"
        ],
        "info": [
          "email"
        ],
        "follow_preference": true
      },
      "webhooks": [
        {
          "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"
            ]
          }
        }
      ]
    },
    "aggr_window": 123
  },
  "plugin_ids": [
    123
  ],
  "auto_resolve_timeout": 43200,
  "auto_resolve_mode": "trigger",
  "is_private": true,
  "group": {
    "method": "i",
    "cases": [
      {
        "if": [
          {
            "key": "title",
            "oper": "IN",
            "vals": [
              "<string>"
            ]
          }
        ],
        "equals": [
          "title"
        ]
      }
    ],
    "equals": [
      [
        "title"
      ]
    ],
    "all_equals_required": true,
    "time_window": 123,
    "storm_threshold": 123,
    "i_keys": [
      "title"
    ],
    "i_score_threshold": 0.9,
    "storm_thresholds": [
      5001
    ]
  },
  "flapping": {
    "is_disabled": true,
    "max_changes": "i",
    "in_mins": 123,
    "mute_mins": 123
  },
  "disable_outlier_detection": true
}
'
{
  "error": {
    "code": "<string>",
    "message": "<string>"
  },
  "data": {
    "channel_id": "<string>",
    "channel_name": "<string>"
  }
}

授权

app_key
string
query
必填

请求头

Content-Type
string

请求体

application/json
channel_name
string
必填
description
string
team_id
integer

不传,仅创建者和主体账号可以管理空间配置

escalate_rule
默认分派策略 · object
plugin_ids
integer[]
auto_resolve_timeout
integer

不传不自动恢复

必填范围: 0 <= x <= 86400
auto_resolve_mode
enum<string>
可用选项:
trigger,
update
is_private
boolean

不传默认公开

group
告警聚合配置 · object

不传不聚合

flapping
故障收敛配置 · object

不传按默认值处理

disable_outlier_detection
boolean

默认开启新奇告警检测,但仅在pro订阅生效

响应

200 - application/json
error
object

错误信息,仅失败时存在

data
object