WiFi Motion Core APIs (v3-x-x)

The WiFi Motion Core Cloud APIs facilitate the creation, configuration, and management of WiFi Motion networks via RESTful APIs. Additionally, it offers interfaces for accessing topologies, events, and motion data. This documentation outlines the endpoints for engaging with the WiFi Motion cloud and includes specifications for the following APIs:

Network Settings

Motion History

The motion history APIs provide various historical motion metrics.

Live Motion

The live motion API opens a web socket and triggers the network to emit recorded motion at a 500ms interval.

Events

The events APIs allow you to retrieve, create or tag events emitted by the network.

Network Status

High-level APIs for retrieving the network's topology, last status message, or to view or modify the network's metadata.

Location Data

The location data APIs expose localized motion data. Localization happens on a per mac, or custom location name base.

Find

A set of APIs to find a network in the WiFi Motion Cloud. Individual, or groups of networks can be queried by their primary identifiers or by MAC.

Insights (advanced)

APIs of the internal Home Insights Microservice. Used for motion-based activity and sleep insights.

Config (advanced)

Fine-grained network configuration. These APIs give full access to the underlying motion detection controls, but have no safeguards to prevent unwanted side effects. For friendlier configuration management, see the Network Settings APIs.

Node (advanced)

Interface to manage the access point or mesh nodes of a network. Provides APIs to find, delete or alter the configuration of nodes.

Gatekeeper (advanced)

Endpoint used by WiFi Motion agent for the initial cloud connection. This API returns credentials for connecting to the MQTT broker and stores the initial network configuration. We don't recommend using this API directly.

Management (advanced)

Execute commands directly on the network's access point, or on a mesh node. We recommend using the NOC Management Page for these actions.

Debug (advanced)

Debug endpoints, for internal use only.

Application Settings (advanced)

The application settings API allows users to create, update, delete, and retrieve configurations based on network ID.

Download OpenAPI description
Languages
Servers
Mock server

https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/

Network Settings

Operations

Motion History

Operations

Live Motion

Operations

Events

Operations

Network Status

Operations

Network Meta

Operations

Location Data

Operations

Find

Operations

Config

Operations

Node

Operations

Gatekeeper

Operations

Management

Operations

Debug

Operations

Insights

Operations

Insights v2

Operations

Universal Alerting

Operations

Get Universal Alert Status

Request

Returns an array of all alerts associated with the network, but from the view of the job queue, including all the internal state of the job.

The data field of this response contains the client facing alert alert model. This endpoint is to assist with seeing the internals of the job queue.

Query
network_idintegerrequired

Unique identifier of the network whose configuration should be managed

curl -i -X GET \
  'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/api/v1/universal-alert/status?network_id=0'

Responses

200 - OK

Bodyapplication/json
alertsArray of objects
Example: [{"id":"14","data":{"uuid":"eecc4727-707d-48f2-b5e4-3c6aa6745aec","enabled":true,"alert_name":"Preset Rise and Shine","external_id":14,"rrule":"DTSTART;TZID=Europe/London:20220101T080000\r\nRRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR,SA,SU\r\n","monitor":{"monitor_mode":"SIMPLE","duration_minutes":120},"meta":{"alert_type":"RISE_AND_SHINE_PRESET"},"analytics_tag":"riseAndShinePreset","no_motion_actions":[{"action":"fcm_push","payload":{"data":{"title":"Rise and Shine","body":"Your loved one has not begun their day","click_action":"CustomAlertEvent","sound":"Aura_Push_Final.wav"},"apns":{"headers":{"apns-push-type":"alert","apns-topic":"com.csc.HaloHome"},"payload":{"aps":{"alert":{"title":"Rise and Shine","body":"Your loved one has not begun their day"},"sound":"Aura_Push_Final.wav","category":"CustomAlertEvent"}}}},"user_ids":[]},{"action":"custom_event","payload":{"data":{"title":"Rise and Shine","body":"Your loved one has not begun their day"}},"user_ids":[]}],"motion_actions":[{"action":"fcm_push","payload":{"data":{"title":"Rise and Shine","body":"Your loved one has begun their day","click_action":"CustomAlertEvent","sound":"Aura_Push_Final.wav"},"apns":{"headers":{"apns-push-type":"alert","apns-topic":"com.csc.HaloHome"},"payload":{"aps":{"alert":{"title":"Rise and Shine","body":"Your loved one has begun their day"},"sound":"Aura_Push_Final.wav","category":"CustomAlertEvent"}}}},"user_ids":[]},{"action":"custom_event","payload":{"data":{"title":"Rise and Shine","body":"Your loved one has begun their day"}},"user_ids":[]}],"unknown_actions":[{"action":"fcm_push","payload":{"data":{"title":"Rise and Shine","body":"Caregiver Aware could not determine motion in your home","click_action":"CustomAlertEvent","sound":"Aura_Push_Final.wav"},"apns":{"headers":{"apns-push-type":"alert","apns-topic":"com.csc.HaloHome"},"payload":{"aps":{"alert":{"title":"Rise and Shine","body":"Caregiver Aware could not determine motion in your home"},"sound":"Aura_Push_Final.wav","category":"CustomAlertEvent"}}}},"user_ids":[]},{"action":"custom_event","payload":{"data":{"title":"Rise and Shine","body":"Caregiver Aware could not determine motion in your home"}},"user_ids":[]}],"error_actions":[],"timezone":"Europe/London","target":"3/10/2022, 8:00:00 AM - Europe/London","window_end":1646899200000},"progress":0,"attemptsMade":0,"status":"delayed","stacktrace":[],"timestamp":1646861001684,"processingTime":0,"name":"__default__","opts":{"timeout":3000,"attempts":3,"removeOnComplete":true,"delay":38198317,"timestamp":1646861001684},"delay":38198317}]
Response
application/json
{ "alerts": [ {} ] }

