01-19-2017 03:30
01-19-2017 03:30
Hi Fitbit Team,
I was trying to capture data from the fitbit device but at times few attributes do not come in the response message, for eg. with API call, https://api.fitbit.com/1/user/<user-id>/activities/heart/date/today/1d.json, the restingheartrate is not coming up at times.
So I wanted to know if there's a place where I can find all the mandatory attributes which will always come in the response irrespective of any deviations in the dependencies? If so, please help me know. (Something like a DTD for an XML, anything for the JSON)?
Regards,
Ritu.
Answered! Go to the Best Answer.
01-20-2017 09:56 - edited 01-20-2017 09:56
01-20-2017 09:56 - edited 01-20-2017 09:56
@ritu.jain wrote:
Does this mean, any parameter which is not captured can be skipped altogether from the response message?
@ritu.jain Not necessarily; you could have 0 steps for the day and it will still show up as:
"steps": 0,
@ritu.jain wrote:
How can I make sure that the parameters do not get skipped?
@ritu.jain Check for them in the response.
ritu.jain wrote:Do we have a list of mandatory parameters, which will appear in the message irrespective of anything.
@ritu.jain No, but the example responses in the docs should give you a pretty good idea of what to expect.
01-19-2017 12:55
01-19-2017 12:55
If resting heart rate is not returned, no value is available for that day.
01-20-2017 05:46
01-20-2017 05:46
Does this mean, any parameter which is not captured can be skipped altogether from the response message? How can I make sure that the parameters do not get skipped?
Do we have a list of mandatory parameters, which will appear in the message irrespective of anything.
01-20-2017 09:56 - edited 01-20-2017 09:56
01-20-2017 09:56 - edited 01-20-2017 09:56
@ritu.jain wrote:
Does this mean, any parameter which is not captured can be skipped altogether from the response message?
@ritu.jain Not necessarily; you could have 0 steps for the day and it will still show up as:
"steps": 0,
@ritu.jain wrote:
How can I make sure that the parameters do not get skipped?
@ritu.jain Check for them in the response.
ritu.jain wrote:Do we have a list of mandatory parameters, which will appear in the message irrespective of anything.
@ritu.jain No, but the example responses in the docs should give you a pretty good idea of what to expect.