Get a list of daily sleep summaries reported by the data sources.
Returns a list of sleep summaries
GET https://api.humanapi.co/v1/human/sleeps/summaries
Returns a single sleep summary
GET https://api.humanapi.co/v1/human/sleeps/summaries/{id}
Returns a single sleep summary by date
GET https://api.humanapi.co/v1/human/sleeps/summaries/{YYYY-MM-DD}
# Returns a json array of sleeps summaries:
[{
"id": "550facab68d29c4133b4cf22",
"userId": "52e20cb2fff56aac62000001",
"date": "2015-03-23",
"source": "jawbone",
"timeAsleep": 391.45,
"timeAwake": 28,
"createdAt": "2015-03-23T06:03:23.141Z",
"updatedAt": "2015-03-23T18:18:25.678Z",
"humanId": "5dc2527186aaf9de560e5841f1a44bd6"
}, {
"id": "550e92b25ee14de827d16689",
"userId": "52e20cb2fff56aac62000001",
"date": "2015-03-22",
"source": "jawbone",
"timeAsleep": 443.6,
"timeAwake": 23,
"createdAt": "2015-03-22T10:00:18.804Z",
"updatedAt": "2015-03-23T15:05:28.591Z",
"humanId": "5dc2527186aaf9de560e5841f1a44bd6"
}, {
"id": "550d599c47be23e06c83bbde",
"userId": "52e20cb2fff56aac62000001",
"date": "2015-03-21",
"source": "jawbone",
"timeAsleep": 412.5,
"timeAwake": 96,
"createdAt": "2015-03-21T11:44:28.969Z",
"updatedAt": "2015-03-23T15:05:28.599Z",
"humanId": "5dc2527186aaf9de560e5841f1a44bd6"
}]
# Get all sleep summaries associated with the user
curl -H "Authorization: Bearer demo" "https://api.humanapi.co/v1/human/sleeps/summaries"
Response Properties
Property | Type | Description |
---|---|---|
id | String | The id of the resource. |
userId | String | [deprecated - use humanId] |
humanId | String | Unique user identifier |
date | Date | The date of the sleep (format: YYYY-MM-DD) |
source | String | The name of the originating service |
timeAsleep | Number | The time asleep during the segment (in minutes) |
timeAwake | Number | The time awake during the segment (in minutes) |
updatedAt | Date | The time the measurement was updated on the Human API server |
createdAt | Date | The time the measurement was created on the Human API server |