Skip to main content

Module api_pairing

Module api_pairing 

Expand description

Device management and pairing API handlers.

Structs§

DeviceInfo
Metadata about a paired device.
DeviceRegistry
Registry of paired devices backed by SQLite.
PairingStore
Store for pending pairing requests.

Functions§

initiate_pairing
POST /api/pairing/initiate — initiate a new pairing session
list_devices
GET /api/devices — list paired devices
revoke_device
DELETE /api/devices/{id} — revoke a paired device and its bearer token.
rotate_token
submit_pairing_enhanced
POST /api/pair — submit pairing code (for new device pairing)
update_my_capabilities
POST /api/devices/me/capabilities — the calling device replaces its capability list. The “me” path means there’s no separate device id in the URL — the bearer token in Authorization identifies which row gets updated. Body: { "capabilities": ["..."] }.