I'm using TSI rest API to get aggregation data, when I request data for multiple months with interval of one month ("P1M"), it returns data with inconsistent plotting. Below is my request and response,
Request
{
"aggregateSeries": {
"interval": "P1M",
"searchSpan": {
"from": "2020-11-01T00:00:00Z",
"to": "2020-12-31T23:59:59.999Z"
},
"timeSeriesId": [
"MyTSIId"
],
"projectedVariables": [
"ResultSet"
],
"inlineVariables": {
"ResultSet": {
"kind": "numeric",
"value": {
"tsx": "$event.MyData.Double"
},
"filter": null,
"interpolation": null,
"aggregation": {
"tsx": "avg($value)"
},
"categories": null,
"defaultCategory": null
}
}
}
}
Response
{
"timestamps": [
"2020-10-03T00:00:00Z",
"2020-11-02T00:00:00Z",
"2020-12-02T00:00:00Z"
],
"properties": [
{
"values": [
null,
2.8,
null
],
"name": "ResultSet",
"type": "Double"
}
],
"progress": 100.0
}
If you look at TSI response it returns 3 records where as I requested data for only 2 months, also plotting of months starts from random date, it's not plotting either starts of month and also not based on from date in searchSpan.
+-----------------------------------------------------+
| TSI Response Plotting | Expected Response Plotting |
+-----------------------------------------------------+
| "2020-10-03T00:00:00Z" | "2020-11-01T00:00:00Z" |
| "2020-11-02T00:00:00Z" | "2020-12-01T00:00:00Z" |
| "2020-12-02T00:00:00Z" | |
+-----------------------------------------------------+
Is it possible to get expected response from TSI, or is there any workaround, any help is appreciated.