Cognitive Systems WiFi Motion App-Cloud API (v1-5-x)

App Cloud APIs are used by mobile applications.

Download OpenAPI description
Languages
Servers
Mock server

https://docs.cognitivesystems.com/_mock/assets/specs/app-cloud/v1-5-x/

https://docs.cognitivesystems.com/api/v1/

Overview

Operations

Out of Box

Operations

Logging In

Operations

Geofencing

Operations

Account Management

Operations

Network Settings

Operations

Sounding v2

Operations

Events, History, and Visualizations

Operations

Household Insights [BETA]

Operations

Household Sleep-Wake Times Data

Request

This endpoint retrieves the timezone of the user from the network model and supplies it to the micro service. The micro service will return hour values for wake and sleep in the network's timezone.

Path
queried_daysinteger[ 1 .. 7 ]required

can be omitted. when omitted defaults to 7

Query
force_pastboolean

Specifically for QA and load validation, this switch if set to true force allows a request sleep data to query the full 7 days back despite the enable time being later than this. The number of queried days will be respected in the path param

Default false
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'

Responses

Bodyapplication/json
avg_sleep_time_sinteger
Example: 82380
avg_wake_time_sinteger
Example: 23280
average_interruptionsnumber
duration_avg_sinteger
Example: 27900
queried_daysinteger

the number of days actually queried to the insights micro-service

Example: 6
motion_stateobject

the unarmed/home/0 or armed/away/ 1 history of the network

Example: {"data":[0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"from_ts":1618243200,"bucket":3600}
dataArray of objects

the array of days queried, length of array will match queried number of days

Example: [{"house_day":18729,"sleep_ts":1618266600,"sleep_weight":0.923879533,"wake_ts":1618286400,"wake_weight":0.965925826},{"house_day":18730,"sleep_ts":1618353900,"sleep_weight":0.896872742,"wake_ts":1618372800,"wake_weight":0.965925826},{"house_day":18731,"sleep_ts":1618440300,"sleep_weight":0.896872742,"wake_ts":1618476300,"wake_weight":0.555570233},{"house_day":18732,"sleep_ts":1618517700,"sleep_weight":0.98078528,"wake_ts":1618545600,"wake_weight":0.965925826},{"house_day":18734,"sleep_ts":1618687800,"sleep_weight":0.923879533,"wake_ts":1618711200,"wake_weight":0.707106781},{"house_day":18735,"sleep_ts":1618766100,"sleep_weight":0.555570233,"wake_ts":1618807500,"wake_weight":0.997858923}]
Response
application/json
{ "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": [ {}, {}, {}, {}, {}, {} ] }

Household Activity

Request

Available in App Cloud v1-3-22 and above. Requires the Home-Insights Microservice enabled within MNS.

Path
queried_daysnumberrequired

the number of days to query, when omitted assumes 7 days

curl -i -X GET \
  'https://docs.cognitivesystems.com/_mock/assets/specs/app-cloud/v1-5-x/activity/{queried_days}'

Responses

Bodyapplication/json
queried_daysinteger

the number of days queried

Example: 7
activityArray of objects
Example: [{"house_day":18960,"activity_minutes":214,"day_ts":1638162000},{"house_day":18961,"activity_minutes":142,"day_ts":1638248400},{"house_day":18962,"activity_minutes":510,"day_ts":1638334800},{"house_day":18963,"activity_minutes":55,"day_ts":1638421200},{"house_day":18964,"activity_minutes":49,"day_ts":1638507600},{"house_day":18965,"activity_minutes":182,"day_ts":1638594000},{"house_day":18966,"activity_minutes":86,"day_ts":1638680400}]
string
Response
application/json
{ "queried_days": 7, "activity": [ {}, {}, {}, {}, {}, {}, {} ] }

Zone Priority [BETA]

Operations

Universal Alerting

Operations

Meta

Operations

Administration

Operations