Reporting 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 geohost reporting graphs list

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

Retrieves the list of available reporting graphs for the geohost

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/reporting/mygeohost.mydomain.com" \
  -H "Accept: application/json"
Python
import requests

r = requests.get(
    "https://api.gslb.me/2.0/reporting/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/reporting/mygeohost.mydomain.com", {
  method: "GET",
  headers: {
    "Authorization": "Basic " + btoa("username@mydomain.com:your-password"),
    "Accept": "application/json"
  }
});
console.log(res.status, await res.json());

Example response

200 OK Get geohost reporting graphs list

{
  "graph": {
    "beanGeohostGraph": {
      "geohostid": "1017",
      "id": "783",
      "name": "sample graph"
    },
    "parameters": [
      {
        "description": "Display current, maximum and minimum values",
        "id": "39344",
        "typeId": "4010",
        "typeTag": "analytics.graph.cactistyle",
        "value": "false"
      },
      {
        "description": "Background color",
        "id": "39334",
        "typeId": "4022",
        "typeTag": "analytics.graph.color.background",
        "value": "-1"
      },
      "…"
    ]
  }
}

Get geohost reporting graph

GEThttps://api.gslb.me/2.0/reporting/{geohost_name}.{zone_name}/{reporting_graph_id}

Retrieves a geohost reporting graph in png format

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)
{reporting_graph_id}783Id of the reporting graph, as listed by Get geohost reporting graphs list

Example request

cURL
curl -u "username@mydomain.com:your-password" \
  -X GET "https://api.gslb.me/2.0/reporting/mygeohost.mydomain.com/783" \
  -o graph.png
Python
import requests

r = requests.get(
    "https://api.gslb.me/2.0/reporting/mygeohost.mydomain.com/783",
    auth=("username@mydomain.com", "your-password"),
)
open("graph.png", "wb").write(r.content)
print(r.status_code)
JavaScript
const res = await fetch("https://api.gslb.me/2.0/reporting/mygeohost.mydomain.com/783", {
  method: "GET",
  headers: {
    "Authorization": "Basic " + btoa("username@mydomain.com:your-password")
  }
});
const png = await res.blob();
console.log(res.status, png.size);

Response

The graph is returned as a PNG image.