Skip to content

Cognitive Systems App Core API

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.

Download OpenAPI description
Languages
Servers
Mock server

https://docs.cognitivesystems.com/_mock/assets/specs/api/core/

Operations
Operations

Request

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

Security
ApiKey
Path
network_idintegerrequired

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

Query
frominteger

The UTC timestamp of the oldest report client already has in seconds

tointeger

The UTC timestamp of the latest report client is interested in, current time will be used if not provided

bucketinteger

The number of seconds in density calculation window; returned data points represent % of non-zero intensity values in the window.

Default 3600
curl -i -X GET \
  'https://docs.cognitivesystems.com/_mock/assets/specs/api/core/network/{network_id}/motion/history/density?from=0&to=0&bucket=3600' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/jsonArray [Array [
Any of:
number(timestamp)
]]
Response
application/json
[ [ [ … ], [ … ], [ … ], [ … ], [ … ], [ … ] ] ]

Request

Security
ApiKey
Path
network_idintegerrequired

Motion Network ID

Query
frominteger

UTC unix timestamp to search motion from.

tointeger

UTC unix timestamp to query motion until.

density_bucketinteger>= 5

Bucket size of the returned motion block segments in seconds.

Default 120
state_bucketinteger>= 5

Bucket size for motion state values. Larger sizes will tend to ignore shorter periods of lesser states.

Default 1800
statesinteger

Which states to include, values are any combination of [0,1,2,3]. Response will return blocks of single state, i.e. continuous motion while moving from 2 to 3, will result in motion blocks for 2 and for 3 individually. Default is [2].

Enum0123
curl -i -X GET \
  'https://docs.cognitivesystems.com/_mock/assets/specs/api/core/network/{network_id}/motion/history/state_blocks?from=0&to=0&density_bucket=120&state_bucket=1800&states=0' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

Returns any array of motion blocks. Each block summarizes locations and devices seen, as well as the time range and motion_state of the block. For each density_bucket sized time period, a breakdown of location and density is listed. The breakdown is captured in three parallel lists of locations, devices and densities. Friendly names for locations and devices are used when available, defaulting to MAC addresses (without the ":" when not available.

Bodyapplication/jsonArray [
devicesArray of strings
location_historyArray of objects
locationsArray of strings
startinteger
stateinteger
stopinteger
]
Response
application/json
[ { "devices": [ … ], "location_history": [ … ], "locations": [ … ], "start": 1708632120, "state": 0, "stop": 1708632960 } ]
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations