Help Center/ Edge Security/ API Reference/ API/ DDoS Statistics/ Querying the Timeline Data of DDoS Attack Statistics
Updated on 2026-09-16 GMT+08:00

Querying the Timeline Data of DDoS Attack Statistics

Function

This API is used to query the timeline data of DDoS attack statistics.

URI

GET /v1/edgesec/stat/ddos-attack-timelines

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

No

String

Obtain the enterprise project ID by calling the ListEnterpriseProject API of Enterprise Project Management Service (EPS). The default value is 0.

stat_type

Yes

String

Type of the security statistics metric. Currently, bw and pps are supported.

group_by

Yes

String

bw corresponds to max_bps and avg_bps, and pps corresponds to max_pps and avg_pps.

start_time

Yes

Long

Start time

end_time

Yes

Long

End time

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

stat_type

String

Metric type

group_by

String

Group type

interval

Integer

Time granularity (s)

values

Array of TimeStatItem objects

Value array

Table 4 TimeStatItem

Parameter

Type

Description

key

Long

Timestamp, which is left aligned with the time granularity. For example, if the time granularity is 5 minutes and the time range is [19:10,19:15), the timestamp is 19:10.

value

Long

Number of attack requests

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error description

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error description

Status code: 500

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error description

Example Requests

  • Query the statistical timeline data of DDoS attack peak bandwidth

    GET https://esa.cn-north-4.myhuaweicloud.com/v1/edgesec/stat/ddos-attack-timelines?enterprise_project_id=0&start_time=1731427200000&end_time=1731427500000&stat_type=bw&group_by=max_bps
  • Query the DDoS attack average bandwidth statistical timeline data

    GET https://esa.cn-north-4.myhuaweicloud.com/v1/edgesec/stat/ddos-attack-timelines?enterprise_project_id=0&start_time=1731427200000&end_time=1731427500000&stat_type=bw&group_by=avg_bps
  • Query the statistical timeline data of DDoS attack peak transmission packet rat

    GET https://esa.cn-north-4.myhuaweicloud.com/v1/edgesec/stat/ddos-attack-timelines?enterprise_project_id=0&start_time=1731427200000&end_time=1731427500000&stat_type=pps&group_by=max_pps
  • Query the statistical timeline data of average packet transmission rate for DDoS attacks

    GET https://esa.cn-north-4.myhuaweicloud.com/v1/edgesec/stat/ddos-attack-timelines?enterprise_project_id=0&start_time=1731427200000&end_time=1731427500000&stat_type=pps&group_by=avg_pps

Example Responses

Status code: 200

  • Query the statistical timeline data of DDoS attack peak bandwidth

    [ {
      "stat_type" : "bw",
      "group_by" : "max_bps",
      "interval" : 60,
      "values" : [ {
        "key" : 1731427200000,
        "value" : 100
      }, {
        "key" : 1731427260000,
        "value" : 100
      }, {
        "key" : 1731427320000,
        "value" : 100
      }, {
        "key" : 1731427380000,
        "value" : 100
      }, {
        "key" : 1731427440000,
        "value" : 100
      } ]
    } ]
  • Query the DDoS attack average bandwidth statistical timeline data

    [ {
      "stat_type" : "bw",
      "group_by" : "avg_bps",
      "interval" : 60,
      "values" : [ {
        "key" : 1731427200000,
        "value" : 100
      }, {
        "key" : 1731427260000,
        "value" : 100
      }, {
        "key" : 1731427320000,
        "value" : 100
      }, {
        "key" : 1731427380000,
        "value" : 100
      }, {
        "key" : 1731427440000,
        "value" : 100
      } ]
    } ]
  • Query the statistical timeline data of DDoS attack peak transmission packet rate

    [ {
      "stat_type" : "pps",
      "group_by" : "max_pps",
      "interval" : 60,
      "values" : [ {
        "key" : 1731427200000,
        "value" : 100
      }, {
        "key" : 1731427260000,
        "value" : 100
      }, {
        "key" : 1731427320000,
        "value" : 100
      }, {
        "key" : 1731427380000,
        "value" : 100
      }, {
        "key" : 1731427440000,
        "value" : 100
      } ]
    } ]
  • Query the statistical timeline data of average packet transmission rate for DDoS attacks

    [ {
      "stat_type" : "pps",
      "group_by" : "avg_pps",
      "interval" : 60,
      "values" : [ {
        "key" : 1731427200000,
        "value" : 100
      }, {
        "key" : 1731427260000,
        "value" : 100
      }, {
        "key" : 1731427320000,
        "value" : 100
      }, {
        "key" : 1731427380000,
        "value" : 100
      }, {
        "key" : 1731427440000,
        "value" : 100
      } ]
    } ]

Status Codes

Status Code

Description

200

Request succeeded.

400

Request failed.

401

The token does not have required permissions.

500

Internal server error.

Error Codes

See Error Codes.