Skip to content

Latest commit

 

History

History
163 lines (158 loc) · 2.68 KB

API_doc.md

File metadata and controls

163 lines (158 loc) · 2.68 KB

API Documentation

Beaker.MetricsApiController

Beaker.MetricsApiController.aggregated

GET /api/aggregated

Request
  • Method: GET
  • Path: /api/aggregated
  • Request headers:
accepts: application/json
  • Request body:
{
  "aspect": "body_params"
}
Response
  • Status: 200
  • Response headers:
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
  • Response body:
{
  "time_series3": [
    {
      "time": 1455512340000,
      "min": 30,
      "max": 30,
      "count": 1,
      "average": 30.0
    }
  ],
  "time_series2": [
    {
      "time": 1455512340000,
      "min": 20,
      "max": 20,
      "count": 1,
      "average": 20.0
    }
  ],
  "time_series1": [
    {
      "time": 1455512340000,
      "min": 10,
      "max": 10,
      "count": 1,
      "average": 10.0
    }
  ]
}

Beaker.MetricsApiController.counters

GET /api/counters

Request
  • Method: GET
  • Path: /api/counters
  • Request headers:
accepts: application/json
  • Request body:
{
  "aspect": "body_params"
}
Response
  • Status: 200
  • Response headers:
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
  • Response body:
[
  {
    "value": 1,
    "name": "api_counter"
  }
]

Beaker.MetricsApiController.gauges

GET /api/gauges

Request
  • Method: GET
  • Path: /api/gauges
  • Request headers:
accepts: application/json
  • Request body:
{
  "aspect": "body_params"
}
Response
  • Status: 200
  • Response headers:
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
  • Response body:
{
  "api_gauge": {
    "value": 100,
    "name": "api_gauge",
    "min": 0,
    "max": 100
  }
}

Beaker.MetricsApiController.time_series

GET /api/time_series

Request
  • Method: GET
  • Path: /api/time_series
  • Request headers:
accepts: application/json
  • Request body:
{
  "aspect": "body_params"
}
Response
  • Status: 200
  • Response headers:
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
  • Response body:
{
  "api_time_series": [
    {
      "value": 42,
      "time": 1455512392276
    }
  ]
}