Querying for data
There are various ways to get data out of EpochFlow
Export
Using the export tool
[GET] /api/sets/{set_id}/data
Returns the time series data points for a collection of tags at a specific resolution within a set time frame
Example request:
[Get] /api/sets/{set_id}/data?start=1708002000&end=1708004000&resolution=hour&aggregation=sum
Query parameters:
- start: query for data points after this unix timestamp
- end: query for data points before this unix timestamp
- resolution: the sample frequency [second, minute, hour, day]
- aggregation: how should the data points be aggregate [sum, average, min, max, count]
Example response:
[
{
"tag": "all",
"data_points": [
[1708002000, 1],
[1708002060, 2.3],
[1708002120, 4.6]
]
},
{
"tag": "/index",
"data_points": [
[1708002000, 1],
[1708002060, 2.3]
]
}
]
[GET] /api/sets/{set_id}/data/latest
Returns the most recent datapoint for a set
[GET] /api/sets/{set_id}/data/total
Returns an overview for each tag within a set
[GET] /api/sets/{set_id}/data/analytics
Returns the analytics data for a group of tags in a given time frame