Field | Type | Description |
---|---|---|
data_source_id | string | Unique id of DataSource |
sensor_id | string | Unique id of Sensor |
start_time | integer | Start time for report (Unix Epoch format) |
end_time | integer | End time for report (Unix Epoch format) |
interval | string,optional | 15min , hour , or day (defaults to 15min if not specified) |
include_minute | boolean,optional | Annotate each record with the interval start minute-of-hour (0-59) |
include_hour | boolean,optional | Annotate each record with the interval start hour-of-day (0-23) |
include_dow | boolean,optional | Annotate each record with the interval start day-of-week (0-6) |
GET https://example-backend.siteworx.io/api/v1/aggregate_sensor_data?data_source_id=4Wkcm4CW8cJ&interval=day&interval_type=1&start_time=1560830400&end_time=1561089600
{
"data": [
{
"data_source_id": "4Wkcm4CW8cJ",
"data_type": 7,
"interval_start": 1538366400,
"max_adj_value": 609.5796934962273,
"max_value": 1451,
"mean_adj_value": 604.0453392913786,
"mean_value": 1443.7627118644068,
"min_adj_value": 601.1679935455322,
"min_value": 1440,
"sample_count": 59
},
{
"data_source_id": "4Wkcm4CW8cJ",
"data_type": 7,
"interval_start": 1538370000,
"max_adj_value": 606.5208935141563,
"max_value": 1447,
"mean_adj_value": 602.9954969246509,
"mean_value": 1442.3898305084747,
"min_adj_value": 600.4032935500145,
"min_value": 1439,
"sample_count": 59
},
"NOTE: 21 records removed...",
{
"data_source_id": "4Wkcm4CW8cJ",
"data_type": 7,
"interval_start": 1538449200,
"max_adj_value": 589.6974936127663,
"max_value": 1425,
"mean_adj_value": 586.0684088882754,
"mean_value": 1420.2542372881355,
"min_adj_value": 583.5798936486244,
"min_value": 1417,
"sample_count": 59
}
],
"meta": {
"count": 24
}
}