Get universal alert

Request

Get a single alert by its uuid.

Path
uuidstring>= 1required
Query
network_idintegerrequired

Unique identifier of the network whose configuration should be managed

curl -i -X GET \
  'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/api/v1/universal-alert/{uuid}?network_id=0'

Responses

OK

Bodyapplication/json
idstring

internal unique identifier of the alert

Example: 2255
enabledbooleanrequired

the active status of the alert

Example: true
targetstring

Date string of next notification

Example: "2021-12-13T16:00:00.000+00:00"
timezonestring
Example: "America/New_York"
alert_namestring
Example: "client decided label"
rrulestring
Example: "DTSTART;TZID=America/New_York:20211201T163000\nRRULE:FREQ=WEEKLY;COUNT=30;INTERVAL=1;WKST=MO"
monitorobject
Example: {"monitor_mode":"INACTIVITY","duration_minutes":10,"inactive_minutes":2,"repeat_monitoring":true}
metaobject
Example: {"anything":"client controlled writable space"}
analytics_tagstring
Example: "caregiver_alert_trace"
no_motion_actionsArray of objects(Root Type for POST_universal_alerts_actions)
Example: [{"action":"fcm_push","user_ids":[5,9],"payload":{"apns":{"headers":{"apns-push-type":"alert","apns-topic":"com.csc.HaloHome"},"payload":{"aps":{"alert":{"title":"no motion","body":"123"},"sound":"Aura_Push_Final.wav","category":"User"}}}}}]
motion_actionsArray of objects(Root Type for POST_universal_alerts_actions)
Example: [{"action":"fcm_push","payload":{"data":{"click_action":"CustomAlertEvent","title":"NO Motion Ua","body":"No Motion was detected during Now","sound":"Aura_Push_Final.wav"},"apns":{"headers":{"apns-push-type":"alert","apns-topic":"com.csc.HaloHome"},"payload":{"aps":{"alert":{"title":"motion","body":"123"},"sound":"Aura_Push_Final.wav","category":"User"}}}}}]
unknown_actionsArray of objects(Root Type for POST_universal_alerts_actions)
Example: []
error_actionsArray of objects(Root Type for POST_universal_alerts_actions)
Example: []
uuidstring

Unique id

Example: "Unique alert identifier"
external_idstring

External network id

window_endnumber
window_startinteger

Timestamp showing when monitoring will start

created_atinteger

Alert creation timestamp

next_runany

Timestamp of the next alert trigger. Can be used to monitor the execution of alerts inside the inactivity window.

Response
application/json
{ "uuid": "Unique alert identifier", "enabled": true, "target": "2021-12-13T16:00:00.000+00:00", "timezone": "America/New_York", "alert_name": "client decided label", "rrule": "DTSTART;TZID=America/New_York:20211201T163000\nRRULE:FREQ=WEEKLY;COUNT=30;INTERVAL=1;WKST=MO", "monitor": { "monitor_mode": "INACTIVITY", "duration_minutes": 10, "inactive_minutes": 2, "repeat_monitoring": true }, "meta": { "anything": "client controlled writable space" }, "analytics_tag": "caregiver_alert_trace", "no_motion_actions": [ {} ], "motion_actions": [ {} ], "unknown_actions": [], "error_actions": [], "id": 2255 }

