策略创建
POST
https://api.flashcat.cloud/channel/inhibit/rule/create
最后修改时间:2024-10-09 09:03:25
请求参数
Authorization
在 query 添加参数
app_key
示例:
app_key: ********************
Header 参数
Content-Type
string
可选
示例值:
application/json
Body 参数application/json
channel_id
integer
所属channel
rule_name
string
策略名称
description
string
策略描述
priority
integer
优先级
source_filters
array[array (AndFilters) {1}]
源事件匹配条件
object (Filter)
内层条件
target_filters
array[array (AndFilters) {1}]
被抑制事件匹配条件
equals
array[string]
相同项
is_directly_discard
boolean
匹配告警是否直接丢弃
示例
{
"channel_id": 0,
"rule_name": "string",
"description": "string",
"priority": 0,
"source_filters": [
[
{
"key": "title",
"oper": "IN",
"vals": [
"string"
]
}
]
],
"target_filters": [
[
{
"key": "title",
"oper": "IN",
"vals": [
"string"
]
}
]
],
"equals": [
"string"
],
"is_directly_discard": true
}
示例代码
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/inhibit/rule/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
可选
rule_id
string
ID
rule_name
string
名称
示例
{
"error": {
"code": "InvalidParameter",
"message": "string"
},
"data": {
"rule_id": "string",
"rule_name": "string"
}
}

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


修改于 2024-10-09 09:03:25