GET /devices/{id}/nearbyDeviceData​
Returns readings for one nearby device detected by the specified tracker during a date range.
Use GET https://api.lightbug.cloud/api/devices/{trackerId}/nearbyDeviceData with your API token in the Authorization header. Both nearbyId (the nearby device's device.id from nearbyDevices) and dateRange are required. Encode dateRange as a JSON array of two Unix-millisecond timestamps.
Replace the placeholders below. The date range is illustrative.
curl --get 'https://api.lightbug.cloud/api/devices/TRACKER_ID/nearbyDeviceData' \
--header 'Authorization: YOUR_API_TOKEN' \
--data-urlencode 'nearbyId=NEARBY_DEVICE_ID' \
--data-urlencode 'dateRange=[1735689600000,1735693200000]'
The response is an object keyed by reading type, with arrays of [timestamp, value] pairs ordered by time. Returned timestamps are rounded Unix seconds, even though the date-range inputs and nearbyDevices reading timestamps use milliseconds. For ble_seen, the returned value is BLE RSSI in dBm. No matching readings returns {}.
Synthetic example (BLE detections only):
{"ble_seen": [[1735689660, -65], [1735689720, -70]]}
Authorizations​
API Key for authentication. Retrieval from either API version login routes, or other authentication token type. See Authentication for more details.
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."Parameters​
Path Parameters
The detecting tracker ID.
"integer"Query Parameters
The nearby device ID (device.id from nearbyDevices).
"JSON"Required JSON array [start, end] of Unix-millisecond timestamps. Response time-series timestamps use Unix seconds.
"JSON"