How to pass date range in Performance API, For getting 24 hours performance data?

Hi All,
I want to get 24 hours performance from performance API .But we are passing dateFrom and dateTo in performance API, Cumolocity add automatically +5:30. then we did not get 24 hours performance.
Please tell me how to give payloads for 24 hours performance data and my local Time zone will be anything (IST, Est, etc…).
Thanks

Hi Mishra,

I’m not sure if I understood your query correctly. Please correct my assumptions below.
I assume you want to retrieve measurements from the measurements API for 24h and using the dateFrom + dateTo URL-Parameter. Your result is wrong because a time zone is added either to measurements or to your query (and most likely does not match) so you get strange results.

Cumulocity IoT does not add any time zone or difference to dateTime,
We recommend to always store timestamps in UTC date format and also use UTC date format for queries.

Please note that the measurement API implements paging and the max. number of measurements that can be retrieved per page is 2000. So if the measurements of one day exceed 2000 you have to navigate through the other pages as well.

Can you give an example of a document you want to retrieve and your query to retrieve it?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.