跳转到主要内容
POST
/
channel
/
inhibit
/
rule
/
create
策略创建
curl --request POST \
  --url 'https://api.flashcat.cloud/channel/inhibit/rule/create?app_key=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "channel_id": 123,
  "rule_name": "<string>",
  "description": "<string>",
  "source_filters": [
    [
      {
        "key": "title",
        "oper": "IN",
        "vals": [
          "<string>"
        ]
      }
    ]
  ],
  "target_filters": [
    [
      {
        "key": "title",
        "oper": "IN",
        "vals": [
          "<string>"
        ]
      }
    ]
  ],
  "equals": [
    "<string>"
  ],
  "priority": 123,
  "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_name
string
必填
description
string
必填
source_filters
object[][]
必填

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

内层条件

target_filters
object[][]
必填

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

内层条件

equals
string[]
必填

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

priority
integer
is_directly_discard
boolean

响应

200 - application/json
error
object

错误信息,仅失败时存在

data
object