Dominevo
ReferenceHTTP API

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> — port 4443 unless 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 and Content-Type: application/json. Calling a query with POST or a mutation with GET is 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 as token).
  • 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 in meta.values ({"json": {"at": "…"}, "meta": {"values": {"at": ["Date"]}}}).
  • A method whose input is {} takes {"json": {}}; a method with no input takes no input at 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).

CredentialHow you get itWhat it may do
Login sessionauth.login (or a sign-in in the UI / the CLI)An administrator: everything. Anyone else: their viewer grant. Sessions
Tokenauth.mintToken, or Tokens in the admin UIExactly its scopes, never more than the user it acts for holds now. A token with the * scope is an admin token.
Share linkMinted as a token whose only scope is a share grantView-only, a fixed list of methods, its own cameras. Share links
Linked appAn account-link (OAuth) flow, e.g. AlexaThe 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:

TierWho passes
publicAnyone, without a credential (sign-in methods; some are limited per client address).
protectedAny principal that is signed in and whose scopes cover the method (below).
adminAn 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):

ScopeExampleCovers
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.codeHTTPUsual cause
BAD_REQUEST400The input does not match the method’s schema.
UNAUTHORIZED401No token, or one that is expired, revoked or not a credential.
FORBIDDEN403Signed in, but the scopes or the tier do not allow this method (the message says which).
NOT_FOUND404Unknown router or method, or a missing object.
METHOD_NOT_SUPPORTED405A query sent with POST, or a mutation with GET.
TOO_MANY_REQUESTS429A sign-in method called too often from one address.
INTERNAL_SERVER_ERROR500The 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

Capability routers

