v2

latestOpenAPI 3.1.02026-08-01244220427.0 KB
Devices

Device Health Check

Health check endpoint for device monitoring.

Called by the device itself using its device-specific JWT token. The current_device dependency handles authentication and updates lastSeenAt before this handler runs.

Parameters:

  • device_id (PydanticObjectId): Must match the device ID in the JWT token
  • device (Device): Authenticated device from JWT (via current_device)

Returns:

  • DeviceHealthResponse: Device health status

Raises:

  • 404: If device_id does not match the authenticated device's ID
get/v2/devices/{device_id}/health

Path parameters

device_idstring required
Example:5eb7cf5a86d9755df3a6c593

Headers

authorizationstring nullable

Response

Successful Response

statusstring required

Health status (ok/error)

deviceIdstring required

Device ID

lastSeenAtstring date-time nullable

Last time the device was active

deviceStatus'active' | 'inactive' | 'blocked' | 'pending_activation' required

Device status enumeration.