POST: /write

Used for writing data into heroic directly.

application/json

Structure
Field Type Purpose
series  required Series Time series to write data to.
data  required MetricCollection Collection of metrics to write.

Example Request


          {
  "series": {"key": "foo", "tags": {"site": "lon", "host": "www.example.com"}},
  "data": {"type": "points", "data": [[1300000000000, 42.0], [1300001000000, 84.0]]}
}

      

Example Curl


          $ curl -XPOST -H "Content-Type: application/json" http://localhost:8080/write \
          -d '{ "series": {"key": "foo", "tags": {"site": "lon", "host": "www.example.com"}}, "data": {"type": "points", "data": [[1300000000000, 42.0], [1300001000000, 84.0]]} }'
      

Example 200 Response

Status: 200, Content-Type: application/json

Structure
Field Type Purpose
errors  [RequestError, ...] Potential errors returned either from different shards or for specific time series. The presence of an error does not cause the entire query to fail, instead it is up to the client to use this information to decide if the response is reliable enough.
times  [<number>, ...] Timing information for the write. Each entry indicates the amount of time it took a shard to perform the write, in nanoseconds.

          {
    "errors": [],
    "times": [15603449,1383935,1389086,1393517,1408274]
}