GET
/
waap
/
v1
/
domains
/
{domain_id}
/
traffic
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_traffic_metrics = client.waap.domains.analytics.list_event_traffic(
    domain_id=0,
    resolution="daily",
    start=datetime.fromisoformat("2019-12-27T18:11:19.117"),
)
print(waap_traffic_metrics)
[
  {
    "timestamp": 123,
    "ajax": 0,
    "api": 0,
    "ddosBlocked": 0,
    "origin2xx": 0,
    "origin3xx": 0,
    "originError4xx": 0,
    "originError5xx": 0,
    "monitored": 0,
    "uncategorized": 0,
    "static": 0,
    "responseTime": 0,
    "originTimeout": 0,
    "customAllowed": 0,
    "total": 0,
    "passedToOrigin": 0,
    "customBlocked": 0,
    "policyAllowed": 0,
    "policyBlocked": 0
  }
]

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

resolution
enum<string>
required

Specifies the granularity of the result data.

Available options:
daily,
hourly,
minutely
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.

Response

200
application/json

Successful Response

The response is of type TrafficMetrics · object[].