Skip to main content

Adapter Protocol

The ZenEdge Adapter Protocol is the specification for building device integrations with SpaceOS. Any IoT device that implements this protocol can be managed by SpaceOS.

Philosophy

  • One adapter = one device — Each adapter instance manages exactly one physical device
  • HTTP-based — Simple REST endpoints, no custom transport protocols
  • Self-describing — Adapters declare their capabilities via /capabilities
  • Health-monitored — ZenEdge continuously polls /ping for health status
  • Embeddable UI — Adapters can serve HTML tiles for guest-facing interfaces

The 7 Endpoints

Every adapter must implement these endpoints:

EndpointLevelMethodPurpose
/pingAdapterGETHealth check — "is the adapter alive?"
/capabilitiesAdapterGETDeclare supported devices, types, and actions
/statusDeviceGETCurrent device state (locked/unlocked, online/offline)
/actionDevicePOSTExecute a command (unlock, generate_voucher, etc.)
/uiDeviceGETHTML embed for the guest-facing tile
/webhook/registerDevicePOSTRegister for push events from the adapter
/webhook/<event>DevicePOSTReceive push events from the device
info

Device-level endpoints require a device_id query parameter: ?device_id=ada-xxx Adapter-level endpoints (/ping, /capabilities) do not.

Authentication

All adapter endpoints are authenticated via API key:

x-api-key: adapter-secret-key

Protocol Versions

VersionStatusKey Changes
v2.0Currentdevice_id routing via query parameter
v1.0DeprecatedDevice ID in path

Next Steps