RouterCapabilityScopeMethods
accessoriesaccessoriesdevice2
actionsactionssystem11
actionSourceaction-sourcesystem3
addonPagesaddon-pagessystem1
addonPagesSourceaddon-pages-sourcesystem1
addonsaddonssystem32
addonSettingsaddon-settingssystem8
addonWidgetsaddon-widgetssystem1
addonWidgetsSourceaddon-widgets-sourcesystem1
adminUiadmin-uisystem2
airQualitySensorair-quality-sensordevice1
alarmPanelalarm-paneldevice4
alertsalertssystem7
ambientLightSensorambient-light-sensordevice1
appsappssystem2
audioAnalysisaudio-analysisdevice4
audioAnalyzeraudio-analyzersystem7
audioCodecaudio-codecsystem11
audioMetricsaudio-metricsdevice2
automationControlautomation-controldevice4
backupbackupsystem20
batterybatterydevice1
binarybinarydevice1
boardKeySourceboard-key-sourcesystem3
brightnessbrightnessdevice2
brokerbrokersystem6
buttonbuttondevice1
calendarscalendarssystem4
calendarSourcecalendar-sourcesystem2
cameraCredentialscamera-credentialsdevice2
cameraGridLayoutcamera-grid-layoutdevice5
cameraPipelineConfigcamera-pipeline-configdevice3
cameraStreamscamera-streamsdevice5
carbonMonoxidecarbon-monoxidedevice1
climateControlclimate-controldevice9
clusterUpdatecluster-updatesystem3
colorcolordevice2
composercomposersystem2
connectivityconnectivitydevice1
consumablesconsumablesdevice2
contactcontactdevice1
controlcontroldevice6
coreBlockscore-blockssystem26
covercoverdevice6
customModelRegistrycustom-model-registrysystem2
databaseSnapshotdatabase-snapshotsystem2
dataStoreProviderdata-store-providersystem18
daylightPhasedaylight-phasesystem3
dayNightday-nightdevice3
decoderdecodersystem2
detectionPipelinedetection-pipelinedevice3
deviceAdminLinkdevice-admin-linkdevice1
deviceAdoptiondevice-adoptionsystem8
deviceCredentialsdevice-credentialssystem8
deviceExportdevice-exportsystem14
deviceExtensiondevice-extensiondevice4
deviceHistorydevice-historysystem14
deviceManagerdevice-managersystem118
deviceMeshdevice-meshdevice4
deviceOpsdevice-opsdevice7
deviceProviderdevice-providersystem16
deviceRunsdevice-runsdevice3
deviceStatedevice-statesystem9
deviceStateRefreshdevice-state-refreshdevice2
deviceStatusdevice-statusdevice1
deviceTransitionsdevice-transitionsdevice5
dishwasherdishwasherdevice15
displayPalettedisplay-palettesystem3
doNotDisturbdo-not-disturbdevice2
doorbelldoorbelldevice1
embeddingEncoderembedding-encodersystem4
energySystemenergy-systemdevice1
enumSensorenum-sensordevice1
errorerrordevice2
eventEmitterevent-emitterdevice1
faceGalleryface-gallerysystem17
fanControlfan-controldevice6
fanPresetsfan-presetssystem4
featureProbefeature-probedevice1
filesystemBrowsefilesystem-browsesystem3
floodflooddevice1
gasgasdevice1
groupActivegroup-activedevice1
groupCommandsgroup-commandsdevice1
groupStatusgroup-statusdevice1
heatingValveheating-valvedevice1
heatPumpControlheat-pump-controldevice17
heatPumpStatusheat-pump-statusdevice1
heroLayouthero-layoutsystem3
humidifierhumidifierdevice4
humiditySensorhumidity-sensordevice1
imageimagedevice1
imageSettingsimage-settingsdevice3
integrationInstancesintegration-instancessystem9
integrationsintegrationssystem8
intercomintercomdevice7
irTransmitterir-transmitterdevice3
jobsjobssystem8
keychainkeychainsystem7
keychainAdminkeychain-adminsystem13
lawnMowerControllawn-mower-controldevice4
llmllmsystem16
llmRuntimellm-runtimesystem11
localNetworklocal-networksystem24
locationlocationdevice1
lockControllock-controldevice4
lowPowerSleeplow-power-sleepdevice2
mediaPlayermedia-playerdevice19
meshNetworkmesh-networksystem6
metermeterdevice1
metricsProvidermetrics-providersystem11
migrationsmigrationssystem13
modelConvertmodel-convertsystem1
modelDistributormodel-distributorsystem1
motionmotiondevice2
motionDetectionmotion-detectiondevice6
motionTriggermotion-triggerdevice2
motionZonesmotion-zonesdevice3
mqttBrokermqtt-brokersystem7
nativeObjectDetectionnative-object-detectiondevice4
navigationnavigationdevice11
networkAccessnetwork-accesssystem5
networkLinknetwork-linkdevice1
networkQualitynetwork-qualitysystem3
nodesnodessystem14
notificationOutputnotification-outputsystem5
notificationRulesnotification-rulessystem29
notifiernotifierdevice3
numericSensornumeric-sensordevice1
oauthIntegrationoauth-integrationsystem1
osdosddevice2
osdManagerosd-managersystem12
petFeederpet-feederdevice11
petFountainpet-fountaindevice2
pipelineAnalyticspipeline-analyticsdevice89
pipelineExecutorpipeline-executorsystem30
pipelineOrchestratorpipeline-orchestratorsystem73
pipelineRunnerpipeline-runnersystem18
plateGalleryplate-gallerysystem18
platformProbeplatform-probesystem5
powerMeterpower-meterdevice1
powerSourcepower-sourcedevice4
presencepresencedevice1
pressureSensorpressure-sensordevice1
privacyMaskprivacy-maskdevice4
ptzptzdevice17
ptzAutotrackptz-autotrackdevice4
pumpCyclepump-cycledevice4
rebootrebootdevice1
recordEntriesrecord-entriessystem4
recordingrecordingdevice5
recordingArchiverecording-archivesystem34
recordingExportrecording-exportsystem7
recordingOnboardrecording-onboarddevice3
recordingSignalrecording-signaldevice1
recordsrecordssystem17
remoteremotesystem6
remoteLayoutComponentsremote-layout-componentssystem1
resyncresyncdevice1
retentionSourceretention-sourcesystem1
runningStaterunning-statedevice1
sceneMonitorscene-monitordevice10
schedulersschedulerssystem10
scriptRunnerscript-runnerdevice3
serverManagementserver-managementsystem8
settingsStoresettings-storesystem17
sirensirendevice5
smokesmokedevice1
smtpProvidersmtp-providersystem2
snapshotsnapshotdevice9
ssoBridgesso-bridgesystem2
storagestoragesystem17
storageAdminstorage-adminsystem7
storageEvictablestorage-evictablesystem2
storageMigrationstorage-migrationsystem12
storageOccupancystorage-occupancysystem1
storageProviderstorage-providersystem16
streamBrokerstream-brokersystem39
streamCatalogstream-catalogdevice1
streamParamsstream-paramsdevice4
streamSignalsstream-signalsdevice1
switchswitchdevice5
systemsystemsystem16
tagstagssystem8
tampertamperdevice1
temperatureSensortemperature-sensordevice1
templatetemplatesystem5
terminalSessionterminal-sessionsystem8
timedRuntimed-rundevice5
toasttoastsystem1
trainingtrainingsystem13
trainingProvidertraining-providersystem13
turnProviderturn-providersystem1
updateupdatedevice2
userManagementuser-managementsystem23
userPasskeysuser-passkeyssystem10
vacuumControlvacuum-controldevice7
valvevalvedevice5
vectorStorevector-storesystem9
vehiclevehicledevice2
vibrationvibrationdevice1
videoclipsvideoclipsdevice7
viewerUiviewer-uisystem2
waterHeaterwater-heaterdevice4
weatherweatherdevice1
weatherStationweather-stationdevice1
webrtcSessionwebrtc-sessiondevice11
workloadworkloaddevice8
zoneAnalyticszone-analyticsdevice5
zoneRuleszone-rulesdevice2
zoneszonesdevice4

Shared input and output shapes: Shapes. Non-tRPC routes: Plain HTTP routes.