08-05-2017 11:08
08-05-2017 11:08
What value does the data retrieved from /1/user/-/body/weight/date/2017-03-13/2017-08-05.json really have? That's what I get:
{"body-weight":[{"dateTime":"2017-03-13","value":"79.0"},{"dateTime":"2017-03-14","value":"78.6"},{"dateTime":"2017-03-15","value":"78.486"},{"dateTime":"2017-03-16","value":"78.372"},{"dateTime":"2017-03-17","value":"78.258"},{"dateTime":"2017-03-18","value":"78.144"},{"dateTime":"2017-03-19","value":"78.03"},{"dateTime":"2017-03-20","value":"77.916"},{"dateTime":"2017-03-21","value":"77.802"},{"dateTime":"2017-03-22","value":"77.688"},{"dateTime":"2017-03-23","value":"77.574"},{"dateTime":"2017-03-24","value":"77.46"},{"dateTime":"2017-03-25","value":"77.346"},{"dateTime":"2017-03-26","value":"77.232"},{"dateTime":"2017-03-27","value":"77.118"},{"dateTime":"2017-03-28","value":"77.0"},{"dateTime":"2017-03-29","value":"76.375"},{"dateTime":"2017-03-30","value":"75.75"},{"dateTime":"2017-03-31","value":"75.125"},{"dateTime":"2017-04-01","value":"74.5"},{"dateTime":"2017-04-02","value":"74.499"},{"dateTime":"2017-04-03","value":"74.498"},{"dateTime":"2017-04-04","value":"74.497"},{"dateTime":"2017-04-05","value":"74.496"},{"dateTime":"2017-04-06","value":"74.495"},{"dateTime":"2017-04-07","value":"74.494"},{"dateTime":"2017-04-08","value":"74.493"},{"dateTime":"2017-04-09","value":"74.492"},{"dateTime":"2017-04-10","value":"74.491"},{"dateTime":"2017-04-11","value":"74.49"},{"dateTime":"2017-04-12","value":"74.489"},{"dateTime":"2017-04-13","value":"74.488"},{"dateTime":"2017-04-14","value":"74.487"},{"dateTime":"2017-04-15","value":"74.486"},{"dateTime":"2017-04-16","value":"74.485"},{"dateTime":"2017-04-17","value":"74.484"},{"dateTime":"2017-04-18","value":"74.483"},{"dateTime":"2017-04-19","value":"74.482"},{"dateTime":"2017-04-20","value":"74.481"},{"dateTime":"2017-04-21","value":"74.48"},{"dateTime":"2017-04-22","value":"74.479"},{"dateTime":"2017-04-23","value":"74.478"},{"dateTime":"2017-04-24","value":"74.477"},{"dateTime":"2017-04-25","value":"74.476"},{"dateTime":"2017-04-26","value":"74.475"},{"dateTime":"2017-04-27","value":"74.474"},{"dateTime":"2017-04-28","value":"74.473"},{"dateTime":"2017-04-29","value":"74.472"},{"dateTime":"2017-04-30","value":"74.471"},{"dateTime":"2017-05-01","value":"74.47"},{"dateTime":"2017-05-02","value":"74.469"},{"dateTime":"2017-05-03","value":"74.468"},{"dateTime":"2017-05-04","value":"74.467"},{"dateTime":"2017-05-05","value":"74.466"},{"dateTime":"2017-05-06","value":"74.465"},{"dateTime":"2017-05-07","value":"74.464"},{"dateTime":"2017-05-08","value":"74.463"},{"dateTime":"2017-05-09","value":"74.462"},{"dateTime":"2017-05-10","value":"74.461"},{"dateTime":"2017-05-11","value":"74.46"},{"dateTime":"2017-05-12","value":"74.459"},{"dateTime":"2017-05-13","value":"74.458"},{"dateTime":"2017-05-14","value":"74.457"},{"dateTime":"2017-05-15","value":"74.456"},{"dateTime":"2017-05-16","value":"74.455"},{"dateTime":"2017-05-17","value":"74.454"},{"dateTime":"2017-05-18","value":"74.453"},{"dateTime":"2017-05-19","value":"74.452"},{"dateTime":"2017-05-20","value":"74.451"},{"dateTime":"2017-05-21","value":"74.45"},{"dateTime":"2017-05-22","value":"74.4"},{"dateTime":"2017-05-23","value":"74.209"},{"dateTime":"2017-05-24","value":"74.018"},{"dateTime":"2017-05-25","value":"73.827"},{"dateTime":"2017-05-26","value":"73.636"},{"dateTime":"2017-05-27","value":"73.445"},{"dateTime":"2017-05-28","value":"73.254"},{"dateTime":"2017-05-29","value":"73.063"},{"dateTime":"2017-05-30","value":"72.872"},{"dateTime":"2017-05-31","value":"72.681"},{"dateTime":"2017-06-01","value":"72.49"},{"dateTime":"2017-06-02","value":"72.299"},{"dateTime":"2017-06-03","value":"72.108"},{"dateTime":"2017-06-04","value":"71.917"},{"dateTime":"2017-06-05","value":"71.726"},{"dateTime":"2017-06-06","value":"71.535"},{"dateTime":"2017-06-07","value":"71.344"},{"dateTime":"2017-06-08","value":"71.153"},{"dateTime":"2017-06-09","value":"70.962"}]}
But I didn't log my weight everyday since I created my account. This does not represent the actual weight-loss curve that happened between 79Kg and 70Kg, which is very important for someone serious about losing weight. I logged my weight a few times since 03/13/2017, but this time series gives me something that looks like an average weight between the logs I actually made.
The only problem is that I have no way to know what was an input by the user and what's Fitbit's assumption of the weight he lost in a time range.
Why there's no way to get the actual logs the user has made without the 31 days limit we have on the /body/log/weight/ endpoint?
08-19-2018 14:02
08-29-2018 05:57
08-29-2018 05:57
hahahaha Unfortunately, as I didn't get any replies to this question, I figured I would just not litter my users' data with those inaccurate datapoints.
I understand it's not at all of Fitbit's interest to provide an API that's too useful, otherwise people or companies could build their own tracker devices and use Fitbit's API to store their collected data. But that doesn't explain why there isn't a simple wheight endpoint that returns only the data added by the user.
My solution was to not use my users' weight data at all.
09-04-2018 18:03
09-04-2018 18:03
Gotcha!
I think that I noticed the data in the time series is an estimation. However, the dates where there actually is a log, the time series is correct (from what I've found). I decided to only grab the dates where I actually logged weight.
The way that I'm approaching it is:
- Grab the time series
- Grab the earliest date in the time series (I use this as the start time)
- Iterate time in 1 month intervals, and generate a body endpoint, from the earliest weigh in until now
-??? Subscribe to the Fitbit API to listen for updates ???
09-25-2018 17:00
09-25-2018 17:00
I'm really sorry that you didn't get an response back when you posted the message originally. Looking at the endpoint you're using, I think there is a small typo. The endpoint for returning weight data is
https://api.fitbit.com/1/user/[user-id]/body/log/weight/date/[begin-date]/[end-date].json
Documentation: https://dev.fitbit.com/build/reference/web-api/body/#weight
With this syntax, I only get the data on dates the weight data was logged. Please give it a try.
10-30-2018 04:29
10-30-2018 04:29
I am following up that everyone may benefit from responses from specialists on this subjec