API Docs
Authentication
All API endpoints (except /) require an API key in the Authorization header:
Authorization: Bearer <YOUR_API_KEY>
Endpoints
- GET /: API Docs.
- GET /devices: Returns all devices with their lift logs.
- POST /devices: Create a new device.
- GET /devices/:deviceId: Get a single device and its lift logs.
- POST /devices/:deviceId/lift-logs: Add a lift log for a device.
- POST /device/:deviceId/isOnline: Update last seen timestamp for a device.
Data Model
{
"deviceId": "string",
"deviceName": "string",
"deviceType": "string",
"deviceLastSeen": "ISO8601 string",
"liftLogs": [
{
"timestamp": "ISO8601 string",
"liftDuration": "number (seconds)",
"liftId": "string"
}
]
}
Error Responses
- 400 Bad Request – Missing or invalid fields
- 401 Unauthorized – Missing or invalid API key
- 404 Not Found – Device not found