HTTP API
How to call the Dominevo hub API over HTTP: the tRPC wire format, authentication and authorization, errors, and every router and method.
The hub's API is tRPC over HTTP: 211 capability routers and 16 core routers, 1667 methods in all. Everything the admin UI, the viewer app and the dominevo CLI do goes through it, so a script can do the same. There is no OpenAPI description; these pages are generated from the server code instead.
How to call
- Address:
https://<hub>:4443/trpc/<router>.<method>— port4443unless you changed it (see Ports). - Queries are
GET, with the input URL-encoded in?input=. - Mutations are
POST, with the input as the JSON body andContent-Type: application/json. Calling a query withPOSTor a mutation withGETis refused (METHOD_NOT_SUPPORTED). - Subscriptions are served over the WebSocket at
wss://<hub>:4443/trpc(a tRPC WebSocket client; the token goes in the connection parameters astoken). - The JSON is wrapped. The hub encodes with superjson, so an input travels as
{"json": <input>}and a result comes back as{"result": {"data": {"json": <output>}}}. A date in the input is sent as an ISO string and named inmeta.values({"json": {"at": "…"}, "meta": {"values": {"at": ["Date"]}}}). - A method whose input is
{}takes{"json": {}}; a method with no input takes noinputat all. - Batching: several calls of one kind in one request —
GET /trpc/a.x,b.y?batch=1&input={"0":{"json":…},"1":{"json":…}}— answer with an array in the same order.
The examples use a placeholder hub hub.example.com and a token in $DOMINEVO_TOKEN. With a hub on a
private certificate, give curl the certificate (--cacert hub.pem) rather than turning verification off.
# A query without input: which features this hub has
curl -sS -H "Authorization: Bearer $DOMINEVO_TOKEN" \
"https://hub.example.com:4443/trpc/system.info"
# A query with input (device 12): --data-urlencode builds ?input=…
curl -sS -G -H "Authorization: Bearer $DOMINEVO_TOKEN" \
--data-urlencode 'input={"json":{"deviceId":12}}' \
"https://hub.example.com:4443/trpc/accessories.getStatus"
# A mutation: set a light to 50 %
curl -sS -X POST -H "Authorization: Bearer $DOMINEVO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"json":{"deviceId":12,"level":50}}' \
"https://hub.example.com:4443/trpc/brightness.setBrightness"
# Who am I? (the scopes this token actually holds)
curl -sS -H "Authorization: Bearer $DOMINEVO_TOKEN" \
"https://hub.example.com:4443/trpc/auth.me"From Node, the dominevo CLI and the @dominevo/develop package ship a client that does the wrapping,
the credential chain and certificate trust for you — see Sign in from the CLI.
Try it on your hub
The admin UI has an API explorer under System → API explorer: sign in, pick a method, fill its input
and send it with your own session. Each method on these pages names its address, for example
/system/api-explorer?method=auth.me. It needs an admin account; it lists every method and says which
ones it can call directly.
Authentication
Every credential is a token signed by the hub, sent as Authorization: Bearer <token>. On /trpc the hub
also accepts it as a ?token= query parameter — avoid that outside a quick test, as the address ends up in
logs and browser history. The session cookie is not read on /trpc; it serves the addon gateway and a
few plain routes (see Plain HTTP routes).
| Credential | How you get it | What it may do |
|---|---|---|
| Login session | auth.login (or a sign-in in the UI / the CLI) | An administrator: everything. Anyone else: their viewer grant. Sessions |
| Token | auth.mintToken, or Tokens in the admin UI | Exactly its scopes, never more than the user it acts for holds now. A token with the * scope is an admin token. |
| Share link | Minted as a token whose only scope is a share grant | View-only, a fixed list of methods, its own cameras. Share links |
| Linked app | An account-link (OAuth) flow, e.g. Alexa | The grant consented to; never admin. Outside services |
A token is minted only from a person’s login session (a token never mints another), never with more than
that session holds, and with a lifetime of at most 90 days (expiresIn in seconds; only a share link may
be "never"). A * token also needs a fresh re-authentication. It is shown once.
# Sign in (a user without a second factor): the token is in result.data.json.token
curl -sS -X POST -H "Content-Type: application/json" \
-d '{"json":{"username":"me","password":"…"}}' \
"https://hub.example.com:4443/trpc/auth.login"
# With that session, mint a 30-day token that may only read the addons capability
curl -sS -X POST -H "Authorization: Bearer $SESSION" -H "Content-Type: application/json" \
-d '{"json":{"label":"dashboard","expiresIn":2592000,"scopes":[{"type":"capability","target":"addons","access":["view"]}]}}' \
"https://hub.example.com:4443/trpc/auth.mintToken"When the user has a second factor, auth.login answers with secondFactors and a short-lived challenge
token instead of a session; finish with auth.loginVerifyTotp or the passkey methods. For scripts, a token
minted once in the admin UI is simpler.
Authorization
Each method has a tier, shown on every router page:
| Tier | Who passes |
|---|---|
public | Anyone, without a credential (sign-in methods; some are limited per client address). |
protected | Any principal that is signed in and whose scopes cover the method (below). |
admin | An administrator — an admin session or a * token. A viewer passes only on a method of a feature granted to it. A scoped token never does. |
A capability method that does not state its tier is protected, or admin when its capability is internal.
For a protected capability method, a token passes when one of its scopes names the method’s target and
holds the method’s access (view, create or delete — the "Token scope" column):
| Scope | Example | Covers |
|---|---|---|
capability | {"type":"capability","target":"addons","access":["view"]} | Every method of that capability |
category | {"type":"category","target":"device","access":["view"]} | Every device capability (device) or every system one (system) |
addon | {"type":"addon","target":"<addonId>","access":["view","create"]} | The methods of capabilities that addon owns, and its own HTTP routes |
device | {"type":"device","selector":{"kind":"ids","ids":[12]},"access":["view"]} | Device methods on the devices it selects (by ids, types, locations or all) |
A method that names devices in its input also needs every named device to be inside the token’s device
reach. The core routers (auth, logs, preferences …) are not capabilities: a protected core method
needs only a signed-in principal, and an admin one needs an administrator. A share link is held to its
own fixed list of methods whatever the tier.
People are either administrators or viewers (Users and permissions): a viewer reaches the methods marked "yes" in the Viewer column, plus those of the features an admin granted it, and only on its own devices.
Errors
An error comes back with a matching HTTP status and this body:
{
"error": {
"json": {
"message": "No scope grants create on 'addons' (system-scope cap). Have: capability:addons[view]",
"code": -32003,
"data": {
"code": "FORBIDDEN",
"httpStatus": 403,
"path": "addons.installPackage"
}
}
}
}data.code | HTTP | Usual cause |
|---|---|---|
BAD_REQUEST | 400 | The input does not match the method’s schema. |
UNAUTHORIZED | 401 | No token, or one that is expired, revoked or not a credential. |
FORBIDDEN | 403 | Signed in, but the scopes or the tier do not allow this method (the message says which). |
NOT_FOUND | 404 | Unknown router or method, or a missing object. |
METHOD_NOT_SUPPORTED | 405 | A query sent with POST, or a mutation with GET. |
TOO_MANY_REQUESTS | 429 | A sign-in method called too often from one address. |
INTERNAL_SERVER_ERROR | 500 | The provider failed. On a capability method, data.capRouteReason says why when no provider answered (no-provider, node-offline, cap-unknown, transport-failed). |
Some errors also carry data.i18n, a message key and parameters the apps translate.
Routers
Core routers
| Router | Methods |
|---|---|
addonSettingsRaw | 2 |
agentPairing | 8 |
apiCatalog | 2 |
auth | 61 |
capabilities | 8 |
certificates | 5 |
clusterNodes | 2 |
eventBusProxy | 2 |
hwaccel | 3 |
live | 3 |
logs | 4 |
notifications | 2 |
preferences | 4 |
repl | 2 |
streamProbe | 2 |
systemEvents | 2 |
Capability routers
| Router | Capability | Scope | Methods |
|---|---|---|---|
accessories | accessories | device | 2 |
actions | actions | system | 11 |
actionSource | action-source | system | 3 |
addonPages | addon-pages | system | 1 |
addonPagesSource | addon-pages-source | system | 1 |
addons | addons | system | 32 |
addonSettings | addon-settings | system | 8 |
addonWidgets | addon-widgets | system | 1 |
addonWidgetsSource | addon-widgets-source | system | 1 |
adminUi | admin-ui | system | 2 |
airQualitySensor | air-quality-sensor | device | 1 |
alarmPanel | alarm-panel | device | 4 |
alerts | alerts | system | 7 |
ambientLightSensor | ambient-light-sensor | device | 1 |
apps | apps | system | 2 |
audioAnalysis | audio-analysis | device | 4 |
audioAnalyzer | audio-analyzer | system | 7 |
audioCodec | audio-codec | system | 11 |
audioMetrics | audio-metrics | device | 2 |
automationControl | automation-control | device | 4 |
backup | backup | system | 20 |
battery | battery | device | 1 |
binary | binary | device | 1 |
boardKeySource | board-key-source | system | 3 |
brightness | brightness | device | 2 |
broker | broker | system | 6 |
button | button | device | 1 |
calendars | calendars | system | 4 |
calendarSource | calendar-source | system | 2 |
cameraCredentials | camera-credentials | device | 2 |
cameraGridLayout | camera-grid-layout | device | 5 |
cameraPipelineConfig | camera-pipeline-config | device | 3 |
cameraStreams | camera-streams | device | 5 |
carbonMonoxide | carbon-monoxide | device | 1 |
climateControl | climate-control | device | 9 |
clusterUpdate | cluster-update | system | 3 |
color | color | device | 2 |
composer | composer | system | 2 |
connectivity | connectivity | device | 1 |
consumables | consumables | device | 2 |
contact | contact | device | 1 |
control | control | device | 6 |
coreBlocks | core-blocks | system | 26 |
cover | cover | device | 6 |
customModelRegistry | custom-model-registry | system | 2 |
databaseSnapshot | database-snapshot | system | 2 |
dataStoreProvider | data-store-provider | system | 18 |
daylightPhase | daylight-phase | system | 3 |
dayNight | day-night | device | 3 |
decoder | decoder | system | 2 |
detectionPipeline | detection-pipeline | device | 3 |
deviceAdminLink | device-admin-link | device | 1 |
deviceAdoption | device-adoption | system | 8 |
deviceCredentials | device-credentials | system | 8 |
deviceExport | device-export | system | 14 |
deviceExtension | device-extension | device | 4 |
deviceHistory | device-history | system | 14 |
deviceManager | device-manager | system | 118 |
deviceMesh | device-mesh | device | 4 |
deviceOps | device-ops | device | 7 |
deviceProvider | device-provider | system | 16 |
deviceRuns | device-runs | device | 3 |
deviceState | device-state | system | 9 |
deviceStateRefresh | device-state-refresh | device | 2 |
deviceStatus | device-status | device | 1 |
deviceTransitions | device-transitions | device | 5 |
dishwasher | dishwasher | device | 15 |
displayPalette | display-palette | system | 3 |
doNotDisturb | do-not-disturb | device | 2 |
doorbell | doorbell | device | 1 |
embeddingEncoder | embedding-encoder | system | 4 |
energySystem | energy-system | device | 1 |
enumSensor | enum-sensor | device | 1 |
error | error | device | 2 |
eventEmitter | event-emitter | device | 1 |
faceGallery | face-gallery | system | 17 |
fanControl | fan-control | device | 6 |
fanPresets | fan-presets | system | 4 |
featureProbe | feature-probe | device | 1 |
filesystemBrowse | filesystem-browse | system | 3 |
flood | flood | device | 1 |
gas | gas | device | 1 |
groupActive | group-active | device | 1 |
groupCommands | group-commands | device | 1 |
groupStatus | group-status | device | 1 |
heatingValve | heating-valve | device | 1 |
heatPumpControl | heat-pump-control | device | 17 |
heatPumpStatus | heat-pump-status | device | 1 |
heroLayout | hero-layout | system | 3 |
humidifier | humidifier | device | 4 |
humiditySensor | humidity-sensor | device | 1 |
image | image | device | 1 |
imageSettings | image-settings | device | 3 |
integrationInstances | integration-instances | system | 9 |
integrations | integrations | system | 8 |
intercom | intercom | device | 7 |
irTransmitter | ir-transmitter | device | 3 |
jobs | jobs | system | 8 |
keychain | keychain | system | 7 |
keychainAdmin | keychain-admin | system | 13 |
lawnMowerControl | lawn-mower-control | device | 4 |
llm | llm | system | 16 |
llmRuntime | llm-runtime | system | 11 |
localNetwork | local-network | system | 24 |
location | location | device | 1 |
lockControl | lock-control | device | 4 |
lowPowerSleep | low-power-sleep | device | 2 |
mediaPlayer | media-player | device | 19 |
meshNetwork | mesh-network | system | 6 |
meter | meter | device | 1 |
metricsProvider | metrics-provider | system | 11 |
migrations | migrations | system | 13 |
modelConvert | model-convert | system | 1 |
modelDistributor | model-distributor | system | 1 |
motion | motion | device | 2 |
motionDetection | motion-detection | device | 6 |
motionTrigger | motion-trigger | device | 2 |
motionZones | motion-zones | device | 3 |
mqttBroker | mqtt-broker | system | 7 |
nativeObjectDetection | native-object-detection | device | 4 |
navigation | navigation | device | 11 |
networkAccess | network-access | system | 5 |
networkLink | network-link | device | 1 |
networkQuality | network-quality | system | 3 |
nodes | nodes | system | 14 |
notificationOutput | notification-output | system | 5 |
notificationRules | notification-rules | system | 29 |
notifier | notifier | device | 3 |
numericSensor | numeric-sensor | device | 1 |
oauthIntegration | oauth-integration | system | 1 |
osd | osd | device | 2 |
osdManager | osd-manager | system | 12 |
petFeeder | pet-feeder | device | 11 |
petFountain | pet-fountain | device | 2 |
pipelineAnalytics | pipeline-analytics | device | 89 |
pipelineExecutor | pipeline-executor | system | 30 |
pipelineOrchestrator | pipeline-orchestrator | system | 73 |
pipelineRunner | pipeline-runner | system | 18 |
plateGallery | plate-gallery | system | 18 |
platformProbe | platform-probe | system | 5 |
powerMeter | power-meter | device | 1 |
powerSource | power-source | device | 4 |
presence | presence | device | 1 |
pressureSensor | pressure-sensor | device | 1 |
privacyMask | privacy-mask | device | 4 |
ptz | ptz | device | 17 |
ptzAutotrack | ptz-autotrack | device | 4 |
pumpCycle | pump-cycle | device | 4 |
reboot | reboot | device | 1 |
recordEntries | record-entries | system | 4 |
recording | recording | device | 5 |
recordingArchive | recording-archive | system | 34 |
recordingExport | recording-export | system | 7 |
recordingOnboard | recording-onboard | device | 3 |
recordingSignal | recording-signal | device | 1 |
records | records | system | 17 |
remote | remote | system | 6 |
remoteLayoutComponents | remote-layout-components | system | 1 |
resync | resync | device | 1 |
retentionSource | retention-source | system | 1 |
runningState | running-state | device | 1 |
sceneMonitor | scene-monitor | device | 10 |
schedulers | schedulers | system | 10 |
scriptRunner | script-runner | device | 3 |
serverManagement | server-management | system | 8 |
settingsStore | settings-store | system | 17 |
siren | siren | device | 5 |
smoke | smoke | device | 1 |
smtpProvider | smtp-provider | system | 2 |
snapshot | snapshot | device | 9 |
ssoBridge | sso-bridge | system | 2 |
storage | storage | system | 17 |
storageAdmin | storage-admin | system | 7 |
storageEvictable | storage-evictable | system | 2 |
storageMigration | storage-migration | system | 12 |
storageOccupancy | storage-occupancy | system | 1 |
storageProvider | storage-provider | system | 16 |
streamBroker | stream-broker | system | 39 |
streamCatalog | stream-catalog | device | 1 |
streamParams | stream-params | device | 4 |
streamSignals | stream-signals | device | 1 |
switch | switch | device | 5 |
system | system | system | 16 |
tags | tags | system | 8 |
tamper | tamper | device | 1 |
temperatureSensor | temperature-sensor | device | 1 |
template | template | system | 5 |
terminalSession | terminal-session | system | 8 |
timedRun | timed-run | device | 5 |
toast | toast | system | 1 |
training | training | system | 13 |
trainingProvider | training-provider | system | 13 |
turnProvider | turn-provider | system | 1 |
update | update | device | 2 |
userManagement | user-management | system | 23 |
userPasskeys | user-passkeys | system | 10 |
vacuumControl | vacuum-control | device | 7 |
valve | valve | device | 5 |
vectorStore | vector-store | system | 9 |
vehicle | vehicle | device | 2 |
vibration | vibration | device | 1 |
videoclips | videoclips | device | 7 |
viewerUi | viewer-ui | system | 2 |
waterHeater | water-heater | device | 4 |
weather | weather | device | 1 |
weatherStation | weather-station | device | 1 |
webrtcSession | webrtc-session | device | 11 |
workload | workload | device | 8 |
zoneAnalytics | zone-analytics | device | 5 |
zoneRules | zone-rules | device | 2 |
zones | zones | device | 4 |
Shared input and output shapes: Shapes. Non-tRPC routes: Plain HTTP routes.