The WiFi Motion Core 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.
Cognitive Systems App Core API
- Mock server
https://docs.cognitivesystems.com/_mock/assets/specs/api/core/network/{network_id}/motion/history/calendar
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.cognitivesystems.com/_mock/assets/specs/api/core/network/{network_id}/motion/history/calendar?timeTo=0&historyDays=30' \
-H 'Authorization: YOUR_API_KEY_HERE'
[ { "timestamp": 1703980800, "isPetMotion": true, "isUnknownMotion": false } ]
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.
- Mock server
https://docs.cognitivesystems.com/_mock/assets/specs/api/core/network/{network_id}/motion/history/data
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.cognitivesystems.com/_mock/assets/specs/api/core/network/{network_id}/motion/history/data?from=0&to=0&density_bucket=120&state_bucket=1800&states=3&verbose_format=false' \
-H 'Authorization: YOUR_API_KEY_HERE'
200 OK
Verbose set to False
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.
petMotion
Indicates that low motion activity was detected.
unknownMotion
Indicates that motion was detected.
[ { "devices": [ … ], "start": 1704067800, "stop": 1704068400, "state": 2, "type": "petMotion", "motion_segments": [ … ] } ]
- Mock server
https://docs.cognitivesystems.com/_mock/assets/specs/api/core/network/{network_id}/motion/history/state
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.cognitivesystems.com/_mock/assets/specs/api/core/network/{network_id}/motion/history/state?from=0&to=0&bucket=3600' \
-H 'Authorization: YOUR_API_KEY_HERE'
200 - OK
State values indicate the following:
0
Not armed and not tripped1
Not armed and tripped2
Armed and not tripped3
Armed and tripped
State values indicate the following:
0
Not armed and not tripped1
Not armed and tripped2
Armed and not tripped3
Armed and tripped
[ [ 0, 1709316000 ], [ 1, 1709319600 ], [ 1, 1709323200 ], [ 2, 1709326800 ], [ 3, 1709330400 ], [ 4, 1709334000 ] ]