-
Notifications
You must be signed in to change notification settings - Fork 7
Insights Endpoints
KSG edited this page Jan 16, 2015
·
9 revisions
- scopes: OAuthScope.INSIGHTS_READ
Returns the last 20 insights generated for the account
Example JSON response:
[
{
"title": "Nice To Meet You",
"message": "Welcome to Sense. This is where you'll see personalized **Sleep Insights** related to your sleep patterns and behavior.\n\nFrom time to time, you'll also be shown **Questions** in this space. These questions will help us provide more accurate and detailed insights about what's affecting your sleep. Let's get started.",
"category": "GENERIC",
"timestamp": 1421280960988,
"account_id": 1350
},
{
"title": "It's Hot in Here",
"message": "Your bedroom's temperature during your sleep ranges from 76°F (24°C) to 79°F (26°C). It's **too warm** for ideal sleep.\n\nTry lowering the thermostat to 75°F (23°C). You can also open the windows to let in some cool air.",
"category": "TEMPERATURE",
"timestamp": 1421387925163,
"account_id": 1350,
}
]
- scopes: OAuthScope.INSIGHTS_READ
Returns the list of experts generated informational cards for a particular category. For now, one card is available for each category. The category value will be the same as that in the insights above. Current available categories:
-
GENERIC
-
SLEEP_HYGIENE
-
LIGHT
-
SOUND
-
TEMPERATURE
-
HUMIDITY
-
AIR_QUALITY
-
SLEEP_DURATION
-
TIME_TO_SLEEP
-
SLEEP_TIME
-
WAKE_TIME
-
WORKOUT
-
CAFFEINE
-
ALCOHOL
-
DIET
-
DAYTIME_SLEEPINESS
-
DAYTIME_ACTIVITIES
-
SLEEP_SCORE
-
SLEEP_QUALITY
Example JSON response:
[
{
"id": 1,
"category": "LIGHT",
"title": "Effects of light in the environment on your sleep",
"text": "Light influences our internal clock through specialized \"light sensitive\" cells in the retina of our eyes,\nwhich sends messages to the brain that keep us in a 24-hour cycle or the **circadian rhythm**.\nThese are physical, mental and behavioral changes that follow a roughly a 24-hour cycle,\nresponding primarily to light and darkness in our environment.\\n\\nThe increase and decrease of light cues,\ntrigger different chemical reactions our body, causing changes to our physiology and behavior. As evening\napproaches and the light in our environment recedes, the hormone melatonin begins to rise,\nthe body temperature falls, thus making us less alert and more likely to fall sleep.\nIn the morning light, melatonin levels are low, the body temperature begins to rise, and other\nchemical shifts, such as a rise in the activating hormone cortisol, then will help us to feel alert\nand ready for the day.",
"image_url": "https://s3.amazonaws.com/hello-data/insights_images/light_1.jpeg"
}
]