Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Marking mandatory fields

ANSWERED

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.

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

@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.

Andrew | Community Moderator, Fitbit

What motivates you?

View best answer in original post

Best Answer
0 Votes
3 REPLIES 3

If resting heart rate is not returned, no value is available for that day.

Best Answer
0 Votes

 

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. 

Best Answer
0 Votes

@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.

Andrew | Community Moderator, Fitbit

What motivates you?

Best Answer
0 Votes