Returns all active devices that have not yet been assigned to any user (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/GaelCeballos/Smart_Enviro_Backend/llms.txt
Use this file to discover all available pages before exploring further.
user_id IS NULL). Use this endpoint to populate a device discovery UI before calling POST /api/devices/{id}/add to claim a device.
Endpoint
| Field | Value |
|---|---|
| Method | GET |
| Path | /api/devices/available |
| Auth | Bearer token required (Authorization: Bearer YOUR_TOKEN) |
Request
No query parameters or request body.Response (200 OK)
Always
"success" on a 200 response.A human-readable label confirming the query returned available devices.
Array of unclaimed, active device objects.
Only active devices (
is_active = true) with no owner appear in this list. Devices already assigned to other users, inactive devices, and soft-deleted devices are all excluded.