GET
/
dns
/
v2
/
zones
/
{name}
/
statistics
Python
from gcore import Gcore

client = Gcore(
    api_key="My API Key",
)
response = client.dns.zones.get_statistics(
    name="name",
)
print(response.requests)
{
  "requests": {},
  "total": 123
}

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

name
string
required

Zone name. Use all to get statistics for all zones.

Query Parameters

from
integer

Beginning of the requested time period (Unix Timestamp, UTC.) In a query string: &from=1709068637

to
integer

End of the requested time period (Unix Timestamp, UTC.) In a query string: &to=1709673437

record_type
string

DNS record type. Possible values: * A * AAAA * NS * CNAME * MX * TXT * SVCB * HTTPS

granularity
string

Granularity parameter string is a sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "1.5h" or "2h45m". Valid time units are "s", "m", "h".

Response

200
application/json

StatisticsZoneResponse