跳转到主要内容
POST
/
channel
/
inhibit
/
rule
/
update
策略更新
curl --request POST \
  --url 'https://api.flashcat.cloud/channel/inhibit/rule/update?app_key=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "channel_id": 123,
  "rule_id": "<string>",
  "rule_name": "<string>",
  "description": "<string>",
  "source_filters": [
    [
      {
        "key": "title",
        "oper": "IN",
        "vals": [
          "<string>"
        ]
      }
    ]
  ],
  "target_filters": [
    [
      {
        "key": "title",
        "oper": "IN",
        "vals": [
          "<string>"
        ]
      }
    ]
  ],
  "equals": [
    "labels.{x}"
  ],
  "is_directly_discard": true
}
'
{
  "error": {
    "code": "<string>",
    "message": "<string>"
  },
  "data": {
    "rule_id": "<string>",
    "rule_name": "<string>"
  }
}

授权

app_key
string
query
必填

请求头

Content-Type
string

请求体

application/json
channel_id
integer
必填
rule_id
string
必填

更新时必传

rule_name
string
必填

默认就是策略1,策略2

description
string
必填
source_filters
object[][]
必填

外层条件,条件之间为OR关系

内层条件

target_filters
object[][]
必填

外层条件,条件之间为OR关系

内层条件

equals
enum<string>[]
必填

以labels.开头的是label项,否则是属性项

可用选项:
labels.{x},
status,
severity,
title
is_directly_discard
boolean

响应

200 - application/json
error
object

错误信息,仅失败时存在

data
object