Health

Get sleep chart data with heart rate overlay

Returns sleep session data with sleep stages timeline and heart rate data for visualization

get/api/health/sleep-chart

Request

  • Base URL
    https://api.hiyd.ai
  • Auth
    HTTP bearer

Query parameters

datestring date

Date of sleep session (defaults to last night)

granularity'day' | 'week' | 'month'
  • day: Single sleep session with stages and heart rate
  • week: Daily sleep data for last 7 days
  • month: Daily sleep data for last 30 days
startstring date

week/month only: first wake day of the window, so the window is [start, date] instead of the trailing 7 / 30 days. Ignored (trailing window used) unless start <= date and the span is at most 42 days.

time_zonestring
Example:America/Los_Angeles

IANA zone the client lives in. Demo sleep rows are attributed to the wake day in this zone. Band nights need no zone. Omitted or unrecognised values mean UTC.

Response

Sleep chart data retrieved successfully

datestring date
source'band' | 'demo'
stages_source'band' | 'demo' | 'none'

none = a band night with no stored stage timeline

bedtimestring date-time nullable
wakeup_timestring date-time nullable
time_zonestring nullable

The zone the band night was staged in (null for demo rows)

Changes

No recorded changes to this operation across all 1 revision of this API.