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

Network motion-state history

Request

Retrieve time series array of motion-state values across the whole network.

Path
network_idintegerrequired

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

Query
frominteger

UTC timestamp in seconds

tointeger

UTC timestamp in seconds, defaults to current time

bucketinteger

Size of data series buckets returned in seconds

Default 3600
curl -i -X GET \
  'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/network/{network_id}/motion/history/state?bucket=3600&from=0&to=0'

Responses

200 - OK

State values indicate the following:

  • 0 Not armed and not tripped

  • 1 Not armed and tripped

  • 2 Armed and not tripped

  • 3 Armed and tripped

Bodyapplication/jsonArray [Array [
integer or null(State)

Date and time in Epoch format

Enum0123
]]
Response
application/json
[ [ 0, 1709316000 ], [ 1, 1709319600 ], [ 1, 1709323200 ], [ 2, 1709326800 ], [ 3, 1709330400 ], [ 4, 1709334000 ] ]

Network motion-intensity history

Request

Retrieve time series array of motion-intensity values across the whole network

Path
network_idintegerrequired

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

Query
frominteger

UTC timestamp in seconds

tointeger

UTC timestamp in seconds

bucketinteger

Side of data series buckets return in seconds

sumfuncstring

Summary function used to aggregate data when bucket size exceeds storage resolution (5sec).

Default "max"
Enum"max""min""avg"
curl -i -X GET \
  'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/network/{network_id}/motion/history/intensity?bucket=0&from=0&sumfunc=max&to=0'

Responses

OK

Bodyapplication/jsonArray [Array [
Any of:
number(timestamp)
]]
Response
application/json
[ [ [ … ], [ … ], [ … ], [ … ], [ … ], [ … ] ] ]

Network motion-density history

Request

Retrieve time series array of motion-density values across the whole network.

Path
network_idintegerrequired

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

Query
frominteger

The UTC timestamp of the oldest report client already has in seconds

tointeger

The UTC timestamp of the latest report client is interested in, current time will be used if not provided

bucketinteger

The number of seconds in density calculation window; returned data points represent % of non-zero intensity values in the window.

Default 3600
curl -i -X GET \
  'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/network/{network_id}/motion/history/density?bucket=3600&from=0&to=0'

Responses

OK

Bodyapplication/jsonArray [Array [
Any of:
number(timestamp)
]]
Response
application/json
[ [ [ … ], [ … ], [ … ], [ … ], [ … ], [ … ] ] ]

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

Application Settings

Operations