Getting time aligned error while calling GET IoT Time Series (TS) Aggregates Service API:-
Eg:-
Response:
{
"timestamp": "2020-10-07T07:43:08.052Z",
"status": 400,
"error": "Bad Request",
"message": "[6009] Start time[2019-10-31T22:00:00Z] is not interval aligned[2019-09-30T22:00:00Z].",
"path": "/api/iottimeseries/v3/aggregates/39defbf266404baeb7e602f22e7e429b/FF_EV"
}
Solution
Aggregate V3 API requires time alignment as per certain specific standards. If this standard is not followed customer can get such kind of issues.
The solution for this is to use IoT Time Series (TS) Aggregates Service Version 4.x API's which are intelligent to handle the time alignment problems. To be more specific the aggregate V4 API internally handles time alignment and gives the proper output to the customer.
The IoT Time Series (TS) Aggregates Service Version 4.x has the capability to handle time zone related requests and able to handle such an error:-
Notes