App Cloud APIs are used by mobile applications.
https://docs.cognitivesystems.com/_mock/assets/specs/app-cloud/v1-5-x/
https://docs.cognitivesystems.com/api/v1/
Both the owner or the member bound to the network can consume this endpoint. Responds to the application whether sleep feature is enabled, and the user-provided household sleep time and household wake time.
If the owner has not yet enabled the feature viaPOST
, the following template is sent:
{
enabled: false,
sleep_hour: 23,
sleep_minute: 0,
wake_hour: 7,
wake_minute: 0
}
A record of the household settings is made only when the feature is enabled for the first time.
https://docs.cognitivesystems.com/_mock/assets/specs/app-cloud/v1-5-x/sleep_times/settings
https://docs.cognitivesystems.com/api/v1/sleep_times/settings
curl -i -X GET \
https://docs.cognitivesystems.com/_mock/assets/specs/app-cloud/v1-5-x/sleep_times/settings \
-H 'Authorization: YOUR_API_KEY_HERE'
{ "enabled": false, "sleep_hour": 23, "sleep_minute": 0, "wake_hour": 9, "wake_minute": 15 }
https://docs.cognitivesystems.com/_mock/assets/specs/app-cloud/v1-5-x/sleep_times/settings
https://docs.cognitivesystems.com/api/v1/sleep_times/settings
curl -i -X POST \
https://docs.cognitivesystems.com/_mock/assets/specs/app-cloud/v1-5-x/sleep_times/settings \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"enabled": false,
"sleep_hour": 23,
"sleep_minute": 0,
"wake_hour": 9,
"wake_minute": 15
}'
{ "enabled": false, "sleep_hour": 23, "sleep_minute": 0, "wake_hour": 9, "wake_minute": 15 }
https://docs.cognitivesystems.com/_mock/assets/specs/app-cloud/v1-5-x/sleep_times/data/{queried_days}
https://docs.cognitivesystems.com/api/v1/sleep_times/data/{queried_days}
curl -i -X GET \
'https://docs.cognitivesystems.com/_mock/assets/specs/app-cloud/v1-5-x/sleep_times/data/{queried_days}?force_past=false' \
-H 'Authorization: YOUR_API_KEY_HERE'
the unarmed
/home
/0
or armed
/away
/ 1
history of the network
the array of days queried, length of array will match queried number of days
{ "avg_sleep_time_s": 82380, "avg_wake_time_s": 23280, "duration_avg_s": 27900, "queried_days": 6, "motion_state": { "data": [ … ], "from_ts": 1618243200, "bucket": 3600 }, "data": [ { … }, { … }, { … }, { … }, { … }, { … } ] }