Delete Universal Alert

Request

Deletes an alert by its uuid.

A successful delete will return the entire alert model.

Only the alerts owned by the network can be deleted. And these alerts can be deleted by both member or owner.

Path
uuidstring>= 1required
Query
network_idintegerrequired

Unique identifier of the network whose configuration should be managed

curl -i -X DELETE \
  'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/api/v1/universal-alert/{uuid}?network_id=0'

Responses

201 - Created

Bodyapplication/json
uuidstring
Example: "a93a9c7d-ce5e-4ec7-be6f-8795c68c1930"
enabledboolean
Example: true
alert_namestring
Example: "Outing"
external_idinteger
Example: 14
rrulestring
Example: "DTSTART;TZID=America/New_York:20220318T200000\nRRULE:FREQ=WEEKLY;COUNT=1;INTERVAL=1;WKST=MO"
monitorobject
Example: {"monitor_mode":"SIMPLE","duration_minutes":120}
metaobject
Example: {"alert_type":"OUTING_PRESET"}
analytics_tagstring
Example: "outingsPreset"
no_motion_actionsArray of objects
Example: [{"action":"fcm_push","payload":{"data":{"title":"Friday Bowling","body":"No motion at home 6pm - 8pm","click_action":"CustomAlertEvent","sound":"Aura_Push_Final.wav"},"apns":{"headers":{"apns-push-type":"alert","apns-topic":"com.csc.HaloHome"},"payload":{"aps":{"alert":{"title":"Friday Bowling","body":"No motion at home from 6pm - 8pm"},"sound":"Aura_Push_Final.wav","category":"CustomAlertEvent"}}}},"user_ids":[]},{"action":"custom_event","payload":{"data":{"title":"Friday Bowling","body":"No motion at home from 6pm - 8pm"}},"user_ids":[]}]
motion_actionsArray of objects
Example: [{"action":"fcm_push","payload":{"data":{"title":"Friday Bowling","body":"Your loved one stayed home","click_action":"CustomAlertEvent","sound":"Aura_Push_Final.wav"},"apns":{"headers":{"apns-push-type":"alert","apns-topic":"com.csc.HaloHome"},"payload":{"aps":{"alert":{"title":"Friday Bowling","body":"Your loved one stayed home"},"sound":"Aura_Push_Final.wav","category":"CustomAlertEvent"}}}},"user_ids":[]},{"action":"custom_event","payload":{"data":{"title":"Friday Bowling","body":"Your loved one stayed home"}},"user_ids":[]}]
unknown_actionsArray of objects
Example: [{"action":"fcm_push","payload":{"data":{"title":"Friday Bowling","body":"Caregiver Aware could not determine motion in the home","click_action":"CustomAlertEvent","sound":"Aura_Push_Final.wav"},"apns":{"headers":{"apns-push-type":"alert","apns-topic":"com.csc.HaloHome"},"payload":{"aps":{"alert":{"title":"Friday Bowling","body":"Caregiver Aware could not determine motion in the home"},"sound":"Aura_Push_Final.wav","category":"CustomAlertEvent"}}}},"user_ids":[]},{"action":"custom_event","payload":{"data":{"title":"Friday Bowling","body":"Caregiver Aware could not determine motion in the home"}},"user_ids":[]}]
error_actionsArray of any
Example: []
timezonestring
Example: "America/New_York"
targetstring
Example: "3/18/2022, 8:00:00 PM - America/New_York"
window_endinteger
Example: 1647648000000
idobject(null)
Response
application/json
{ "uuid": "a93a9c7d-ce5e-4ec7-be6f-8795c68c1930", "enabled": true, "alert_name": "Outing", "external_id": 14, "rrule": "DTSTART;TZID=America/New_York:20220318T200000\nRRULE:FREQ=WEEKLY;COUNT=1;INTERVAL=1;WKST=MO", "monitor": { "monitor_mode": "SIMPLE", "duration_minutes": 120 }, "meta": { "alert_type": "OUTING_PRESET" }, "analytics_tag": "outingsPreset", "no_motion_actions": [ {}, {} ], "motion_actions": [ {}, {} ], "unknown_actions": [ {}, {} ], "error_actions": [], "timezone": "America/New_York", "target": "3/18/2022, 8:00:00 PM - America/New_York", "window_end": 1647648000000 }

Application Settings

Operations