This API method fetches information on all existing graphs for a geohost

Request

GET /statistics/geohost/geohost_name HTTP/1.0
Host: api.gslb.me
Accept: encoding_type
Authorization: Basic base64_credentials

Where:

  • geohost_name is the name of the geohost you want to get statistics for (ie.: geo.mydomain.com)
  • base64_credentials is username:password in base64-encoded format (HTTP Basic Authentication)
  • encoding_type is either application/xml or application/json (if the “Accept” header is omitted, response will be JSON-encoded)

Sample requests:

  • Raw request:
GET /statistics/geohost/geo.mydomain.com HTTP/1.0
Host: api.gslb.me 
Accept: application/json
Authorization: Basic dGVzdHVzZXJAZ3NsYi5tZTp0ZXN0cGFzc3dvcmQK
  • Using curl:
curl -u testuser@gslb.me:testpassword -H "Accept: application/json" -k https://api.gslb.me/statistics/geohost/geo.mydomain.com

Response

  • In case of invalid geohost:
HTTP/1.1 404 Not Found
Content-Type: application/json

{"message":"Geohost not found","returncode":"2"}
  • In case of internal error:
HTTP/1.1 500 Server Error
Content-Type: application/json

{"message":"Internal error, please contact support@gslb.me","returncode":"4"}
  • In case of success:
HTTP/1.1 200 OK
Content-Type: application/json

{
  "byASN":
    {
      "asn":
      [
        { "isp":"VODAFONE-IT-ASN","name":"AS30722","percentageRequests":"9.76%","totalRequests":"4"},
        [...]
        {"isp":"Pixel LLC","name":"AS51259","percentageRequests":"2.44%","totalRequests":"1"}
      ]
    },
  "byCountry":
  {
    "country":[
      {"name":"Italy","percentageRequests":"19.51%","totalRequests":"8"},
      {"name":"United States","percentageRequests":"14.63%","totalRequests":"6"},
      [...]
      {"name":"Australia","percentageRequests":"7.32%","totalRequests":"3"}
    ]
  },
  "byISP":
  {
    "isp":[
      {"name":"Vodafone Omnitel B.V.","percentageRequests":"9.76%","totalRequests":"4"},
      {"name":"Pixel LLC","percentageRequests":"2.44%","totalRequests":"1"},
      [...]
      {"name":"Telstra Global","percentageRequests":"2.44%","totalRequests":"1"}
    ]
  },
  "byTarget":
  {
    "target":[
      {"address":"host1.mydomain.com","alias":"","percentageResponses":"55.00%","totalResponses":"11"},
      [...]
      {"address":"host99.mydomain.com","alias":"","percentageResponses":"20.00%","totalResponses":"4"}
    ]
  },
  "geohostName":"geo.mydomain.com",
  "totalRequests":"41"
}