12-15-2014 19:41
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-15-2014 19:41
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Hello,
Can you please tell me what is the best way to get total daily: sleep, exercise, and calories consumed over a range of dates via the fitbit API.
So far, I see the time series API sends data bewteen two dates, but they are not available for daily totals.
https://api.fitbit.com/1/user/-/activities/minutesVeryActive/date/2014-12-14/2014-12-15.json
Also, there are apis to get daily totals, but they work only one day at a time.
https://api.fitbit.com/1/user/-/activities/date/2014-12-14.json
https://api.fitbit.com/1/user/-/foods/log/date/2014-12-14.json
https://api.fitbit.com/1/user/-/sleep/date/2014-12-14.json
Do you have a way of retrieving daily total data between two dates ?
Thanks
John
12-23-2014 12:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-23-2014 12:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
anybody please 🙂

12-26-2014 12:13 - edited 12-26-2014 12:14
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


12-26-2014 12:13 - edited 12-26-2014 12:14
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hello,
So the time series by default will return you daily totals between the dates you specify with one day precision, right?
So /1/user/-/activities/steps/date/2014-08-18/2014-09-18.json request will return you steps totals for period of one month.
Isn't it what you were asking for?
There is no single endpoint that will return all different data types at once, so you'll need to make one request per data type: steps, sleep weight and etc.
Senior Software Developer at Fitbit

12-26-2014 14:15
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-26-2014 14:15
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Hello Ivan,
Thanks in advance for your help.
The issue is related to total activity duration per day.
A - It seems that there are only endpoints that return part of the activity duration, but not a total.
activities/minutesLightlyActive
activities/minutesFairlyActive
activities/minutesVeryActive
B - On the other hand, the /activities/date endpoint that returns actvity data for a single day does provide the total activity duration for that day -- but requires making an api call for each day needed.
Are these the only two choices we have:
1) call each activity time series APIs (A above) and calculate total activity duration for each day
OR
2) call the activities api (B above) for each day needed and pull the total duration value for each day.
Thanks,
John
12-29-2014 08:14
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


12-29-2014 08:14
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Yep, you're right those are the only two options you have right now.
Senior Software Developer at Fitbit

