Cloud Security 2.0

QueryEventTrend

更新時間: 2025-09-04 15:54:37

Query traffic trend (by request count).

  • リミットの詳細: The time range can not exceed 31 days.
  • 単一ユーザーの使用頻度: 300/5min
  • 使用できるプロダクト: Cloud Security 2.0,Flood Shield 2.0
API認証の詳細については、以下を参照してください:API認証の概要

リクエストパラメータ

リクエストヘッダ

パラメータ名説明
serviceTypeString
Security service type. Please enter a specific service type, if you purchase multiple security services.
timezoneString
デフォルト値:GMT+8
Report Data Timezone:1. Indicates the timezone for the report data. lt must be relative to GMT andspecified in the format GMT+n where -12<=n <= 12. For example,timezone=GMT-7 and timezone=GMT+8.2. If the parameter is unspecified,results will be in the GMT+8 timezone.

Body パラメータ

パラメータ名説明
*startTimeString
Start time, format: yyyy-MM-dd HH:mm:ss. The time range can not exceed 31 days.
*endTimeString
End time, format: yyyy-MM-dd HH:mm:ss. The time range can not exceed 31 days.
actTypeList
選択可能な値:mitigatedmonitored
Multiple selection. Handling results, default: display all results. mitigated: Number of mitigated requests. monitored: Number of observed requests.
domainsList
Domain list. Queries all domains under the account when not specified.

レスポンスパラメータ

Body パラメータ

パラメータ名説明
codeString
Please refer to the error code for exceptions.
msgString
Description.
dataList
Data.
timePointString
Time, format: yyyy-MM-dd HH-mm-ss.
totalLong
Total requests.
attackLong
Attack requests.
mitigatedLong
Mitigated requests.
monitoredLong
Monitored requests.
whitelistLong
Whitelist requests.
distributionList
Policy type classification requests.
codeString
選択可能な値:BLOCKDMS_DEFENDWAF_DEFENDBOT_MANAGEAPI_DEFENDINTELLIGENCERATE_LIMITCUSTOMIZE_RULE
Policy type. BLOCK: IP/Geo Block DMS_DEFEND: DDoS Protection WAF_DEFEND: WAF BOT_MANAGE: Bot Management API_DEFEND: API Security INTELLIGENCE: Threat Intelligence RATE_LIMIT: Rate Limiting CUSTOMIZE_RULE: Custom Rules
valueLong
Number of policy requests of this type.

エラーコード

エラーコード(code)説明(message)HTTPステータスコード意味
40010Request parameter error.200Request parameter error.
500Server error.200Server 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/v1/overview/trendInfo" \
-X "POST" \
-u "$username:$password" \
-H "Date: $date" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
    "startTime": "2023-08-16 14:16:17",
    "endTime": "2023-08-16 14:20:17",
    "actType": ["mitigated", "monitored"],
    "domains": [
        "waap.example1.com",
        "waap.example2.com"
    ]
}'
レスポンス例
コピー コピー完了
{
    "code": 200,
    "msg": "Success",
    "data": [
        {
            "timePoint": "2023-08-16 14:17:00",
            "total": 0,
            "attack": 0,
            "mitigated": 0,
            "monitored": 0,
            "whitelist": 0,
            "distribution": [
                {
                    "code": "DMS_DEFEND",
                    "value": 0
                },
                {
                    "code": "BOT_MANAGE",
                    "value": 0
                },
                {
                    "code": "WAF_DEFEND",
                    "value": 0
                },
                {
                    "code": "API_DEFEND",
                    "value": 0
                },
                {
                    "code": "INTELLIGENCE",
                    "value": 0
                },
                {
                    "code": "RATE_LIMIT",
                    "value": 0
                },
                {
                    "code": "CUSTOMIZE_RULE",
                    "value": 0
                },
                {
                    "code": "BLOCK",
                    "value": 0
                }
            ]
        },
        {
            "timePoint": "2023-08-16 14:18:00",
            "total": 0,
            "attack": 0,
            "mitigated": 0,
            "monitored": 0,
            "whitelist": 0,
            "distribution": [
                {
                    "code": "DMS_DEFEND",
                    "value": 0
                },
                {
                    "code": "BOT_MANAGE",
                    "value": 0
                },
                {
                    "code": "WAF_DEFEND",
                    "value": 0
                },
                {
                    "code": "API_DEFEND",
                    "value": 0
                },
                {
                    "code": "INTELLIGENCE",
                    "value": 0
                },
                {
                    "code": "RATE_LIMIT",
                    "value": 0
                },
                {
                    "code": "CUSTOMIZE_RULE",
                    "value": 0
                },
                {
                    "code": "BLOCK",
                    "value": 0
                }
            ]
        },
        {
            "timePoint": "2023-08-16 14:19:00",
            "total": 0,
            "attack": 0,
            "mitigated": 0,
            "monitored": 0,
            "whitelist": 0,
            "distribution": [
                {
                    "code": "DMS_DEFEND",
                    "value": 0
                },
                {
                    "code": "BOT_MANAGE",
                    "value": 0
                },
                {
                    "code": "WAF_DEFEND",
                    "value": 0
                },
                {
                    "code": "API_DEFEND",
                    "value": 0
                },
                {
                    "code": "INTELLIGENCE",
                    "value": 0
                },
                {
                    "code": "RATE_LIMIT",
                    "value": 0
                },
                {
                    "code": "CUSTOMIZE_RULE",
                    "value": 0
                },
                {
                    "code": "BLOCK",
                    "value": 0
                }
            ]
        },
        {
            "timePoint": "2023-08-16 14:20:00",
            "total": 0,
            "attack": 0,
            "mitigated": 0,
            "monitored": 0,
            "whitelist": 0,
            "distribution": [
                {
                    "code": "DMS_DEFEND",
                    "value": 0
                },
                {
                    "code": "BOT_MANAGE",
                    "value": 0
                },
                {
                    "code": "WAF_DEFEND",
                    "value": 0
                },
                {
                    "code": "API_DEFEND",
                    "value": 0
                },
                {
                    "code": "INTELLIGENCE",
                    "value": 0
                },
                {
                    "code": "RATE_LIMIT",
                    "value": 0
                },
                {
                    "code": "CUSTOMIZE_RULE",
                    "value": 0
                },
                {
                    "code": "BLOCK",
                    "value": 0
                }
            ]
        },
        {
            "timePoint": "2023-08-16 14:20:17",
            "total": 0,
            "attack": 0,
            "mitigated": 0,
            "monitored": 0,
            "whitelist": 0,
            "distribution": [
                {
                    "code": "DMS_DEFEND",
                    "value": 0
                },
                {
                    "code": "BOT_MANAGE",
                    "value": 0
                },
                {
                    "code": "WAF_DEFEND",
                    "value": 0
                },
                {
                    "code": "API_DEFEND",
                    "value": 0
                },
                {
                    "code": "INTELLIGENCE",
                    "value": 0
                },
                {
                    "code": "RATE_LIMIT",
                    "value": 0
                },
                {
                    "code": "CUSTOMIZE_RULE",
                    "value": 0
                },
                {
                    "code": "BLOCK",
                    "value": 0
                }
            ]
        }
    ]
}