Skip to content

Cognitive Systems App Cloud API

The App Cloud APIs expose the Core API endpoints, but with the addition of adding per user authentication and authorization. For example, you may choose to build with App Cloud APIs when developing for a mobile platform.

Download OpenAPI description
Languages
Servers
Mock server
https://docs.cognitivesystems.com/_mock/assets/specs/api/app_cloud
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

Operations

Get Sleep-Wake SettingsBeta

Request

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.

Security
Authorization
curl -i -X GET \
  https://docs.cognitivesystems.com/_mock/assets/specs/api/app_cloud/sleep_times/settings \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

Bodyapplication/json
enabledbooleanrequired
sleep_hourintegerrequired
Example: 23
sleep_minuteintegerrequired
wake_hourintegerrequired
Example: 9
wake_minuteintegerrequired
Example: 15
Response
application/json
{ "enabled": false, "sleep_hour": 23, "sleep_minute": 0, "wake_hour": 9, "wake_minute": 15 }

Set Sleep-Wake SettingsBeta

Request

Only the user with a role of "owner" can make a request to this endpoint.

Security
Authorization
Bodyapplication/json
enabledboolean

toggle on or off the sleep feature

sleep_hourinteger

user supplied hour for time of sleep

Example: 23
sleep_minuteinteger

user supplied minute for time of sleep

wake_hourinteger

user supplied hour for time of wake

Example: 9
wake_minuteinteger

user supplied minute for time of wake

Example: 15
curl -i -X POST \
  https://docs.cognitivesystems.com/_mock/assets/specs/api/app_cloud/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
  }'

Responses

Bodyapplication/json
enabledbooleanrequired
sleep_hourintegerrequired
Example: 23
sleep_minuteintegerrequired
wake_hourintegerrequired
Example: 9
wake_minuteintegerrequired
Example: 15
Response
application/json
{ "enabled": false, "sleep_hour": 23, "sleep_minute": 0, "wake_hour": 9, "wake_minute": 15 }

Sleep InsightsBeta

Request

Sleep Insights provides you sleep related data, including the number of interruptions that have occurred and the sleep and wake times.

Query
start_datestring(date)(Start Date)required

The first date to include within the results.

Example: start_date=2025-03-20
end_datestring(date)(End Date)required

The last date to include within the results.

Example: end_date=2025-04-24
timezonestring(string)(timezone)

Optional If set, the provided value will be used to perform end of day calculations.

Example: timezone=America/Toronto
curl -i -X GET \
  'https://docs.cognitivesystems.com/_mock/assets/specs/api/app_cloud/insights/v2/sleep?start_date=2025-03-20&end_date=2025-04-24&timezone=America%2FToronto'

Responses

200 - OK

Bodyapplication/jsonArray [
hst_interruptionsinteger

Household Sleep Time (HST) interruptions indicates the number of interruptions that had occurred during the sleep time.

Example: 3
sleep_timestring(date-time)

The timestamp that indicates when the the household is considered to be asleep.

Example: "2025-03-19T22:00:00-04:00"
wake_timestring(date-time)

The timestamp that indicates when the household is considered to be awake.

Example: "2025-03-20T09:15:00-04:00"
timezonestring

Timezone used by the sleep and wake times.

Example: "America/Toronto"
house_dayinteger

A counter that tracks the day that is specific to the WiFi Motion network.

Example: 20166
]
Response
application/json
[ { "hst_interruptions": 3, "sleep_time": "2025-03-19T22:00:00-04:00", "wake_time": "2025-03-20T09:15:00-04:00", "timezone": "America/Toronto", "house_day": 20166 }, { "hst_interruptions": 0, "sleep_time": "2025-03-20T22:00:00-04:00", "wake_time": "2025-03-21T08:15:00-04:00", "timezone": "America/Toronto", "house_day": 20167 }, { "hst_interruptions": 0, "sleep_time": "2025-03-21T22:00:00-04:00", "wake_time": "2025-03-22T09:00:00-04:00", "timezone": "America/Toronto", "house_day": 20168 }, { "hst_interruptions": 0, "sleep_time": "2025-03-22T22:30:00-04:00", "wake_time": "2025-03-23T09:30:00-04:00", "timezone": "America/Toronto", "house_day": 20169 }, { "hst_interruptions": 0, "sleep_time": "2025-03-23T23:15:00-04:00", "wake_time": "2025-03-24T07:30:00-04:00", "timezone": "America/Toronto", "house_day": 20170 } ]

Zone Priority

Operations

Universal Alerting

Operations

Meta

Operations

Sensor Integration

Operations