Back to

Read historical data from all sensors of a kit at once

To read historical data from a specific sensor of a kit using the APIs you issue:

Where kit_id is the id of your kit, or you could put a query filtering this value.

Is there a way to read the historical data but from all sensors of one kit, instead of one at a time?
For example, parameterizing the sensor_id in the URL?

I tried with the search feature, but as the endpoint is /devices, I can do
?q[kit_id_eq]=kit_id, and this bring the current information from all the devices with this kit_id, but I couldn’t do the same for sensor_id.

Any ideas?

Thank you!!

What operating system are you using?

There may not be a way to do this but you could probably do this with a shell script.

I’m on Windows.
When you think of shell script, it would be something like using curl to retrieve information for each of the sensors individually, and then in the script somehow build the JSON with the timestamps, and loop through each kit’s reading with matching sensor timestamps and posting them individually to TB?