BotGuard爬虫管理
获取Bot事件日志数据
单用户调用频率:300/5min
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
domain | String | 否 | 域名。多个以;隔开。 |
startTime | String | 是 | 开始时间。格式: yyyy-MM-dd HH:mm:ss |
endTime | String | 是 | 结束时间。格式: yyyy-MM-dd HH:mm:ss |
timeZone | Integer | 否 | 时区,默认8,即“GTM+8” |
lang | String | 否 | 语言类型。 默认cn en:英文 cn:中文 |
attackType | String | 否 | 攻击类型。多个以;隔开。 |
act | String | 否 | 处理动作。 1:拦截 2:监控 7:攻击标记 8:验证码 |
location | String | 否 | IP地理位置。 |
ip | String | 否 | 客户端IP。 |
url | String | 否 | URI。 |
referer | String | 否 | Referer。 |
statusCode | String | 否 | 状态码。 |
userAgent | String | 否 | User-Agent。 |
uuid | String | 否 | 事件ID。 |
pageSize | Integer | 否 | 每页显示的条目数。最大限制10,000。 |
currentPage | Integer | 否 | 当前页码。 |
clientId | String | 否 | 客户端ID。 |
browserFp | String | 否 | 浏览器指纹。 |
ruleName | String | 否 | 规则名。 |
botRuleName | String | 否 | Bot规则名。 |
ipCondition | Integer | 否 | '客户端IP'查询条件匹配方式。默认值:3。 1:相等 2:不相等 3:包含 4:不包含 |
urlCondition | Integer | 否 | '客户端URL'查询条件匹配方式。默认值:3。 1:相等 2:不相等 3:包含 4:不包含 |
refererCondition | Integer | 否 | '客户端Rerfer'查询条件匹配方式。默认值:3。 1:相等 2:不相等 3:包含 4:不包含 |
statusCodeConditon | Integer | 否 | '客户端状态码'查询条件匹配方式。默认值:3。 1:相等 2:不相等 3:包含 4:不包含 |
userAgentCondition | Integer | 否 | '客户端UA'查询条件匹配方式。默认值:3。 1:相等 2:不相等 3:包含 4:不包含 |
参数名称 | 类型 | 描述 |
---|---|---|
code | String | 状态码,成功为“200”。 |
message | String | 返回信息,成功为“Success”。 |
data | Object | 返回数据 |
currentPage | Integer | 当前页码。 |
firstPage | Integer | 首页页码。 |
lastPage | Integer | 末页页码。 |
pageSize | Integer | 每页显示的条目数。最大限制10,000。 |
totalCount | Long | 总条目数。最大限制1,000,000。 |
totalPageCount | Integer | 总页数。 |
list | List | 数据列表 |
referer | String | Referer。 |
browser_fp | String | 浏览器指纹。 |
attack_type | String | 攻击类型。 |
rule_name | String | 规则名称。 |
ip | String | IP。 |
uuid | String | 事件ID。 |
version | String | 版本号。 |
client_id | String | 客户端ID。 |
url | String | URI。 |
block_id | String | Block id。 |
content | String | 内容。 |
mode | String | 请求方法。 |
final_rule_id | Integer | 规则id。 |
event_type | String | 事件类型。 |
act | String | 处理动作。 |
zone | String | 时区。 |
attack_time | String | 攻击时间 |
strategy_desc | String | 策略描述。。 |
host | String | 域名。 |
location | String | IP地理位置。 |
strategy_name | String | 策略名称。 |
user_agent | String | User-Agent |
detail_host | String | 域名详情。 |
statusCode | Integer | 状态码。 |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
22994001 | CUSTOMER_NOT_EXIST | 200 | 客户不存在 |
22994000 | PARAM_ERROR_CODE | 200 | 查询参数错误 |
22995000 | INTERNAL_ERROR_CODE | 200 | 系统错误 |
#!/bin/bash username="example_username" 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/bot/report/event-log \ -X "POST" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d { "domain": "example1.xxx.xxx;example2.xxx.xxx;example3.xxx.xxx;", "startTime": "2021-12-01 00:00:00", "endTime": "2021-12-31 00:00:00", "act": "1", "attackType":"BOT_ENVABN", "ip": "10.8.174.24", "url": "/test01.php" }
{ "code": 200, "data": { "currentPage": 1, "firstPage": 1, "lastPage": 1, "list": [ { "referer": "-", "browser_fp": "", "attack_type": "BOT_ENVABN", "rule_name": "", "ip": "10.8.174.24", "uuid": "bd44680719164076288390e6a8b6", "version": "HTTP/1.1", "client_id": "-", "url": "/test01.php", "block_id": "", "content": "offline blacklist type:BOT_ENVABN, info:The environment of client is abnormal.[finger], block time 18.743000030518", "mode": "GET", "final_rule_id": 3550, "event_type": "type1", "act": "action1", "zone": "", "attack_time": "2021-12-29 15:28:03", "strategy_desc": "description", "host": "localapp.sec.sec.haplat.net", "location": " ", "strategy_name": "name", "user_agent": "WsSecurityDemo/21.1222.0 CFNetwork/1240.0.4 Darwin/20.6.0", "detail_host": "localapp.sec.sec.haplat.net", "statusCode": 403 }, { "referer": "-", "browser_fp": "", "attack_type": "BOT_ENVABN", "rule_name": "", "ip": "10.8.174.24", "uuid": "af57490421164076281090e6a8b6", "version": "HTTP/1.1", "client_id": "-", "url": "/test01.php", "block_id": "", "content": "offline blacklist type:BOT_ENVABN, info:The environment of client is abnormal.[finger], block time 18.848999977112", "mode": "GET", "final_rule_id": 3550, "event_type": "type", "act": "action", "zone": "", "attack_time": "2021-12-29 15:26:50", "strategy_desc": "description", "host": "localapp.sec.sec.haplat.net", "location": " ", "strategy_name": "name", "user_agent": "WsSecurityDemo/21.1222.0 CFNetwork/1240.0.4 Darwin/20.6.0", "detail_host": "localapp.sec.sec.haplat.net", "statusCode": 403 }, { "referer": "-", "browser_fp": "", "attack_type": "BOT_ENVABN", "rule_name": "", "ip": "10.8.174.24", "uuid": "452a7bd091164057166590e6a8b6", "version": "HTTP/1.1", "client_id": "-", "url": "/test01.php", "block_id": "", "content": "offline blacklist type:BOT_ENVABN, info:The environment of client is abnormal.[hook], block time 14.267999887466", "mode": "GET", "final_rule_id": 3550, "event_type": "type", "act": "action", "zone": "", "attack_time": "2021-12-27 10:21:05", "strategy_desc": "description", "host": "localapp.sec.sec.haplat.net", "location": " ", "strategy_name": "name", "user_agent": "WsSecurityDemo/21.1222.0 CFNetwork/1240.0.4 Darwin/20.6.0", "detail_host": "localapp.sec.sec.haplat.net", "statusCode": 403 } ], "pageSize": 10, "totalCount": 3, "totalPageCount": 1 }, "message": "Success" }