Docs
Included on this page are the most popular API methods, our full swagger documentation can be found here: API Documentation
Data Query REST API
Get time-series data keys
http(s)://v1.sensables.io/api/plugins/telemetry/DEVICE/{entityId}/keys/timeseries
curl -v -X GET http://v1.sensables.io/api/plugins/telemetry/DEVICE/{entityId}/keys/timeseries \ --header "Content-Type:application/json" \ --header "X-Authorization: $JWT_TOKEN"
Get latest time-series data values
http(s)://v1.sensables.io/api/plugins/telemetry/DEVICE/{entityId}/values/timeseries?keys=key1,key2,key3
curl -v -X GET http://v1.sensables.io/api/plugins/telemetry/DEVICE/ac8e6020-ae99-11e6-b9bd-2b15845ada4e/values/timeseries?keys=gas,temperature \ --header "Content-Type:application/json" \ --header "X-Authorization: $JWT_TOKEN"
Get historical time-series data values
http(s)://v1.sensables.io/api/plugins/telemetry/DEVICE/{entityId}/values/timeseries?keys=key1,key2,key3&startTs=1479735870785&endTs=1479735871858&interval=60000&limit=100&agg=AVG
The supported parameters are described below:
- keys - comma-separated list of telemetry keys to fetch.
- startTs - Unix timestamp that identifies the start of the interval in milliseconds.
- endTs - Unix timestamp that identifies the end of the interval in milliseconds.
- interval - the aggregation interval, in milliseconds.
- agg - the aggregation function. One of MIN, MAX, AVG, SUM, COUNT, NONE.
- limit - the max amount of data points to return or intervals to process.
IAQ will use startTs, endTs, and interval to identify aggregation partitions or sub-queries.
curl -v -X GET "http://v1.sensables.io/api/plugins/telemetry/DEVICE/ac8e6020-ae99-11e6-b9bd-2b15845ada4e/values/timeseries?keys=gas,temperature&startTs=1479735870785&endTs=1479735871858&interval=60000&limit=100&agg=AVG" \ --header "Content-Type:application/json" \ --header "X-Authorization: $JWT_TOKEN"