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

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

Execute management command

Request

Security
ApiKey
Query
idinteger

id of action to (re-)execute

curl -i -X POST \
  'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/manage/execute?id=0' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

OK.

Bodyapplication/json
successbooleanrequired

false if the command could not be executed

messagestring

Reason for failure

statusinteger

New status of specified command

Response
application/json
{ "success": true, "message": "string", "status": 0 }

List management commands

Request

Security
ApiKey
Query
idinteger

Query by action ID

node_idinteger

Query by node

network_idinteger

Query by network

batch_idinteger

Query by batch_id

trigger_idinteger

Query by trigger_id

countinteger

Maximum number of entries to return

Default 10
curl -i -X GET \
  'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/manage/list?id=0&node_id=0&network_id=0&batch_id=0&trigger_id=0&count=10' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

200 - OK

Bodyapplication/jsonArray [
network_idinteger

Target node's network_id

created_atnumber

Timestamp the action was created at

updated_atnumber

Timestamp the action was last updated

trigger_idinteger or nullrequired

If not null, the execution of this action will be delayed until this trigger action has completed successfully (status=2xx).

If the trigger action fails (status=4xx), this action will fail with the same status.

payloadobjectrequired
payload.​property name*stringadditional property
stateinteger

000 - Pending start

001 - Waiting for action with trigger_id

002 - Waiting for device to come online

01x - Command was attempted "x" times

100 - Device acknowledged, action started

1xx - command_id specific progress codes

200 - Completed (Success)

4xx - Completed (Failed)

node_idintegerrequired

Target node ID

batch_idinteger or null

Optional batch group identifier for this action. If null then websocket-based monitoring of this action will not be possible.

responseobject
idinteger

Auto-generated action ID

command_idintegerrequired

0 - system_exec

1 - factory_reset

2 - firmware_update

3 - reboot

]
Response
application/json
[ { "network_id": 0, "created_at": 0, "updated_at": 0, "trigger_id": 0, "payload": { … }, "state": 0, "node_id": 0, "batch_id": 0, "response": { … }, "id": 0, "command_id": 0 } ]

Create a batch

Request

A batch is a group of related management commands that can be monitored using a single WebSocket.

Security
ApiKey
curl -i -X POST \
  https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/manage/batch \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

OK.

Bodyapplication/json
batch_idinteger

Newly created batch_id

Response
application/json
{ "batch_id": 0 }