GET
/
waap
/
v1
/
domains
/
{domain_id}
/
stats
import os
from datetime import datetime
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
waap_event_statistics = client.waap.domains.analytics.get_event_statistics(
    domain_id=0,
    start=datetime.fromisoformat("2019-12-27T18:11:19.117"),
)
print(waap_event_statistics.blocked)
{
  "count": {
    "action": [
      [
        "<string>"
      ]
    ],
    "country": [
      [
        "<string>"
      ]
    ],
    "org": [
      [
        "<string>"
      ]
    ],
    "rule_name": [
      [
        "<string>"
      ]
    ]
  },
  "blocked": {
    "action": [
      [
        "<string>"
      ]
    ],
    "country": [
      [
        "<string>"
      ]
    ],
    "org": [
      [
        "<string>"
      ]
    ],
    "rule_name": [
      [
        "<string>"
      ]
    ]
  }
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

domain_id
integer
required

The domain ID

Query Parameters

start
string
required

Filter traffic starting from a specified date in ISO 8601 format

end
string

Filter traffic up to a specified end date in ISO 8601 format. If not provided, defaults to the current date and time.

ip
string[] | null

A list of IPs to filter event statistics.

reference_id
string[] | null

A list of reference IDs to filter event statistics.

action
enum<string>[] | null

A list of action names to filter on.

result
enum<string>[] | null

A list of results to filter event statistics.

Response

200
application/json

Successful Response

A collection of event metrics over a time span