Sleep v2 - Getsummary
Returns sleep activity summaries, which are an aggregation of all the data captured at high frequency during the sleep activity.</br></br> Use the Sleep v2 - Get service to get the high frequency data used to build these summaries.</br></br> IMPORTANT: Please refer to this page to check the availability of metrics based on the sleep tracking device used. Some data types are regulated in the EU and US and may not be available in your region.
Request
- Base URLhttps://wbsapi.withings.net
- Authnone declared. Required headers: Authorization
Query parameters
Service action name. Must take the string value getsummary.
DO NOT USE WITH FOLLOWING PARAMS: [lastupdate]<br>Start date. Required if no lastupdate.
DO NOT USE WITH FOLLOWING PARAMS: [lastupdate]<br>End date. Required if startdateymd is provided.
DO NOT USE WITH FOLLOWING PARAMS: [startdateymd, enddateymd]<br>Timestamp for requesting data that were updated or created after this date.<br>Useful for data synchronization between systems.<br>Use this instead of startdateymd + enddateymd.
List of requested data fields, separated by a comma.<br>Available data fields are listed below.<br><u>Ex</u>: data_fields=total_timeinbed,total_sleep_time,asleepduration<br><br><b><i>Standard sleep medicine metrics</i></b><br><br>total_timeinbed<br>> Total time spent in bed (seconds). <br><br>total_sleep_time<br>> Total time spent asleep. Sum of light, deep and rem durations (seconds). <br><br>asleepduration<br>> Duration of sleep when night comes from external source (seconds).<br>Light, Deep and Rem sleep durations are null in this case. <br><br>lightsleepduration<br>> Duration in state light sleep (seconds). <br><br>remsleepduration<br>> Duration in state REM sleep (seconds). <br><br>deepsleepduration<br>> Duration in state deep sleep (seconds). <br><br>sleep_efficiency<br>> Ratio of the total sleep time over the time spent in bed. <br><br>sleep_latency<br>> Time spent in bed before falling asleep (seconds). <br><br>wakeup_latency<br>> Time spent in bed after waking up (seconds). <br><br>wakeupduration<br>> Time spent awake (seconds). <br><br>wakeupcount<br>> Number of times the user woke up while in bed. Does not include the number of times the user got out of bed. <br><br>waso<br>> Time spent awake in bed after falling asleep for the 1st time during the night (seconds). <br><br>nb_rem_episodes<br>> Count of the REM sleep phases. <br><br><br><b><i>Sleep apnea and breathing disturbances</i></b><br><br>breathing_disturbances_intensity<br>> Intensity of <a href='/api-reference/#section/Glossary'>breathing disturbances</a>.<br>Available for all Sleep and Sleep Analyzer devices (wellness metric). <br><br>apnea_hypopnea_index<br>> Medical grade AHI. Average number of hypopnea and apnea episodes per hour, that occured during sleep time.<br>Only available for devices purchased in Europe and Australia, with the sleep apnea detection feature activated. <br><br>withings_index<br>> Withings Sleep Rx (FDA Cleared) allows to estimate gaps in breathing sounds and to generate an index. This index corresponds to the number of breathing events per hour.
<table><thead><tr><td>Value</td><td>Description</td></tr></thead><tbody><tr><td>0-15 (events per hour on average)</td><td>No/Mild</td></tr><tr><td>15-30 (events per hour on average)</td><td>Moderate</td></tr><tr><td>> 30 (events per hour on average)</td><td>Severe</td></tr></tbody></table>Note: 5 hours of sleep are required in order to calculate the Withings Index.<br><br><br><b><i>Other sleep datapoints and vitals</i></b><br><br>durationtosleep<br>> Time to sleep (seconds). (deprecated) <br><br>durationtowakeup<br>> Time to wake up (seconds). (deprecated) <br><br>out_of_bed_count<br>> Number of times the user got out of bed during the night. <br><br>hr_average<br>> Average heart rate. (beats per minute).<br><br>hr_min<br>> Minimal heart rate (beats per minute). <br><br>hr_max<br>> Maximal heart rate (beats per minute).. <br><br>rr_average<br>> Average respiration rate (breaths per minute). <br><br>rr_min<br>> Minimal respiration rate (breaths per minute). <br><br>rr_max<br>> Maximal respiration rate (breaths per minute). <br><br>breathing_quality_assessment<br>> Intensity of <a href='/api-reference/#section/Glossary'>breathing disturbances</a>.<br>Available for all Sleep and Sleep Analyzer devices (wellness metric). <br><br>snoring<br>> Total snoring time (seconds).<br><br>snoringepisodecount<br>> Numbers of snoring episodes of at least one minute.<br><br>sleep_score<br>> Sleep score<br><br>night_events<br>> Summary of sleep events that happened during the sleep activity.
It is structured as a dictionary, where keys are the type of event, and the value is an array of time offsets in seconds.
Within each array, the first offset is counted from the activity startdate, and every following offset is counted from the previous event of the same type. To obtain absolute timestamps, accumulate the offsets of each array separately, starting from startdate.
For example, with a startdate of 1758000000, "4":[4860,11640] describes two events: the first at 1758004860, the second at 1758016500 (4860 + 11640 = 16500 seconds after startdate).
Types of events can be one of the following :
<table><thead><tr><td>Value</td><td>Description</td></tr></thead><tbody><tr><td>1</td><td>got in bed</td></tr><tr><td>2</td><td>fell asleep</td></tr><tr><td>3</td><td>woke up</td></tr><tr><td>4</td><td>got out of bed</td></tr><tr><td>5</td><td>start of asleep period that was manually input</td></tr><tr><td>6</td><td>start of awake period that was manually input</td></tr></tbody></table><br><br>mvt_score_avg<br>> Track the average movement score in bed throughout the night. The score ranges from 0 to 255, representing the intensity of movement. This metric is only available for Sleep Analyzer devices in the EU and prescription-based devices in the US (Sleep Rx).<br><br>mvt_active_duration<br>> Track the duration (in seconds) of movement in bed. Only available for Sleep Analyzer devices (EU) and devices under prescriptions in the US (Sleep Rx)<br><br>rmssd_start_avg<br>> Heart rate variability - Start average<br><br>rmssd_end_avg<br>> Heart rate variability - End average<br><br>chest_movement_rate_wellness_average<br>> Average respiration rate (breaths per minute). <br><br>chest_movement_rate_wellness_min<br>> Minimal respiration rate (breaths per minute). <br><br>chest_movement_rate_wellness_max<br>> Maximal respiration rate (breaths per minute). <br><br>breathing_sounds<br>> Total time when breathing sounds were tracked. (seconds) <br><br>breathing_sounds_episode_count<br>> Numbers of breathing sounds episodes of at least one minute. <br><br>chest_movement_rate_average<br>> Average chest movement rate (events per minute). <br><br>chest_movement_rate_min<br>> Minimal chest movement rate (events per minute). <br><br>chest_movement_rate_max<br>> Maximal chest movement rate (events per minute). <br><br>core_body_temperature_min<br>> Minimal core body temperature (in celsius degrees). <br><br>core_body_temperature_max<br>> Maximal core body temperature (in celsius degrees). <br><br>core_body_temperature_avg<br>> Average core body temperature (in celsius degrees). <br><br>core_body_temperature_status<br>> Status of the temperature. (Use 'data_fields' to request this data) Value can be: 'unknown', 'usual' or 'elevated'. <br><br>
Headers
Used to pass your access token. Must take value: Bearer {your access_token} Replace {your access_token} with the access_token
Response
(Click to unfold)
Example response
{
"body": {
"series": [
{
"id": 12345,
"timezone": "Europe/Paris",
"model": 16,
"model_id": 51,
"startdate": 1594245600,
"enddate": 1594257200,
"date": "2020-07-09",
"created": 1594257200,
"modified": 1594257200,
"hash_deviceid": "892359876fd8805ac45bab078c4828692f0276b1",
"completed": true
}
]
}
}Changes
No recorded changes to this operation across all 1 revision of this API.