WEB应用防火墙
查询WAF的攻击请求数趋势。
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 描述 |
---|---|
*domainsList | 域名,数组。 |
*startTimeString | 开始时间,yyyy-MM-dd HH:mm:ss。 |
*endTimeString | 结束时间,yyyy-MM-dd HH:mm:ss。 |
timeZoneString | 时区,默认GMT+8,即“GMT+8”。 |
intervalExpressionString | 攻击趋势粒度,默认值:5m。
5m:5分钟
1h:小时
1d:天 |
参数名称 | 描述 |
---|---|
codeString | 0状态码表示请求成功,其他状态码说明请参见《错误码》。 |
messageString | 错误信息或Success。 |
dataAttackRequestTrend | 返回值。 |
hitList | 检测请求数。 |
timeString | 时间,yyyy-MM-dd HH:mm:ss。 |
textString | 检测请求数。 |
attackList | 攻击请求数。 |
timeString | 时间,yyyy-MM-dd HH:mm:ss。 |
textString | 攻击请求数。 |
ruleList | Web规则防护。 |
timeString | 时间,yyyy-MM-dd HH:mm:ss。 |
textString | Web规则防护。 |
protocolList | 协议合规检测。 |
timeString | 时间,yyyy-MM-dd HH:mm:ss。 |
textString | 协议合规检测。 |
webShellList | 后门识别。 |
timeString | 时间,yyyy-MM-dd HH:mm:ss。 |
textString | 后门识别。 |
accessList | 访问控制/限速。 |
timeString | 时间,yyyy-MM-dd HH:mm:ss。 |
textString | 访问控制/限速。 |
otherList | 其他防护规则。 |
timeString | 时间,yyyy-MM-dd HH:mm:ss。 |
textString | 其他防护规则。 |
错误代码(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-attack-hit-trend" \ -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-22 15:05:00", "endTime":"2021-09-22 15:10:00" }'
{ "code": "0", "message": "Success", "data": { "protocol": [ { "time": "2021-09-22 15:05:00", "text": "0" }, { "time": "2021-09-22 15:10:00", "text": "0" } ], "webShell": [ { "time": "2021-09-22 15:05:00", "text": "0" }, { "time": "2021-09-22 15:10:00", "text": "0" } ], "other": [ { "time": "2021-09-22 15:05:00", "text": "0" }, { "time": "2021-09-22 15:10:00", "text": "0" } ], "hit": [ { "time": "2021-09-22 15:05:00", "text": "0" }, { "time": "2021-09-22 15:05:00", "text": "0" } ], "access": [ { "time": "2021-09-22 15:05:00", "text": "0" }, { "time": "2021-09-22 15:10:00", "text": "2576" } ], "attack": [ { "time": "2021-09-22 15:05:00", "text": "0" }, { "time": "2021-09-22 15:10:00", "text": "2576" } ], "rule": [ { "time": "2021-09-22 15:05:00", "text": "0" }, { "time": "2021-09-22 15:10:00", "text": "0" } ] } }