空间创建
POST
https://api.flashcat.cloud/channel/create
最后修改时间:2024-11-19 03:36:36
请求参数
Authorization
在 query 添加参数
app_key
示例:
app_key: ********************
Header 参数
Content-Type
string
可选
示例值:
application/json
Body 参数application/json
channel_name
string
名称
description
string
描述
team_id
integer
负责团队ID
escalate_rule
object
默认分派策略
aggr_window
integer
聚合窗口,单位秒,范围[0,720]
template_id
string
模板ID
target
object (EscalateTarget)
通知对象
plugin_ids
array[integer]
告警事件集成类型ID列表
auto_resolve_timeout
integer
超时自动恢复时间,单位秒
>= 0<= 86400
is_private
boolean
是否私有访问
group
object (Group)
告警聚合配置
method
enum<string>
聚合方式
枚举值:
ipn
cases
array[object (CaseEqual) {2}]
分支聚合维度
<= 10 items
equals
array [array]
默认聚合维度
<= 5 items
all_equals_required
boolean
是否需要相同项全部存在
time_window
integer
时间窗口,单位分钟,取值范围[0,60]
storm_threshold
integer
风暴阈值,聚合告警条数超过该阈值进行风暴预警。取值范围[0,10000]
flapping
object (Flapping)
故障收敛配置
is_disabled
boolean
是否关闭
max_changes
enum<string>
时间窗口内相同故障最大发生次数
枚举值:
ipn
in_mins
integer
统计时间窗口,单位分钟
mute_mins
integer
静默时间窗口,单位分钟
示例
{
"channel_name": "string",
"description": "string",
"team_id": 0,
"escalate_rule": {
"aggr_window": 0,
"template_id": "string",
"target": {
"team_ids": [
0
],
"person_ids": [
0
],
"schedule_to_role_ids": {
"{schedule_id}": [
0
]
},
"by": {
"follow_preference": true,
"critical": [
"email"
],
"warning": [
"email"
],
"info": [
"email"
]
},
"webhooks": [
{
"type": "feishu_app",
"settings": {}
}
]
}
},
"plugin_ids": [
0
],
"auto_resolve_timeout": 0,
"is_private": true,
"group": {
"method": "i",
"cases": [
{
"if": [
{
"key": "title",
"oper": "IN",
"vals": [
"string"
]
}
],
"equals": [
"string"
]
}
],
"equals": [
[
"title"
]
],
"all_equals_required": true,
"time_window": 0,
"storm_threshold": 0
},
"flapping": {
"is_disabled": true,
"max_changes": "i",
"in_mins": 0,
"mute_mins": 0
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.flashcat.cloud/channel/create?app_key' \
--header 'Content-Type: application/json' \
--data-raw ''
返回响应
🟢200成功
application/json
Body
error
object (DutyError)
可选
code
enum<string>
错误码
枚举值:
InvalidParameterInvalidContentTypeUnauthorizedAccessDeniedMethodNotAllowedRequestTooFrequentlyRequestVerifyRequiredDangerousOperationRequestLockedRouteNotFoundBalanceNotEnoughUndonedOrderExistResourceNotFoundInternalErrorReferenceExist
message
string
错误描述
data
object
可选
channel_id
string
ID
channel_name
string
名称
示例
{
"error": {
"code": "InvalidParameter",
"message": "string"
},
"data": {
"channel_id": "string",
"channel_name": "string"
}
}

添加官方技术人员微信
在这里,获得使用上的任何帮助,快速上手企业告警一站式响应平台FlashDuty


修改于 2024-11-19 03:36:36