- Home
- Wearables
- Lab Testing
- API Reference
- Event Catalog
- Changelog
Users
Introspection
Orders
At-home Phlebotomy
Tests
Results
Health Insurance
Vitals
Body
Activity
Wellness
Nutrition
Core
Lab Testing
Timeseries Data
Stream
Get Sleep stream for a user_id
API key based authentication
The Vital Sleep ID
curl --request GET \
--url {{BASE_URL}}/v2/summary/sleep/{sleep_id}/stream \
--header 'Accept: application/json' \
--header 'x-vital-api-key: <API_KEY>'
{
"hrv": [
{
"id": 0,
"timestamp": "2022-08-04T12:42:45.722013+00:00",
"value": 98,
"type": null,
"unit": "rmssd"
},
{
"id": 1,
"timestamp": "2022-08-04T12:43:15.722058+00:00",
"value": 44,
"type": null,
"unit": "rmssd"
},
{
"id": 2,
"timestamp": "2022-08-04T12:43:45.722075+00:00",
"value": 75,
"type": null,
"unit": "rmssd"
},
{
"id": 3,
"timestamp": "2022-08-04T12:44:15.722089+00:00",
"value": 100,
"type": null,
"unit": "rmssd"
},
{
"id": 4,
"timestamp": "2022-08-04T12:44:45.722101+00:00",
"value": 59,
"type": null,
"unit": "rmssd"
}
],
"heartrate": [
{
"id": 0,
"timestamp": "2022-08-04T12:42:45.722112+00:00",
"value": 29,
"type": null,
"unit": "bpm"
},
{
"id": 1,
"timestamp": "2022-08-04T12:43:15.722124+00:00",
"value": 162,
"type": null,
"unit": "bpm"
},
{
"id": 2,
"timestamp": "2022-08-04T12:43:45.722135+00:00",
"value": 75,
"type": null,
"unit": "bpm"
},
{
"id": 3,
"timestamp": "2022-08-04T12:44:15.722146+00:00",
"value": 11,
"type": null,
"unit": "bpm"
},
{
"id": 4,
"timestamp": "2022-08-04T12:44:45.722157+00:00",
"value": 41,
"type": null,
"unit": "bpm"
}
],
"hypnogram": [
{
"id": 0,
"timestamp": "2022-08-04T12:42:45.722168+00:00",
"start": "2022-08-04T12:42:45.722168+00:00",
"end": "2022-08-04T12:43:15.722179+00:00",
"value": 1,
"type": null,
"unit": "stage"
},
{
"id": 1,
"timestamp": "2022-08-04T12:43:15.722179+00:00",
"start": "2022-08-04T12:43:15.722179+00:00",
"end": "2022-08-04T12:43:45.722190+00:00",
"value": 0,
"type": null,
"unit": "stage"
},
{
"id": 2,
"timestamp": "2022-08-04T12:43:45.722190+00:00",
"start": "2022-08-04T12:43:45.722190+00:00",
"end": "2022-08-04T12:44:15.722201+00:00",
"value": 4,
"type": null,
"unit": "stage"
},
{
"id": 3,
"timestamp": "2022-08-04T12:44:15.722201+00:00",
"start": "2022-08-04T12:44:15.722201+00:00",
"end": "2022-08-04T12:44:45.722212+00:00",
"value": 0,
"type": null,
"unit": "stage"
},
{
"id": 4,
"timestamp": "2022-08-04T12:44:45.722212+00:00",
"start": "2022-08-04T12:44:45.722212+00:00",
"end": "2022-08-04T12:42:45.722223+00:00",
"value": 4,
"type": null,
"unit": "stage"
}
],
"respiratory_rate": [
{
"id": 0,
"timestamp": "2022-08-04T12:42:45.722223+00:00",
"value": 30,
"type": null,
"unit": "bpm"
},
{
"id": 1,
"timestamp": "2022-08-04T12:43:15.722234+00:00",
"value": 29,
"type": null,
"unit": "bpm"
},
{
"id": 2,
"timestamp": "2022-08-04T12:43:45.722245+00:00",
"value": 19,
"type": null,
"unit": "bpm"
},
{
"id": 3,
"timestamp": "2022-08-04T12:44:15.722256+00:00",
"value": 14,
"type": null,
"unit": "bpm"
},
{
"id": 4,
"timestamp": "2022-08-04T12:44:45.722266+00:00",
"value": 18,
"type": null,
"unit": "bpm"
}
]
}
Authorizations
API key based authentication
Path Parameters
The Vital Sleep ID
Response
Deprecated
The timestamp of the measurement.
Time zone UTC offset in seconds. Positive offset indicates east of UTC; negative offset indicates west of UTC; and null indicates the time zone information is unavailable at source.
The reading type of the measurement. This is applicable only to Cholesterol, IGG and IGE.
Measured in bpm.
Heart rate in bpm
Deprecated
The timestamp of the measurement.
Time zone UTC offset in seconds. Positive offset indicates east of UTC; negative offset indicates west of UTC; and null indicates the time zone information is unavailable at source.
The reading type of the measurement. This is applicable only to Cholesterol, IGG and IGE.
Measured in rmssd.
HRV calculated using rmssd during sleep
The end time (exclusive) of the interval.
Deprecated
The start time (inclusive) of the interval.
Depracated. The start time (inclusive) of the interval.
Time zone UTC offset in seconds. Positive offset indicates east of UTC; negative offset indicates west of UTC; and null indicates the time zone information is unavailable at source.
The reading type of the measurement. This is applicable only to Cholesterol, IGG and IGE.
enum: 1: deep, 2: light, 3: rem, 4: awake, -1: missing_data.
Hypnogram for sleep stages {"deep": 1, "light": 2, "rem": 3, "awake": 4, "manual": 5, "missing_data": -1}
Deprecated
The timestamp of the measurement.
Time zone UTC offset in seconds. Positive offset indicates east of UTC; negative offset indicates west of UTC; and null indicates the time zone information is unavailable at source.
The reading type of the measurement. This is applicable only to Cholesterol, IGG and IGE.
Measured in bpm.
Average respiratory rate::breaths per minute
curl --request GET \
--url {{BASE_URL}}/v2/summary/sleep/{sleep_id}/stream \
--header 'Accept: application/json' \
--header 'x-vital-api-key: <API_KEY>'
{
"hrv": [
{
"id": 0,
"timestamp": "2022-08-04T12:42:45.722013+00:00",
"value": 98,
"type": null,
"unit": "rmssd"
},
{
"id": 1,
"timestamp": "2022-08-04T12:43:15.722058+00:00",
"value": 44,
"type": null,
"unit": "rmssd"
},
{
"id": 2,
"timestamp": "2022-08-04T12:43:45.722075+00:00",
"value": 75,
"type": null,
"unit": "rmssd"
},
{
"id": 3,
"timestamp": "2022-08-04T12:44:15.722089+00:00",
"value": 100,
"type": null,
"unit": "rmssd"
},
{
"id": 4,
"timestamp": "2022-08-04T12:44:45.722101+00:00",
"value": 59,
"type": null,
"unit": "rmssd"
}
],
"heartrate": [
{
"id": 0,
"timestamp": "2022-08-04T12:42:45.722112+00:00",
"value": 29,
"type": null,
"unit": "bpm"
},
{
"id": 1,
"timestamp": "2022-08-04T12:43:15.722124+00:00",
"value": 162,
"type": null,
"unit": "bpm"
},
{
"id": 2,
"timestamp": "2022-08-04T12:43:45.722135+00:00",
"value": 75,
"type": null,
"unit": "bpm"
},
{
"id": 3,
"timestamp": "2022-08-04T12:44:15.722146+00:00",
"value": 11,
"type": null,
"unit": "bpm"
},
{
"id": 4,
"timestamp": "2022-08-04T12:44:45.722157+00:00",
"value": 41,
"type": null,
"unit": "bpm"
}
],
"hypnogram": [
{
"id": 0,
"timestamp": "2022-08-04T12:42:45.722168+00:00",
"start": "2022-08-04T12:42:45.722168+00:00",
"end": "2022-08-04T12:43:15.722179+00:00",
"value": 1,
"type": null,
"unit": "stage"
},
{
"id": 1,
"timestamp": "2022-08-04T12:43:15.722179+00:00",
"start": "2022-08-04T12:43:15.722179+00:00",
"end": "2022-08-04T12:43:45.722190+00:00",
"value": 0,
"type": null,
"unit": "stage"
},
{
"id": 2,
"timestamp": "2022-08-04T12:43:45.722190+00:00",
"start": "2022-08-04T12:43:45.722190+00:00",
"end": "2022-08-04T12:44:15.722201+00:00",
"value": 4,
"type": null,
"unit": "stage"
},
{
"id": 3,
"timestamp": "2022-08-04T12:44:15.722201+00:00",
"start": "2022-08-04T12:44:15.722201+00:00",
"end": "2022-08-04T12:44:45.722212+00:00",
"value": 0,
"type": null,
"unit": "stage"
},
{
"id": 4,
"timestamp": "2022-08-04T12:44:45.722212+00:00",
"start": "2022-08-04T12:44:45.722212+00:00",
"end": "2022-08-04T12:42:45.722223+00:00",
"value": 4,
"type": null,
"unit": "stage"
}
],
"respiratory_rate": [
{
"id": 0,
"timestamp": "2022-08-04T12:42:45.722223+00:00",
"value": 30,
"type": null,
"unit": "bpm"
},
{
"id": 1,
"timestamp": "2022-08-04T12:43:15.722234+00:00",
"value": 29,
"type": null,
"unit": "bpm"
},
{
"id": 2,
"timestamp": "2022-08-04T12:43:45.722245+00:00",
"value": 19,
"type": null,
"unit": "bpm"
},
{
"id": 3,
"timestamp": "2022-08-04T12:44:15.722256+00:00",
"value": 14,
"type": null,
"unit": "bpm"
},
{
"id": 4,
"timestamp": "2022-08-04T12:44:45.722266+00:00",
"value": 18,
"type": null,
"unit": "bpm"
}
]
}