Help Center/ Edge Security/ API Reference/ API/ Anti-DDoS Data Query/ Querying Attack Event Data of a Tenant
Updated on 2023-08-24 GMT+08:00

Querying Attack Event Data of a Tenant

Function

This API is used to query attack event data of a tenant.

URI

GET /v1/statistics/event

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

start_time

Yes

Long

Start time (13-digit timestamp). This parameter must be used together with end_time.

end_time

Yes

Long

End time (13-digit timestamp). This parameter must be used together with start_time.

type

Yes

String

Type:

  • attack_count (number of attack events of different types)

  • flow_drop_count (number of accesses and attacks)

  • ddos_attack_count (number of DDoS attacks)

Enumeration values:

  • attack_count

  • flow_drop_count

  • ddos_attack_count

enterprise_project_id

No

String

Obtain the enterprise project ID by calling the ListEnterpriseProject API of Enterprise Project Management Service (EPS).

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. It can be obtained by calling the IAM API (value of X-Subject-Token in the response header).

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

value

Long

Number of DDoS attacks. This parameter is returned when type is set to ddos_attack_count.

waf

Array of TimeSeriesData objects

Number of WAF attacks. This parameter is returned when type is set to attack_count.

bot

Array of TimeSeriesData objects

Number of bot attacks. This parameter is returned when type is set to attack_count.

cc

Array of TimeSeriesData objects

Number of CC attacks. This parameter is returned when type is set to attack_count.

ddos

Array of TimeSeriesData objects

Number of DDoS attacks. This parameter is returned when type is set to attack_count.

flow

Array of TimeSeriesData objects

Number of accesses. This parameter is returned when type is set to flow_drop_count.

drop

Array of TimeSeriesData objects

Number of attacks. This parameter is returned when type is set to flow_drop_count.

Table 4 TimeSeriesData

Parameter

Type

Description

time

Long

13-digit timestamp.

value

Double

Data value. Unit: kbit/s (for traffic query) or number of events (for event query)

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

Query DDoS attacks.

GET https://{Endpoint}/v1/statistics/event?type=ddos_attack_count&end_time=1691916827257&start_time=1691312027000

Example Responses

Status code: 200

Request succeeded.

{
  "value" : 100
}

Status Codes

Status Code

Description

200

Request succeeded.

400

Invalid request parameter.

401

The account corresponding to the token does not have sufficient permission.

500

Internal server error.

Error Codes

See Error Codes.