Statistics REST calls.

Base URL https://api.gslb.me/2.0. All requests require HTTP Basic authentication; set Accept to application/json or application/xml. Try these calls in the Postman collection.

Get zone statistics

GEThttps://api.gslb.me/2.0/statistics/zone/{zone_name}

Retrieves zone usage statistics

Path parameters

ParameterExampleDescription
{zone_name}mydomain.comName of the zone (domain)

Example request

cURL
curl -u "username@mydomain.com:your-password" \
  -X GET "https://api.gslb.me/2.0/statistics/zone/mydomain.com" \
  -H "Accept: application/json"
Python
import requests

r = requests.get(
    "https://api.gslb.me/2.0/statistics/zone/mydomain.com",
    auth=("username@mydomain.com", "your-password"),
    headers={"Accept": "application/json"},
)
print(r.status_code, r.json())
JavaScript
const res = await fetch("https://api.gslb.me/2.0/statistics/zone/mydomain.com", {
  method: "GET",
  headers: {
    "Authorization": "Basic " + btoa("username@mydomain.com:your-password"),
    "Accept": "application/json"
  }
});
console.log(res.status, await res.json());

Get geohost statistics

GEThttps://api.gslb.me/2.0/statistics/geohost/{geohost_name}.{zone_name}

Retrieves geohost usage statistics

Path parameters

ParameterExampleDescription
{geohost_name}mygeohostName of the geohost, without the zone (the geohost FQDN is geohost_name.zone_name)
{zone_name}mydomain.comName of the zone (domain)

Example request

cURL
curl -u "username@mydomain.com:your-password" \
  -X GET "https://api.gslb.me/2.0/statistics/geohost/mygeohost.mydomain.com" \
  -H "Accept: application/json"
Python
import requests

r = requests.get(
    "https://api.gslb.me/2.0/statistics/geohost/mygeohost.mydomain.com",
    auth=("username@mydomain.com", "your-password"),
    headers={"Accept": "application/json"},
)
print(r.status_code, r.json())
JavaScript
const res = await fetch("https://api.gslb.me/2.0/statistics/geohost/mygeohost.mydomain.com", {
  method: "GET",
  headers: {
    "Authorization": "Basic " + btoa("username@mydomain.com:your-password"),
    "Accept": "application/json"
  }
});
console.log(res.status, await res.json());