Sleep Data
GET https://api.tryterra.co/v2/sleep?user_id={{user-id}}&start_date=2023-05-05&end_date=2023-05-11&to_webhook=false
Get the sleep data for the given Terra user ID
Request Params
Key | Datatype | Required | Description |
---|
user_id | string | | Terra user_id you'd like to get data for |
start_date | string | | Start date of the date range you'd like to get data for |
end_date | string | | End date of the date range you'd like to get data for. Defaults to start_date + 1 day if blank. |
to_webhook | boolean | | Boolean describing if the data should be sent to your webhook or back in the HTTP response |
with_samples | boolean | | Boolean describing if the data should contain detailed samples such as HR, HRV, steps, etc... |
Key | Datatype | Required | Description |
---|
dev-id | string | | |