Table of Contents | ||||
---|---|---|---|---|
|
Links to documentation
Development: https://devicefinder.dev.api.nwave.io/docs/openapi#/
Production: https://devicefinder.prod.api.nwave.io/docs/openapi#/
Authorization
In order to authorize with this API, you need to provide the authorization token in the X-Auth-Token header. Details on obtaining the token are available here: https://nwaveio.atlassian.net/wiki/spaces/ND/pages/1864761385/REST+Occupancy+API#Authorization
Endpoints
/find_nearby_devices
This endpoint retrieves device information and returns a summary of advertisings for each device.
Advertising summary includes average rssi, number of advertisings and the last advertising time.
Request:
Code Block | ||
---|---|---|
| ||
{ "advertising_packets": [ { "rssi": 0, "msd": "string", "time": "2021-09-21T16:57:04.601Z" } ] } |
rssi: stands for Received Signal Strength Indicator. This is an integer value that is less than 0 that represents signal strength of the received advertising packet.
msd: stands for Manufacturer Specific Data. This is a string that should start with 5710.
time: iso8601 timestamp of receiving the advertising packet reception.
Response:
Code Block | ||
---|---|---|
| ||
{ "devices": [ { "device_id": "string", "network_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "lat": 0, "lon": 0, "labels": [ "string" ], "custom_id": "string", "group_id": 0, "group_name": "string", "group_custom_id": "string", "level_id": 0, "level_name": "string", "floor_number": 0, "zone_id": 0, "zone_name": "string", "project_id": 0, "project_name": "string", "damaged": true, "occupied": true, "status_duration": 0, "time": "2021-09-21T16:57:04.604Z", "average_rssi": 0, "count_of_advertisements": 0 } ] } |
device_id: hexadecimal string
Expand | ||
---|---|---|
| ||
The following fields have null values when the device is not positioned: network_id: uuid of device’s position lat: latitude coordinate of the position lon: longitude coordinate of the position labels: list of strings representing the position’s labels custom_id: user-defined id of the position group_id: integer value representing position’s group id group_name: user-defined group name group_custom_id: user-defined group id level_id: integer value representing position’s level id level_name: user-defined level name floor_number: floor number of the position’s level zone_id: integer value representing position’s zone id zone_name: user-defined zone name project_id: integer value representing position’s project id project_name: user-defined project name |
damaged: boolean value representing device’s damaged status
occupied: boolean value representing device’s occupancy status
status_duration: integer representing the duration of the current occupancy status
time: latest advertising timestamp from the device
average_rssi: mean rssi of all the advertising packets from the device
count_of_advertisiments: integer count of advertising packets from the device