The export route provides a single endpoint that streams detection records as a UTF-8 CSV file. Filters can be combined to narrow the export to a specific time window, proximity zone, or Raspberry Pi node. The filename in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/AngelAmoSanchez/TFG-RaspberryPi-BLE/llms.txt
Use this file to discover all available pages before exploring further.
Content-Disposition header is generated automatically based on the filters you apply.
The
Content-Disposition header is exposed by the CORS middleware, so browser-based downloads work without additional configuration.GET /api/v1/export/detections/csv
Download detection records as a CSV file. Results are ordered by descending timestamp (most recent first). Query parameters Time filters — at most one time-filter group should be supplied. When multiple are provided, the server applies them in the priority order listed below.Start of the export window as
YYYY-MM-DD, e.g. 2026-01-01. Must be used together with end_date. The export window for end_date is extended to 23:59:59 of that day so the entire day is included.End of the export window as
YYYY-MM-DD, e.g. 2026-01-31. Must be used together with start_date.Export detections from the last N minutes. Takes priority over
last_hours and last_days when start_date/end_date are not supplied.Export detections from the last N hours. Takes priority over
last_days.Export detections from the last N days.
Filter to a single proximity zone:
near, medium, or far. Invalid zone values are silently ignored and the filter is not applied.Filter to detections submitted by a specific Raspberry Pi node.
start_date+end_date(specific calendar range)last_minuteslast_hourslast_days- Default: last 24 hours
text/csv file download. The Content-Disposition header is set to attachment; filename=<generated_name>.csv.
CSV columns
| Column | Description |
|---|---|
ID | Integer primary key of the detection record |
Device Hash | Hashed BLE MAC address |
RSSI (dBm) | Signal strength as a signed integer |
Zone | Proximity zone: near, medium, or far |
Timestamp | Full ISO 8601 timestamp |
Device ID (IoT) | Identifier of the Raspberry Pi that recorded the detection |
Date | Date portion of the timestamp in YYYY-MM-DD format |
Time | Time portion of the timestamp in HH:MM:SS format |
| Filters applied | Example filename |
|---|---|
start_date + end_date | detections_2026-01-01_to_2026-01-31.csv |
last_minutes=30 | detections_last_30min.csv |
last_hours=6 | detections_last_6h.csv |
last_days=7 | detections_last_7d.csv |
| No time filter | detections_last_24h.csv |
Any filter + zone=near | detections_last_24h_zone_near.csv |