• Web Application Firewall

waf
  1. Help Center
  2. Web Application Firewall
  3. API Reference
  4. APIs
  5. Event Logs
  6. Querying the Total Number of Attacks

Querying the Total Number of Attacks

Function Description

This API is used to query the total number of attacks.

URI

  • URI format

    GET /v1/{project_id}/waf/event/attack/num?from={from}&to={to}&hosts={hostids}

  • Parameter description
    Table 1 Path parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Specifies the project ID.

    from

    Yes

    String

    Specifies the start time (UTC) in milliseconds. For example, 1548172800000.

    to

    Yes

    String

    Specifies the end time (UTC) in milliseconds. For example, 1548431999000.

    hosts

    No

    Array

    Specifies the domain IDs.

Request

Request parameters

None

Response

Response parameters

Table 2 Parameter description

Parameter

Type

Description

attack_num

Integer

Specifies the total number of attacks.

Example

Response example
{
  "attack_num":  150
}

Status Code

Table 3 describes the normal status code returned by the API.
Table 3 Status code

Status Code

Description

Meaning

200

OK

The request has succeeded.

For details about error status codes, see Status Codes.