Hey,
We encountered the same issue and resolved it by using the CalculateTrend endpoint. For the calculationTimeRange, we used the difference between the 'to' and 'from' timestamps in milliseconds. This solution worked for IIH 1.8.
Answer to my own question: you can use the CalculateTrend endpoint to get a response for the minimum that includes a timestamp. The key here is to set the calculationTimeRange to the length of the window = millisecondsBetween($to, $from).
E.g.
{
"from": "2024-05-29T15:00:00.000Z",
"to": "2024-05-29T16:00:00.000Z",
"calculationTimeRange": 3600000,
"dataSources": [
{
"id": "869907b49f344d66808596306348d1e6",
"type": "Variable",
"aggregation": "MinWithTimestamp"
}
]
}
to get a response:
[
{
"dataSource": {
"id": "869907b49f344d66808596306348d1e6",
"type": "Variable",
"aggregation": "MinWithTimestamp"
},
"values": [
{
"timestamp": "2024-05-29T15:37:42.8203380Z",
"value": 0
}
]
}
]
Make sure to use aggegation "MinWithTimestamp" as "Min" will on trend only returns the end of the time window as timestamp