Forum Discussion

Go_Ozeki's avatar
Go_Ozeki
Copper Contributor
Oct 22, 2021
Solved

How do I get multiple records in target period?

Hi all,   I would like to retrieve multiple records within a period of time from a Device in IoT Central.   Ex) Get the data of 100 records from the latest in Json format. Obtain the data with...
  • OlivierBloch's avatar
    Oct 22, 2021
    Hi,
    You can't use the APIs at this point to get the historical telemetry data directly from IoT Central (you can get the history for commands and properties only). Furthermore, Azure IoT Central retains data on a rolling 30-days basis, which means you can't access data that is older than 30 days by default directly from IoT Central.
    The recommend way to implement the scenario you are looking for is to use the continuous data export feature (https://docs.microsoft.com/azure/iot-central/core/howto-export-data) and then depending on where you send the data (Event Hub, Blob, ...) you can use these services API to revtreive the data you need

Resources