Systemd
The systemd backend lets you monitor and control systemd services. User services can be started, stopped, restarted, enabled, and disabled. System services (e.g. bluetooth.service) are strictly read-only — status monitoring only.
Enabled by default. Only whitelisted services are exposed — configure the list in ~/.config/odio-api/config.yaml.
Endpoints
Section titled “Endpoints”List services
Section titled “List services”GET /servicesReturns the state of all whitelisted services.
Control a service
Section titled “Control a service”POST /services/{scope}/{unit}/startPOST /services/{scope}/{unit}/stopPOST /services/{scope}/{unit}/restartPOST /services/{scope}/{unit}/enablePOST /services/{scope}/{unit}/disablescope is user or system. Mutations are only allowed on user-scope services.
Events
Section titled “Events”| Event | Trigger |
|---|---|
service.updated | Unit state change |
Configuration
Section titled “Configuration”systemd: enabled: true system: # read-only monitoring - bluetooth.service user: # full control - mpd.service - shairport-sync.service - snapclient.service - spotifyd.service - upmpdcli.serviceHow it works
Section titled “How it works”The backend communicates with systemd via D-Bus (both user and system bus). State updates come from D-Bus signals, with a filesystem monitoring fallback via fsnotify on /run/user/{uid}/systemd/units.