Skip to content

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. The only difference is that the Core APIs do not specifically reference a user, and instead provide you with the ability to query the data from any network that is available in the environment.

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

Event tagging

Request

Adds a string based tag to an event. Tags greater than 10 characters are truncated.

Security
ApiKey
Path
network_idintegerrequired

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

Query
eventidstring
tagstring
curl -i -X POST \
  'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/network/{network_id}/events/tag?eventid=string&tag=string' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

Event stored OK

Bodyapplication/json
_idstring

Event uuid (for tagging)

categorystringrequired

Event category (for filtering)

Enum"Link""Network""Motion""System"
locArray of any

Event location

detailobject

Event detail k/v pairs

link_dst_namestring

Link destination friendly name

network_idintegerrequired

Guardian network_id

tsnumber(float)required

UTC timestamp

evt_detected_tsnumber(float)

Present in MotionStoppedEvent. References the UTC timestamp of preceding MotionDetectedEvent.

intensity_windowArray of numbers(float)

Array of float, of length guardian_config.motion_events.density_window -1 (Nominally len 7). Corresponds to the motion intensity values in the integration buffer at the time of the DetectedEvent.

link_idstring(LinkId)

DST_MAC-SRC_MAC using 3 lsbs of each address and without the colons. Ex: 001122-001133

loc_namestring

First location friendly name

tagstring

Event tag. Note that this field is always space-padded to 10 characters.

link_src_namestring

Link source friendly name

guardian_idstringrequired

Guardian deviceId

node_idinteger

Database id of this node that generate the event

deviceIdstring

Device identification, such as mac address

node_namestring

Alternative device identification, that can be used by vendor from deviceId

debugobject(Root Type for MotionStoppedEventDebug)

Motion detection parameters from event generator. Used for debug and sensitivity calibration purposes. Present in MotionStoppedEvent on newer firmware.

Example: {"linkSens":{},"msad":[187.22],"links":["4C72900A6B.30894ab76326"],"mconf":[80],"sens":1}
armedinteger

Feedback of armed from GuardianConfig.motion_events

If 0, this event will not be stored in history or pushed to the user.

eventstringrequired

Event identifier

Enum"MotionDetectedEvent""MotionStoppedEvent""LinkConnectedEvent""LinkDisconnectedEvent""LinkLowThroughputEvent""LinkCreatedEvent""MemberArrivedEvent""MemberLeftEvent""MemberJoinedEvent""MemberRemovedEvent"
_consumerstring

The consumer for Custom Alerts.

dataobject

Data from Custom Alerts.

Response
application/json
{ "_id": "string", "category": "Link", "loc": [ null ], "detail": { "property1": "string", "property2": "string" }, "link_dst_name": "string", "network_id": 0, "ts": 0.1, "evt_detected_ts": 0.1, "intensity_window": [ 0.1 ], "link_id": "string", "loc_name": "string", "tag": "string", "link_src_name": "string", "guardian_id": "string", "node_id": 0, "deviceId": "string", "node_name": "string", "debug": { "linkSens": {}, "msad": [ … ], "links": [ … ], "mconf": [ … ], "sens": 1 }, "armed": 0, "event": "MotionDetectedEvent", "_consumer": "string", "data": { "title": "string", "uuid": "string", "id": 0, "first_name": "string", "last_name": "string", "sub": "string", "user": { … } } }

Event creation

Request

Creates a new event, which must have all fields in the event schema populated. Note that the tag attribute will be ignored if provided. Tags can be applied after the event has been created.

Security
ApiKey
Path
network_idintegerrequired

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

Bodyapplication/json
tsnumber(float)required

UTC timestamp

guardian_idstring

Guardian deviceId

network_idintegerrequired

Guardian network_id

categorystringrequired

Event category (for filtering)

Enum"Link""Network""Motion""System""User""Device""Internal"
eventstringrequired

Event identifier

Enum"MotionDetectedEvent""MotionStoppedEvent""LinkConnectedEvent""LinkDisconnectedEvent""LinkLowThroughputEvent""LinkCreatedEvent""MemberArrivedEvent""MemberLeftEvent""MemberJoinedEvent""MemberRemovedEvent"
deviceIdstring

Device identification, such as mac address

curl -i -X POST \
  'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/network/{network_id}/events/create' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "ts": 0.1,
    "guardian_id": "string",
    "network_id": 0,
    "category": "Link",
    "event": "MotionDetectedEvent",
    "deviceId": "string"
  }'

Responses

Event stored OK

Motion event pairs

Request

Fetch motion event pairs, which will be a pair of MotionDetectedEvent and MotionStoppedEvent events.

Security
ApiKey
Path
network_idintegerrequired

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

Query
frominteger

UTC timestamp

tointeger

UTC timestamp.

lastinteger

n events to pair from. Defaults to 50.

curl -i -X GET \
  'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/network/{network_id}/events/pairs?from=0&to=0&last=0' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/json
pairsArray of objects(Root Type for MotionEventPair)

Array of MotionDetectedEvent & MotionStoppedEvent pairs.

Example: [{"_id":"64adc55a8d4288001b9c8e34.64adc5508d4288001b9c8e31","event":"MotionEventPair","ts":1699112349,"guardian_id":"5dc5cfe59b12797e2e3e362f","link_id":"4C72900A6B.30894ab76326","intensity_window":[0.3,0.56,0.43,0.27,0.13,0,0.04],"loc_name":"","link_dst_name":"4C72900A6B","link_src_name":"30894ab76326","evt_detected_ts":1689109839,"evt_stopped_ts":1689109850,"debug":{"linkSens":{},"msad":[187.22],"links":["4C72900A6B.30894ab76326"],"mconf":[80],"sens":1},"network_id":156,"tag":" "}]
statusnumber

Integer showing success code of pairing. 0 means complete failure, 1 means success, 2 means partial success.

failuresArray of objects(Root Type for MotionEventPairFailure)

Array of pairing failures.

Example: [{"_id":"64de6bbde5b9e4001b6aafba","event":"MotionDetectedEvent","ts":1692298172.06,"failed_reason":"\"mconf\" must contain at least 1 items"}]
Response
application/json
{ "pairs": [ { … } ], "status": 0, "failures": [ { … } ] }

Insights v2

Operations

Universal Alerting

Operations

Network Status

Operations

Network Meta

Operations

Location Data

Operations

Find

Operations

Application Settings

Operations

Config

Operations

Node

Operations

Management

Operations