WEB应用防火墙
查询WAF触发规则/策略。
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
domains | List | 是 | 域名,数组。 |
startTime | String | 是 | 开始时间,yyyy-MM-dd HH:mm:ss。 |
endTime | String | 是 | 结束时间,yyyy-MM-dd HH:mm:ss。 |
timeZone | String | 否 | 时区,默认GMT+8,即“GMT+8”。 |
acts | List | 否 | 处理动作,默认1和2。 1:拦截 2:监控 |
policys | List | 否 | 触发策略类型,数组。[protocol:协议合规检测, webShell:后门识别, other:其他防护规则, access:访问控制/限速, rule:Web规则防护] |
参数名称 | 类型 | 描述 |
---|---|---|
code | String | 0状态码表示请求成功,其他状态码说明请参见《错误码》。 |
message | String | 错误信息或Success。 |
data | TriggerRule | 返回值。 |
act | String | 处理动作。 1:拦截 2:监控 |
ruleName | String | 规则名称。 |
attackType | String | 攻击类型。 |
attackTypeName | String | 攻击类型中文名称。 |
attackTypeNameEn | String | 攻击类型英文名称。 |
ruleId | String | 规则ID。 |
totalCount | String | 触发次数。 |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
22992000 | ERROR_SYSTEM | 200 | 系统错误 |
22992001 | ERROR_PARAM | 200 | 参数错误 |
22992002 | ERROR_HEADER | 200 | 请求头参数错误 |
22992003 | ERROR_ZONE | 200 | 时区参数异常,请以GMT开头 |
22992004 | ERROR_TIME_ZONE | 200 | 时区转换异常 |
#!/bin/bash username="example_username" # Note that this must be a single quote to avoid the special $ character apiKey='example_apiKey' date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"` password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64` curl -i --url "https://open.chinanetcenter.com/api/waf/report/query-trrigger-rule-list" \ -X "POST" \ -u "$username:$password" \ -H "Date: $date" \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "domains":["example.xxx.xxx"], "startTime":"2021-09-06 00:00:00", "endTime":"2021-10-05 00:00:00", "timeZone":"GMT+8", "acts":[], "policys":[] }'
{ "code": "0", "message": "Success", "data": { "count": 6, "list": [ { "act": "1", "attackType": "WAF_FORCE_CRACKING", "attackTypeNameEn": "Rate Limiting", "ruleName": "cracking", "attackTypeName": "Rate Limiting", "ruleId": "4000", "totalCount": 11651 }, { "act": "1", "attackType": "WAF_SERVER_ERROR_LEAKAGE", "attackTypeNameEn": "Server Sensitive Info Leakage", "ruleName": "test_guize1", "attackTypeName": "Server Sensitive Info Leakage", "ruleId": "20347", "totalCount": 63 }, { "act": "2", "attackType": "WAF_CUSTOM_RULE", "attackTypeNameEn": "Custom Rules", "ruleName": "111223", "attackTypeName": "Custom Rules", "ruleId": "20341", "totalCount": 29 }, { "act": "1", "attackType": "WAF_SQLI", "attackTypeNameEn": "SQL Injection", "ruleName": "", "attackTypeName": "SQL Injection", "ruleId": "0", "totalCount": 26 }, { "act": "2", "attackType": "WAF_SERVER_ERROR_LEAKAGE", "attackTypeNameEn": "Server Sensitive Info Leakage", "ruleName": "new_test_08251", "attackTypeName": "Server Sensitive Info Leakage", "ruleId": "20345", "totalCount": 2 }, { "act": "2", "attackType": "WAF_SQLI", "attackTypeNameEn": "SQL Injection", "ruleName": "sql_backslash", "attackTypeName": "SQL Injection", "ruleId": "5000", "totalCount": 2 } ] } }