Dominevo
ReferenceHTTP API

Plain HTTP routes

The hub routes that are not tRPC: health, sessions and cookies, OAuth, uploads, log export and the addon gateway, with the credential each accepts.

Besides /trpc, the hub answers a few plain HTTP routes. This table is maintained by hand in scripts/http-routes.mjs; npm run gen:api warns about any literal route in the server code that the table does not list.

"Login session" means the token auth.login returns (or the camstack_session cookie that carries it); a minted token is refused where the table says so.

RouteCredentialWhat it is for
GET /healthNoneLiveness: {"ok":true}, or 503 while the hub is not ready. Nothing else, so it is safe to expose to a monitor.
GET /health/detailsLogin session (Bearer or cookie); a minted token is refusedThe hub health report: version, uptime, process and agent details.
GET /health/agentsLogin session (Bearer or cookie); a minted token is refusedThe ids of the agents online now.
GET /health/agents/:nodeIdLogin session (Bearer or cookie); a minted token is refusedOne agent’s health report, fetched through the hub.
GET /health/clusterLogin session (Bearer or cookie); a minted token is refusedThe hub and every online agent in one answer.
GET /adaptive-probeLogin session (Bearer or cookie); a minted token is refusedA connection-quality probe the apps use to pick a stream quality.
GET /api/release-identityNoneThe product and server versions shown on the sign-in page.
GET /api/auth/whoamiAny token or login session, Bearer header onlyWho the credential is: user, admin or not, scopes, credential id. 401 when the token is revoked or expired.
POST /api/auth/sessionA login session token in the JSON body ({"token": "…"})Turns a login session into the camstack_session cookie, for browser pages and media URLs.
DELETE /api/auth/sessionNoneClears the camstack_session cookie.
GET /api/embed-authLogin session, Bearer header only (a minted token or share link is refused)Sets the session cookie, then redirects (?next=) to an embedded player page; for app web views.
GET, POST /api/oauth2/authorizeThe camstack_session cookie of the person consentingThe consent step of an account-link (OAuth 2) flow, e.g. linking Alexa.
POST /api/oauth2/tokenNo header: the authorization code of the flow (with its PKCE verifier when required) or a refresh token, form- or JSON-encodedThe token endpoint of an account-link flow, called by the linked service.
GET /api/oauth2/integrationsNoneThe services that can be linked through OAuth 2.
POST /api/addons/uploadAdministrator: an admin session or a * tokenUploads an addon package (multipart, at most 50 MB) to install it.
POST /api/server-uploadAdministrator: an admin session or a * tokenUploads a server package to stage an update.
GET /api/logs/exportAdministrator login session, Bearer header (a minted token is refused)Downloads the hub logs as a file.
GET /api/backup/download/:locationId/:archiveIdAdministrator login session, Bearer header (a minted token is refused)Streams one backup archive.
ALL /addon/:addonId/*Per route — see "The addon gateway" belowRoutes served by addons: snapshots, streams and player pages, webhooks, sign-in callbacks.

The addon gateway

Every addon can serve its own routes under /addon/<addonId>/… — snapshot and stream endpoints, webhooks, sign-in callbacks. Each route declares its access: public, authenticated or admin. For anything but public the hub reads Authorization: Bearer <token>, else the camstack_session cookie; with neither, a browser page is sent to the sign-in page and any other request gets 401. Then:

  • an admin route needs an administrator (a * token or an admin session);
  • an authenticated route admits a person’s login session, or a token holding an addon grant on that addon for the request’s access (GET/HEAD → view, POST/PUT/PATCH → create, otherwise delete);
  • a share link is admitted only by a stream or media endpoint that accepts its kind, and only for its devices.

A refused request gets 401 {"error":"Invalid token"} or 403 with Admin required, Token scope mismatch or Share token not accepted here.

On this page