QueryEventTrend

Update time: 2025-09-04 15:54:37

Query traffic trend (by request count).

  • Limit Description: The time range can not exceed 31 days.
  • Limit of request rate per user: 300/5min
  • Applicable Products: Cloud Security 2.0,Flood Shield 2.0
For API authentication details, please refer to: API Authentication Overview

Request

Request Header

NameDescription
serviceTypeString
Optional Value: Parameter Values

Security service type. Please enter a specific service type, if you purchase multiple security services.

timezoneString
Default value: 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 Params

NameDescription
*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
Optional Value: 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.

Response

Body Params

NameDescription
codeString
Optional Value: Parameter Values

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
Optional Value: 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.

Error code

Error code(code)Description(message)HTTP statusSemantic
40010

Request parameter error.

200Request parameter error.
500

Server error.

200Server error.

Example

JSON
JSON
Request example
Copy Copy success
#!/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"
    ]
}'
Response example
Copy Copy success
{
    "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
                }
            ]
        }
    ]
}
Is the content of this document helpful to you?
Yes
I have suggestion
Submitted successfully! Thank you very much for your feedback, we will continue to strive to do better!