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

Get intraday time series for current sleep while sleeping

ANSWERED

I categorized the app as personal, I am able to access the minute by minute sleep data. However I am able to get the complete data only after waking up. Instead I need to get sleep data at multiple times in the middle of the night of the current sleep.

 

The request URL I am using is

https://api.fitbit.com/1/user/-/sleep/date/today.json

With this I am getting previous night's data until mid night, then the sleep data is null. I changed the date to tomorrow's date in the current code and I will have to test it tonight, but I believe its gonna show null until I wake up.

 

Please help me get minute by minute data for current sleep instead all at once after wakign up.

Thanks.

Best Answer
1 BEST ANSWER

Accepted Solutions

Sleep logs are only available after awakening and a device sync.

View best answer in original post

Best Answer
0 Votes
7 REPLIES 7

Sleep logs are only available after awakening and a device sync.

Best Answer
0 Votes

Yup, please consider this for future API release. 

 

There is some interest for this app I am trying to build

 

https://www.reddit.com/r/fitbit/comments/3uvmaj/is_there_any_app_out_there_which_can_mute_music/

Best Answer

Keep in mind that devices only attempt to sync every 15–20 minutes. Even if partial sleep logs were added, this would be a significant delay to pausing someone's music.

Best Answer
0 Votes
True, a api request to force sync would be helpful a lot as well.
Best Answer

In order to maximize the time between having to charge the device, Bluetooth communication is kept to a minimum. I would not expect to see this functionality offered.

Best Answer
0 Votes

While it should be kept to a minimum for most usages, for many real-time applications, the ability to force syncs would be extremily helpful.

Best Answer
0 Votes

Is there any progress about this?

Thanks.

Best Answer
0 Votes