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 for a specific day

Request

Retrieves motion events for a specific day with detailed timing information.

Security
ApiKey
Path
network_idintegerrequired

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

Query
timeTointegerrequired

Epoch timestamp (in seconds) representing the target day

bucketinteger

Bucket size in minutes for grouping motion events

Default 15
bufferinteger

Buffer time in hours to extend the search window

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

Responses

200 OK

Bodyapplication/jsonArray [
Any of:
typestring(Type)

Motion Type. Can be one of the following:

  • petMotion

  • unknownMotion

startinteger(Start)

Epoch timestamp when motion started

stopinteger(Stop)

Epoch timestamp when motion ended

]
Response
application/json
[ { "type": "petMotion", "start": 1704067800, "stop": 1704068400 } ]

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": [ … ] } ]

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