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

Request

GET /reporting/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 graphs information¬† 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 /reporting/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/reporting/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

{
  "graph":
  [ 
    { 
      "parameters":
      [ 
        {"value":"true","typeTag":"analytics.graph.cactistyle","typeId":"4010","id":"5994","description":"Display current, maximum and minimum values"}, 
        [...]
        {"value": "-1","typeTag":"analytics.graph.color.background","typeId":"4022","id":"5995","description":"Background color"}
      ],
      "beanGeohostGraph": {"name":"Stats for cdn.gslb.info","id":"63","geohostid":"144"} 
    }
  ]
}


Where:

  • graph is an array containing all graph definitions for the requested geohost. Each graph object contains a parameters array and a beanGeohostGraph object
  • parameters is an array containing all variables for the given graph
  • beanGeohostGraph is an object containing:
  • name: the descriptive name for the graph
  • id: the graph id, to be used in the get geohost’s graph API call
  • geohostid: the internal geohost id