Should I use groups for historical data downloads from multiple sensors?

I am trying to send requests for downloading daily averages of ~300 sensors over 3 years. The API guide suggests using the group functionality when working with real-time API. However, historical API doesn’t support multiple sensors. I have two strategies:

  1. Write a for loop that uses Get Sensor History request for each sensor with one-year intervals.
  2. Add my sensors into a group, then write a for loop that uses Get Member History for each group member, but everything else is the same.

Are there any efficiency gains or rate limit differences between the two?

Thank you!

My understanding is that there is no way to include multiple sensors in a historical API request - it must always be one sensor per request. I personally use a for loop to run a list of sensor indexes over the API request URL.

Thank you for the reply. You are right that it must always be one sensor per request. However, that one request can be sent with group_id and member_id or with sensor_index in the URL. I want to know whether there is a difference between the two.

There isn’t a difference. However, using members may be beneficial since you can use a group. You can have your code get a list of all of the sensors in your group and then get their data. You could add or remove sensors from your group at any time, and your code would not have to change to accommodate.

1 Like