07-21-2014 11:52
07-21-2014 11:52
I was wondering if there was anyway to get a date range of data from Fitbit, such as the Food Log information and Activity Log information, without having to query for one day at a time. The application I am working on may need to grab data for a long time period for an individual user, so having to make a call to the server for each and every single day for that time period will most likely put me over the 150 calls to the server per hour limit (for each user). I hope to be able to retrieve the data without having to wait each hour to restart querying. I know that there is Intraday Time Series data I can grab, but I am also interested in getting the Food Log and Activity Log data, which is not included in the Intraday Time Series data. Is there anything in the Fitbit API where I could grab this information for a range of days in just one query to the server?
Answered! Go to the Best Answer.
07-21-2014 13:55
07-21-2014 13:55
Hi chawk1,
Unfortunately, we don't have a way of retrieving all logs in one request at this time. We are aware of the backfilling use case and are working to improve this functionality, but we do not have anything to announce yet.
07-21-2014 12:06
07-21-2014 12:06
To get data for several days you can use timeseries api, your request should look similar to GET /
1
/user/-/foods/log/caloriesIn/date/
2010
-
08
-
11
/
2010
-
08
-
15
.json
see https://wiki.fitbit.com/display/API/API-Get-Time-Series for more details.
07-21-2014 12:13
07-21-2014 12:13
Thank you for your reply Ivan!
I was actually hoping to get more than just summary data for each day, and I know the Intraday Time Series data only provides a summary of each day for the given date range. For example, I want to be able to get the Food log data, which includes values for name, amount, brand, calories, etc..., for a range of dates in just one query to the data, as oppose to just one total calories consumed value for each day. Is this possible with the Fitbit API?
07-21-2014 13:55
07-21-2014 13:55
Hi chawk1,
Unfortunately, we don't have a way of retrieving all logs in one request at this time. We are aware of the backfilling use case and are working to improve this functionality, but we do not have anything to announce yet.
07-21-2014 14:37
07-21-2014 14:37
Thank you for your reply Jeremiah! I do hope this can be implemented in the future, so we don't have to worry about the rate limit and overloading the server with requests.
02-04-2016 08:19
02-04-2016 08:19
yes, this would help reduce the number of calls, improving our problems against the rate limit
03-09-2016 08:21
03-09-2016 08:21
Bump, has this feature been implemented or is this feature coming in the future?
03-09-2016 11:20
03-09-2016 11:20
@ThaCaptain This is still a planned feature. I don't have any updates on it, but as with any new feature or change, it will be announced when it's ready.
11-03-2016 17:30
11-03-2016 17:30
Could really use this as well, please!