09-23-2014 12:34
09-23-2014 12:34
Hi
I try to get all activities/tracker data in one call instead of 7 or so separate calls. But I receive an error as response saying that it is not possible. So you would like to do this:
https://api.fitbit.com/1/user/-/activities/tracker/date/2014-09-21/1d.json
but now i have to do this for each item which casues a FitBit Rate limit error rather quickly 😞
https://api.fitbit.com/1/user/-/activities/tracker/calories/date/2014-09-21/1d.json
https://api.fitbit.com/1/user/-/activities/tracker/steps/date/2014-09-21/1d.json
https://api.fitbit.com/1/user/-/activities/tracker/steps/distance/2014-09-21/1d.json
etc .....
Thanks Peter
09-23-2014 12:46
09-23-2014 12:46
Hello,
Please check out this page: https://wiki.fitbit.com/display/API/API-Get-Activity-Stats
is seems to have what are you looking for.
09-23-2014 13:36 - edited 09-23-2014 13:37
09-23-2014 13:36 - edited 09-23-2014 13:37
see next post for better format
09-23-2014 13:37
09-23-2014 13:37
The call is:
https://api.fitbit.com/1/user/-/activities/date/"2014-09-20".json
I know for sure there is Fitbit Tracker data for that date.
Is your documentation incorrect or is my call incorrect?
{
"summary": {
"fairlyActiveMinutes": 187,
"caloriesBMR": 1809,
"marginalCalories": 800,
"sedentaryMinutes": 724,
"lightlyActiveMinutes": 291,
"activityCalories": 1844,
"steps": 11641,
"veryActiveMinutes": 2,
"distances": [
{
"distance": 8.22,
"activity": "total"
},
{
"distance": 8.22,
"activity": "tracker"
},
{
"distance": 0,
"activity": "loggedActivities"
},
{
"distance": 0.13,
"activity": "veryActive"
},
{
"distance": 5.52,
"activity": "moderatelyActive"
},
{
"distance": 2.57,
"activity": "lightlyActive"
},
{
"distance": 0,
"activity": "sedentaryActive"
}
],
"caloriesOut": 3133,
"activeScore": -1
},
"goals": {
"activeMinutes": 30,
"distance": 8.05,
"steps": 10000,
"caloriesOut": 2184
},
"activities": []
}
09-23-2014 13:40
09-23-2014 13:40
When you look on the Fitbit.com web site, do you see activities logged for that account?
PM me the email address for the account and I can help you take a look.
09-23-2014 14:20
09-23-2014 14:20
I looked at the account you private messaged me. The reason those events do not show up on the activity log is they are activity annotations. Unfortunately annotations aren't part of activity logs at this time.
09-23-2014 14:41
09-23-2014 14:41
Ok a bit puzzled now. So i have to stick to calls like below in order to get the Fitbit tracker data per day?
https://api.fitbit.com/1/user/-/activities/tracker/calories/date/2014-09-21/1d.json
https://api.fitbit.com/1/user/-/activities/tracker/steps/date/2014-09-21/1d.json
etc....
The big issue is that i hit the Fitbit rate limit very quikcly because i make 7 or more calls just to get the Fitbit tracker data for just one day. Not very efficient.
Any chance you can update the API to have a call like this which returns all tracker data for one day
https://api.fitbit.com/1/user/-/activities/tracker/date/2014-09-21/1d.json
09-23-2014 14:49
09-23-2014 14:49
@myfitnesscomp wrote:
Ok a bit puzzled now. So i have to stick to calls like below in order to get the Fitbit tracker data per day?
https://api.fitbit.com/1/user/-/activities/tracker/calories/date/2014-09-21/1d.json
https://api.fitbit.com/1/user/-/activities/tracker/steps/date/2014-09-21/1d.json
etc....
The big issue is that i hit the Fitbit rate limit very quikcly because i make 7 or more calls just to get the Fitbit tracker data for just one day. Not very efficient.
Any chance you can update the API to have a call like this which returns all tracker data for one day
https://api.fitbit.com/1/user/-/activities/tracker/date/2014-09-21/1d.json
It sounds like you should be able to get most of that data from:
https://wiki.fitbit.com/display/API/API-Get-Activities for a particular day.
The summary object contains calories, steps, distance, etc.
09-23-2014 15:08
09-23-2014 15:08
Yes that one is better! It gives the info i needed. Thanks!