Web Application Firewall

GetWAFAttackEvent

更新時間: 2023-11-28 10:15:42

Query the key incidents of domain.

  • 単一ユーザーの使用頻度: 300/5min
  • 使用できるプロダクト: Application Shield,Web Application Firewall
API認証の詳細については、以下を参照してください:API認証の概要

リクエストパラメータ

Body パラメータ

パラメータ名説明
*domains
Domain, array.
*startTime
Start time, yyyy-MM-dd HH:mm:ss.
*endTime
End time, yyyy-MM-dd HH:mm:ss.
timeZone
Time zone, GMT+8 by default.

レスポンスパラメータ

Body パラメータ

パラメータ名説明
code
Return 0 means success, please see to check other status code.
message
Error message or Success.
data
Return data.
attackEventList
Attack events.
attackCount
Attack requests.
startTime
Start time of attack.
endTime
End time of attack.
attackType
Attack type.
ip
Attacker Ip.
attackEventType
Attack event type.
attackTypeNameEn
English name of attack type.
attackTypeName
Chinese name of attack type.
eventNameEn
English name of attack event.
eventName
Chinese name of attack event.
totalCount
Number of attack events.

エラーコード

エラーコード(code)説明(message)HTTPステータスコード意味
22992000ERROR_SYSTEM200System error.
22992001ERROR_PARAM200Param invalid.
22992002ERROR_HEADER200request header param error
22992003ERROR_ZONE200The time zone parameter is abnormal, please start with GMT
22992004ERROR_TIME_ZONE200time zone conver error

入力例

JSON
JSON
リクエスト例
コピー コピー完了
#!/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://api.cdnetworks.com/api/waf/report/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": "Rate Limiting",
        "eventNameEn": "10.8.135.149 IP launch Brute Force attacks.",
        "eventName": "10.8.135.149 IP launch Brute Force attacks."
      }
    ],
    "totalCount": 1
  }
}