WEB应用防火墙
查询域名的重点攻击事件
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 | AttackEventList | 返回值 |
attackEventList | List | 攻击事件数组 |
attackCount | Long | 攻击请求数 |
startTime | String | 攻击事件起始时间 |
endTime | String | 攻击事件截止时间 |
attackType | String | 攻击类型 |
ip | String | 攻击ip |
attackEventType | String | 攻击事件类型 |
attackTypeNameEn | String | 攻击类别英文名称 |
attackTypeName | String | 攻击类别中文名称 |
eventNameEn | String | 攻击事件英文名称 |
eventName | String | 攻击事件中文名称 |
totalCount | Long | 合计 |
错误代码(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-event-list" \ -X "POST" \ -u "$username:$password" \ -H "Date: $date" \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "domains": [ "example.xxx.xxx"], "endTime": "2021-09-23 00:00:00", "startTime": "2021-09-22 00:00:00" }'
{ "code": "0", "message": "Success", "data": { "attackEventList": [ { "attackCount": 11647, "startTime": "2021-09-22 11:28:42", "endTime": "2021-09-22 16:09:21", "attackType": "WAF_FORCE_CRACKING", "customId": "xxx", "ip": "10.8.135.149", "attackEventType": "highFrequencyAttack", "attackTypeNameEn": "Rate Limiting", "attackTypeName": "频率限制", "eventNameEn": "10.8.135.149 IP launch Brute Force attacks.", "eventName": "10.8.135.149 IP发起暴力破解攻击" } ], "totalCount": 1 } }