POST - 创建内容检测器
介绍创建内容检测器的步骤。
接口介绍
在当前系统上创建内容检测器。
请求方式(HTTP/1.1)
接口地址
https://UCSS_URL/qkact/v0/contentClassifier/
请求参数
参数名称 | 参数位置 | 值 | 是否必须 | 描述 |
---|---|---|---|---|
Content-Type | header | application/json | 是 | 定义网络文件的类型和网页的编码。 |
Authorization | header | Basic base64("client-id:access-token") |
是 | base64加密的Http Basic认证。 即 Basic 加密串 ,如Basic
dXNlcjp1c2Vy 。注: client-id是客户端ID,access-token是在获取认证时返回的值。 |
User-Agent | header | QKAct-External-Client | 是 | 检查浏览页面的访问者在用什么操作系统(包括版本号)浏览器(包括版本号)和用户个人偏好的代码。 |
{
"content-classifier":[
{
"policy-id":"abcdef1-4567-11df-a475-0022647abcde",
"custom":[
{
"match-count":2,
"content":[
{
"value-type":"send-ip",
"value":"192.168.0.21",
"match-condition":"include",
"type":"keyword",
"exact-match":true
},
{
"value-type":"send-ip",
"value":"192.168.0.22",
"match-condition":"exclude",
"type":"keyword",
"exact-match":false
},
{
"value-type":"send-ip",
"value":"192.168.0.22",
"match-condition":"exclude",
"type":"regex"
}
]
}
]
}
]
}
参数名 | 说明 | ||||
---|---|---|---|---|---|
content-classifier | 内容检测器。 | ||||
id | 来源。类型为array。 | ||||
policy-id | 策略ID(对应UCSS策略UUID)。类型为String。 | ||||
custom | 自定义检测器。 | ||||
match-count | 匹配个数。字段类型为number。 | ||||
content | 匹配规则 | ||||
|
value-type可设置send-ip(发送IP地址)、from(发件人)、to(收件人)等值。参考以下章节查看详细参数列表:检测器Content的value-type参数说明。 | ||||
|
value-type的值。 | ||||
|
匹配条件。可设置为include(包含)、exclude(不包含)等值。参考以下章节查看详细参数列表:检测器Content的match-condition参数说明。 | ||||
|
类型包含以下两种:
|
||||
|
精确匹配。字段类型boolean。 | ||||
|
邮件头。当value-type值为header时可填写,为空表示全部邮件头。 | ||||
|
邮件大小单位。当value-type为size时可填写。值可设为:Byte、KB、MB |
返回结果(创建成功的返回示例)
{
"status": 0,
"content-ids": [
"ea12123-4567-11df-a475-0022647cdeab",
"abcd123-4567-8910-a475-0022647abcde"
]
}
返回结果(创建失败的返回示例)
{
"status": 1,
"reason": "Not all Filters can be created",
"failed-contents": [0,1]
}
参数名 | 说明 |
---|---|
status | 请求是否成功,成功为0,失败为1。 |
reason | 状态解释。 |
content-ids | 创建成功的检测器ID列表。 |
failed-contents | 创建失败的检测器序号。 |