Retrieve timeseries data on hourly avergage

Harish 26 Reputation points
2020-11-23T12:12:55.43+00:00

I am calling this api https://test.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31 to retrieve the series of data and the body is provided below

{
"getSeries": {
"timeSeriesId": [
"<testtimeseriesid>"
],
"searchSpan": {
"from": "2020-08-01T00:00:00Z",
"to": "2020-11-23T00:16:50Z"
}
,
"filter": null,
"inlineVariables": {
"temperatures": {
"kind": "numeric",
"value": {
"tsx": "$event.temperature"
},
"filter": null,
"aggregation": {
"tsx": "avg($value)"
}
}
},
"projectedVariables": [
"temperatures"
]
}
}

Above query returns the data but not in hourly aggregated format. How can I retrieve the average hourly data from timeseries insights?

Azure Time Series Insights
Azure Time Series Insights
An Azure internet of things (IoT) analytics platform to monitor, analyze, and visualize industrial IoT analytics data at scale.
78 questions
0 comments No comments
{count} votes

Accepted answer
  1. António Sérgio Azevedo 7,666 Reputation points Microsoft Employee
    2020-11-23T16:20:06.197+00:00

    Hello @Harish did you check the following doc: Time Series Query (TSQ) APIs ?

    "Aggregate Series API: Enables query and retrieval of aggregated values and the associated interval timestamps by applying calculations defined by variables on raw events. These variables can be defined in either the Time Series Model or provided inline in the query. This API supports pagination to retrieve the complete response dataset for the selected input."

    Thank you.


0 additional answers

Sort by: Most helpful