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

Motion History Calendar

Request

Provides a calendar view showing which days had motion activity over a specified period.

Security
ApiKey
Path
network_idintegerrequired

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

Query
timeTointegerrequired

Epoch timestamp (in seconds) for the reference point

historyDaysinteger

Number of days to look back from the reference point

Default 30
curl -i -X GET \
  'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/network/{network_id}/motion/history/calendar?historyDays=30&timeTo=0' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

200 OK

Bodyapplication/jsonArray [
One of:
timestampinteger(Timestamp)

Epoch timestamp of when the motion was detected

isPetMotionboolean(isPetMotion)

Identifies if there was low-motion activity detected. For example, motion caused by a pet.

isUnknownMotionboolean(isUnknownMotion)

Identifies if the detected motion was considered to be Unknown Motion. For example, motion caused by humans.

]
Response
application/json
[ { "timestamp": 1703980800, "isPetMotion": true, "isUnknownMotion": false } ]

Motion History Data

Request

Returns detailed motion blocks with location information and device data.

Notes regarding implementation:

  • Always use the id field as the primary device identifier.

  • If mac, location, or friendly_name fields are missing, default to the id value.

By implementing this optimization, you will reduce the response size by eliminating redundant data and restructures from the previous state_blocks endpoint.

Security
ApiKey
Path
network_idintegerrequired

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

Query
frominteger

Start time as epoch timestamp. Defaults to the current time minus 1 hour in epoch format.

tointeger

End time as epoch timestamp. Defaults to current time in epoch format.

density_bucketinteger

Bucket size in seconds for density calculations.

Default 120
state_bucketinteger

Bucket size in seconds for state calculations

Default 1800
statesArray of integers

Array of Motion States to include.

  • 2 Low Motion

  • 3 Unknown Motion

Default [3]
verbose_formatboolean

Adjust the formatting of the response data.

  • true Verbose format.

  • false Regular format.

Default false
curl -i -X GET \
  'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/network/{network_id}/motion/history/data?density_bucket=120&from=0&state_bucket=1800&states=3&to=0&verbose_format=false' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

200 OK

Bodyapplication/jsonArray [
One of:

Verbose set to False

devicesArray of objects(Devices)

Array of device information involved in the motion. Each device object in the devices array follows an optimized structure:

  • id field is always present and contains the primary device identifier.

  • mac, location, and friendly_name fields are only included when:

    • They have valid (non-null) values; AND

    • They differ from the id value.

startinteger

Motion block start time in epoch format.

stopinteger

Motion block end time in epoch format.

stateinteger

Motion State.

  • 2 Low motion detected.

  • 3 Unknown motion detected.

typestring

petMotion Indicates that low motion activity was detected.

unknownMotion Indicates that motion was detected.

motion_segmentsArray of objects

Detailed timing segments within the block.

]
Response
application/json
[ { "devices": [ … ], "start": 1704067800, "stop": 1704068400, "state": 2, "type": "petMotion", "motion_segments": [ … ] } ]

Network motion-state history

Request

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

Security
ApiKey
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' \
  -H 'Authorization: YOUR_API_KEY_HERE'

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 ] ]

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

Gatekeeper

Operations

Management

Operations

Debug

Operations

Insights (Deprecated)

Operations