This API method fetches information on all existing graphs for a geohost
Request
GET /statistics/zone/zone_name HTTP/1.0 Host: api.gslb.me Accept: encoding_type Authorization: Basic base64_credentials
Where:
- zone_name is the name of the zone you want to get graphs information for (ie.: 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/zone/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/zone/mydomain.com
Response
- In case of invalid zone:
HTTP/1.1 404 Not Found Content-Type: application/json {"message":"Zone 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 { "rrsets": [ { "recordName": "www", "recordTypes": [ { "recordType": "AAAA", "totalRequests": "2425" }, { "recordType": "MX", "totalRequests": "379" }, { "recordType": "A", "totalRequests": "11033" }, { "recordType": "NS", "totalRequests": "13" }, { "recordType": "TXT", "totalRequests": "53" } ] }, [...] ] }