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:
The live motion API opens a web socket and triggers the network to emit recorded motion at a 500ms interval.
High-level APIs for retrieving the network's topology, last status message, or to view or modify the network's metadata.
The location data APIs expose localized motion data. Localization happens on a per mac, or custom location name base.
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.
APIs of the internal Home Insights Microservice. Used for motion-based activity and sleep insights.
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.
Interface to manage the access point or mesh nodes of a network. Provides APIs to find, delete or alter the configuration of nodes.
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.
Execute commands directly on the network's access point, or on a mesh node. We recommend using the NOC Management Page for these actions.
https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/
Note: You will have to urlencode the query string here, use the library provided by your runtime.
Example queries where 'val' is a partial string match (use % as wildcard char):
meta->>'guardian_env'
(this will match the guardian_env key of the network meta blob)
meta->'dwm'->>'systemName'
(this will match the systemName key of the dwm object in the network meta blob)
Example query checking for existence of a field (omit val to directly execute):
meta->'dwm' \\? 'systemName'
https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/network/find/meta/{query}
curl -i -X GET \
'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/network/find/meta/{query}?array=false&expandNodes=false&val=string'
[ { "last_guardian_status": { … }, "radar_config": { … }, "guardian_config": { … }, "created_at": 0.1, "updated_at": 0.1, "guardian_id": "string", "last_heard": 0.1, "meta": { … }, "master_node_id": 0, "shard_id": 0, "guardian_type": "string", "disconnected_at": 0.1, "nodes": [ … ], "id": 0, "connection_status": true, "connection_report": { … }, "device_info": { … } } ]
https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/network/find/device/{guardian_deviceid}
curl -i -X GET \
'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/network/find/device/{guardian_deviceid}?array=false&expandNodes=false'
[ { "last_guardian_status": { … }, "radar_config": { … }, "guardian_config": { … }, "created_at": 0.1, "updated_at": 0.1, "guardian_id": "string", "last_heard": 0.1, "meta": { … }, "master_node_id": 0, "shard_id": 0, "guardian_type": "string", "disconnected_at": 0.1, "nodes": [ … ], "id": 0, "connection_status": true, "connection_report": { … }, "device_info": { … } } ]
Determines the current position of the pagination cursor. When used, the resulting return set will contain networks whose network id's are greater (non-inclusive) then the value provided. If combined with a order
value of "desc" the return will be networks whose ids are less then (non-inclusive) the value provided.
A value of -1 (Default) will return the start or end of the dataset depending on the value of the order
parameter
If true, will also return an array of all nodes belonging to this network under the 'nodes' key.
https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/network/find/all/all
curl -i -X GET \
'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/network/find/all/all?count=10&expandNodes=false&lastId=-1&order=asc'
[ { "last_guardian_status": { … }, "radar_config": { … }, "guardian_config": { … }, "created_at": 0.1, "updated_at": 0.1, "guardian_id": "string", "last_heard": 0.1, "meta": { … }, "master_node_id": 0, "shard_id": 0, "guardian_type": "string", "disconnected_at": 0.1, "nodes": [ … ], "id": 0, "connection_status": true, "connection_report": { … }, "device_info": { … } } ]