Skip to content
pierre edited this page Mar 12, 2012 · 2 revisions

Collector

/rest/1.0

Query the datastore (both in-memory and persisted) for hosts and/or sample kinds.

GET /rest/1.0/hosts

  • On success: Return a JSON array of all hosts, e.g.: ["hostA.company.com","hostB.company.com"]
  • On error: Return Error 503 Service Unavailable if the database is not available. The exception is in the Warning header.
  • Query parameters: pretty: true or false (default), enables JSON pretty-printing

GET /rest/1.0/sample_kinds

  • On success: Return a JSON array of all sample types, e.g.: ["min_heapUsed","max_heapUsed"]
  • On error: Return Error 503 Service Unavailable if the database is not available. The exception is in the Warning header.
  • Query parameters: pretty: true or false (default), enables JSON pretty-printing

GET /rest/1.0/{host}

  • On success: Return a JSON array of all samples for this host, e.g.: [ "{\"sampleKind\":\"min_heapUsed\",\"samples\":\"1330665650,1.0657515698888E13\"}", "{\"sampleKind\":\"max_heapUsed\",\"samples\":\"1330665650,2.0768835511784E13\"}" ] The samples value is a timeline representation of the samples, i.e. "t1,v1,t2,v2,t3,v3" where ti are the Unix timestamps and vi the associated values.
  • On error: Return Error 503 Service Unavailable if the database is not available. The exception is in the Warning header.
  • Query parameters: pretty: true or false (default), enables JSON pretty-printing, from: timestamp (default epoch), start time for the samples, to: timestamp (default now), end time for the samples. Note that the from and to are not guaranteed (i.e. the endpoint does its best to honor them but the caller needs to narrow further on some occasion).

GET /rest/1.0/{sample_kind}

  • On success: Return a JSON array of all samples for this host and sample type, e.g.: [ "{\"sampleKind\":\"min_heapUsed\",\"samples\":\"1330665650,1.0657515698888E13\"}", "{\"sampleKind\":\"min_heapUsed\",\"samples\":\"1330665650,2.0768835511784E13\"}" ] The samples value is a timeline representation of the samples, i.e. "t1,v1,t2,v2,t3,v3" where ti are the Unix timestamps and vi the associated values.
  • On error: Return Error 503 Service Unavailable if the database is not available. The exception is in the Warning header.
  • Query parameters: pretty: true or false (default), enables JSON pretty-printing, from: timestamp (default epoch), start time for the samples, to: timestamp (default now), end time for the samples. Note that the from and to are not guaranteed (i.e. the endpoint does its best to honor them but they caller needs to narrow further on some occasion).

Clone this wiki locally