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 topology

Request

Path
network_idintegerrequired

Motion Network ID (returned as 'id' by Find API calls)

Query
offlineboolean

When true, returns offline devices (they will have online=false in their device description).

Default false
curl -i -X GET \
  'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/network/{network_id}/topology?offline=false'

Responses

OK

Bodyapplication/json
tsnumber(float)

UTC timestamp report was produced

devicesArray of objects(TopologyDevice)required

Device list

devices[].​idinteger

Unique device identifier

devices[].​namestring

Device identifier

devices[].​ipstring

Device local IP

devices[].​is_mesh_soundingboolean

Boolean if device is mesh sounding

devices[].​friendly_namestring

Device friendly name

devices[].​node_namestring

Name of AP this device is connected to

devices[].​locationstring

Device location

devices[].​typestring(TopologyDeviceType)
Enum"MESH_ROOT""MESH_NODE""LEAF""CLIENT"
devices[].​device_infoobject(Root Type for DeviceInfo)

Device info record

Example: {"device_type":"Google Streaming Dongle Chromecast","hostname":"Google-Home-Mini","mac":"f0:ef:86:63:03:73"}
devices[].​hw_platformstring

Device hardware platform

devices[].​macsArray of strings(MachineAddress)

List of MACs belonging to this device

devices[].​iconstring
Enum"DEFAULT""ORBI""GWIFI""NEST""TPLINK""LEAF"
devices[].​onlineboolean

true if the device is currently online

devices[].​mobileboolean

true if the device is presumed mobile

devices[].​is_staticstring

Link fixed vs mobile detection state

Enum"UNKNOWN""MOBILE""STATIC_NEW""STATIC"
devices[].​tx_enablestring

Keys are leaf macs, value is: "" - automatic sounding "1" - sounding forced enabled "0" - disabled

devices[].​sounding_statestring(LinkSoundingState)

Link sounding state

Enum"NONE""ACTIVE""SNEAKY"
linksArray of objects(TopologyLink)required

Device interconnect

links[].​src_idinteger

Unique device identifier of link source

links[].​dst_idinteger

Unique device identifier of link destination

links[].​motion_enabledboolean
links[].​detailobject(RadarNetworkLink)
links[].​sounding_statestring(LinkSoundingState)

Link sounding state

Enum"NONE""ACTIVE""SNEAKY"
Response
application/json
{ "ts": 0.1, "devices": [ { … } ], "links": [ { … } ] }

Delete network

Request

Path
network_idintegerrequired

Motion Network ID (returned as 'id' by Find API calls)

Query
annihilateboolean

If true, all nodes belonging to this network will also be deleted.

curl -i -X DELETE \
  'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/network/{network_id}/edit?annihilate=true'

Responses

OK.

Network status

Request

Returns the most recent GuardianStatusReport from the network.

Path
network_idintegerrequired

Motion Network ID (returned as 'id' by Find API calls)

Query
keystring

Comma seperated list of keys to filter response on

curl -i -X GET \
  'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/network/{network_id}/status?key=string'

Responses

OK.

Bodyapplication/json
leafblowerobject

Leafblower Link Stats object, key is mac address

network_idinteger

Network numeric ID

shard_idstring

Network shard

radarsobject

map of radar id to radar status reports

tsnumber(float)required

UTC timestamp

last_motionnumber or null(float)

UTC timestamp of last motion refresh time

motion_trippedinteger

Motion detector current state (1 - tripped, 0 - no motion)

startupboolean

Is this the first report after startup

versionobject

Component version inside Guardian

healthobject

network and radar health

capabilitiesArray of strings

(alpha) list of device capabilities to unlock specify cloud options

coverageobject

Leafblower room coverage per node, key is node id, value is coverage array

guardian_idstring

Network guardian_id

dhcpobject

map of dhcp mac address and dhcp stats object - fused across all AP

motion_enabledinteger

Motion event generation state (1 - on, 0 - off)

armedinteger

Motion armed state (1 - on, 0 - off)

Response
application/json
{ "leafblower": { "property1": { … }, "property2": { … } }, "network_id": 0, "shard_id": "string", "radars": { "property1": { … }, "property2": { … } }, "ts": 0.1, "last_motion": 0.1, "motion_tripped": 0, "startup": true, "version": { "property1": "string", "property2": "string" }, "health": { "nodes": { … }, "network": 0 }, "capabilities": [ "string" ], "coverage": { "property1": [ … ], "property2": [ … ] }, "guardian_id": "string", "dhcp": { "property1": { … }, "property2": { … } }, "motion_enabled": 0, "armed": 0 }

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

Application Settings

Operations