• Anti-DDoS

antiddos
  1. Help Center
  2. Anti-DDoS
  3. API Reference
  4. APIs of Anti-DDoS
  5. Querying Weekly Defense Statistics

Querying Weekly Defense Statistics

Functions

This API allows you to query weekly defense statistics about all your EIPs, including the number of intercepted DDoS attacks, number of attacks, and ranking by the number of attacks. Currently, you can query weekly statistics up to four weeks before the current time. Data older than four weeks cannot be queried.

URI

  • URI format

    GET /v1/{project_id}/antiddos/weekly

    NOTE:

    You can use ? and & behind the URI to add query conditions, as shown in the request example.

  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    A user's ID

Request

  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    period_start_date

    No

    String

    Start date of a seven-day period

  • Request example
    GET /v1/67641fe6886f43fcb78edbbf0ad0b99f/antiddos/weekly?period_start_date=1006510306

Response

  • Element description

    Name

    Type

    Description

    ddos_intercept_times

    Integer

    Number of DDoS attacks intercepted in a week

    weekdata

    Data structure

    Number of attacks in a week

    top10

    Data structure

    Top 10 attacked IP addresses

  • Data structure description of weekdata

    Parameter

    Mandatory

    Type

    Description

    ddos_intercept_times

    Yes

    Integer

    Number of DDoS attacks intercepted

    ddos_blackhole_times

    Yes

    Integer

    Number of DDoS blackholes

    max_attack_bps

    Yes

    Integer

    Maximum attack traffic

    max_attack_conns

    Yes

    Integer

    Maximum number of attack connections

    period_start_date

    Yes

    Long integer

    Start date

  • Data structure description of top10

    Parameter

    Mandatory

    Type

    Description

    floating_ip_address

    Yes

    String

    EIP

    times

    Yes

    Integer

    Number of DDoS attacks intercepted, including cleaning operations and blackholes

  • Response example
    {
       "ddos_intercept_times": 23,
       "weekdata": [
          {
             "ddos_intercept_times": 0,
             "ddos_blackhole_times": 0,
             "max_attack_bps": 0,
             "max_attack_conns": 0,
             "period_start_date": 1474214461651
          },
          {
             "ddos_intercept_times": 0,
             "ddos_blackhole_times": 0,
             "max_attack_bps": 0,
             "max_attack_conns": 0,
             "period_start_date": 1474300861651
          },
          {
             "ddos_intercept_times": 0,
             "ddos_blackhole_times": 0,
             "max_attack_bps": 0,
             "max_attack_conns": 0,
             "period_start_date": 1474387261651
          },
          {
             "ddos_intercept_times": 0,
             "ddos_blackhole_times": 0,
             "max_attack_bps": 0,
             "max_attack_conns": 0,
             "period_start_date": 1474473661651
          },
          {
             "ddos_intercept_times": 0,
             "ddos_blackhole_times": 0,
             "max_attack_bps": 0,
             "max_attack_conns": 0,
             "period_start_date": 1474560061651
          },
          {
             "ddos_intercept_times": 2,
             "ddos_blackhole_times": 0,
             "max_attack_bps": 16375,
             "max_attack_conns": 0,
             "period_start_date": 1474646461651
          },
          {
             "ddos_intercept_times": 1,
             "ddos_blackhole_times": 0,
             "max_attack_bps": 0,
             "max_attack_conns": 0,
             "period_start_date": 1474732861651
          }
       ],
       "top10": [
          {
             "floating_ip_address": "192.168.44.69",
             "times": 23
          }
       ]
    }

Returned Value

See Common Returned Values.