-
Notifications
You must be signed in to change notification settings - Fork 102
v1.0 endpoints
stackedsax edited this page Dec 30, 2015
·
1 revision
Single tenant data. The payload should an array of metrics. Each metric object should contain the following fields:
-
collectionTime
: long integer. milliseconds since epoch. -
ttlInSeconds
: long integer. number of seconds before full-resolution data expires from the database. This can be overridden by configuration, causing this value to be ignored. -
metricValue
: numeric. metric value. -
metricName
: string. unique name of metric. Treat this as a primary key.
Example:
[
{
"collectionTime": 1376509892612,
"ttlInSeconds": 172800,
"metricValue": 66,
"metricName": "example.metric.one"
},
{
"collectionTime": 1376509892612,
"ttlInSeconds": 172800,
"metricValue": 66,
"metricName": "example.metric.two"
},
{
"collectionTime": 1376509892612,
"ttlInSeconds": 172800,
"metricValue": 66,
"metricName": "example.metric.three"
}
]
GET /v1.0/:tenantId/experimental/views/metric_data/:metricName?from=:timestamp&to=:timestamp&points=:integer
Returns single tenant data in full-resolution or rolled up form.
The following query parameters are honored:
-
from
: long integer. milliseconds since epoch of when to start querying for data. - `to': long integer. milliseconds since epoch (end-inclusive) of when to stop querying for data.
-
points
: ([optional) long integer. number of desired points to return. This can impact the resolution of the data returned. -
resolution
: (optional) string { FULL | MIN5 | MIN60 | MIN240 | MIN1440 }. Forces query to be pegged to a specific resolution. Using this in your query causes thepoints
value to be ignored.
Example rollup output:
{
"values": [
{
"numPoints": 1,
"timestamp": 1376509892612,
"average": 66
}
],
"metadata": {
"limit": null,
"next_href": null,
"count": 1,
"marker": null
}
}
Example full resolution output:
todo.