WEB应用防火墙
查询域名的WAF请求趋势(5分钟粒度)
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 |
参数名称 | 类型 | 描述 |
---|---|---|
code | String | 状态码,成功为0 |
message | String | 错误信息或Success |
data | AttackRequestTrend | 返回值 |
hit | List | 检测请求数数组 |
time | String | 时间,yyyy-mm-dd hh:mm:ss |
text | String | 检测请求数 |
attack | List | 攻击请求数数组 |
time | String | 时间,yyyy-mm-dd hh:mm:ss |
text | String | 攻击请求数 |
rule | List | Web规则防护数组 |
time | String | 时间,yyyy-mm-dd hh:mm:ss |
text | String | Web规则防护 |
protocol | List | 协议合规检测数组 |
time | String | 时间,yyyy-mm-dd hh:mm:ss |
text | String | 协议合规检测 |
webShell | List | 后门识别数组 |
time | String | 时间,yyyy-mm-dd hh:mm:ss |
text | String | 后门识别 |
access | List | 访问控制/限速数组 |
time | String | 时间,yyyy-mm-dd hh:mm:ss |
text | String | 访问控制/限速 |
other | List | 其他防护规则数组 |
time | String | 时间,yyyy-mm-dd hh:mm:ss |
text | 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/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" } ] } }