DockScope HTTP API

August 5, 2026 ยท View on GitHub

DockScope's UI is a client of this API, so everything the dashboard does is available over HTTP. The server listens on 127.0.0.1:4681 by default.

Endpoints are grouped below. Paths marked :id take an entity id, which for the Docker source is the container id.

Quick examples

# the whole graph, nodes and links
curl -s localhost:4681/api/graph | jq '.nodes[].name'

# live stats for one container
curl -s localhost:4681/api/entities/<id>/stats | jq

# restart a container through its owning plugin
curl -X POST localhost:4681/api/entities/<id>/actions/core.docker/restart

The WebSocket at /ws pushes graph, stats, event, log, exec, anomaly and diagnostic messages. It is the same data the dashboard renders.

Cross-origin browser requests are rejected. If you serve DockScope behind a proxy or a custom domain, see Access control.

Authentication

With no access token configured there is none, and every endpoint below answers directly. Once a token is set, everything under /api and the /ws handshake returns 401 without credentials.

Scripts send the token as a bearer header:

curl -s -H "Authorization: Bearer $DOCKSCOPE_TOKEN" localhost:4681/api/graph

The dashboard instead exchanges the token for an HttpOnly session cookie, since a browser cannot set headers on a WebSocket handshake.

GET /api/auth needs no credentials and doubles as a liveness probe. It reports whether a token is required, whether you currently hold one, whether it is pinned by DOCKSCOPE_TOKEN, whether a reverse proxy authenticated you, and whether first-run setup is still on offer.

MethodPathDescription
GET/api/authCurrent auth status. Never requires credentials
POST/api/auth/setupClaim an unconfigured instance, or change the token you hold
POST/api/auth/sessionExchange a token for a session cookie
DELETE/api/auth/sessionSign out
DELETE/api/auth/tokenRemove the token, reopening the instance. Requires holding it
POST/api/auth/reminderTurn the first-run setup prompt on or off

Claiming an unconfigured instance is only possible from the machine itself, or from the network within 15 minutes of startup. Failed attempts are rate limited per source: 10 failures, then a 5 minute lockout. See SECURITY.md for the full model.

Endpoints

MethodPathDescription
GET/api/graphFull graph (nodes + links)
GET/api/sourcesRegistered data sources
GET/api/featuresWhich optional features this instance has (Compose)
GET/api/entities/:id/operationsMatching plugin operation descriptors
GET/api/entities/:id/actionsContextual plugin-owned actions
POST/api/entities/:id/actions/:pluginId/:actionIdRun an exact entity action
GET/api/entities/:id/{stats,logs,inspect,history,top,diff,diagnostic}Generic entity reads
GET/api/projectsPlugin-owned project inventory
POST/api/projects/:name/{action}Run a project action with owner query parameters
GET/api/systemsPlugin-owned runtime/system inventory
GET/api/connections/providersTyped connection provider forms
GET/api/connectionsConfigured source connections
POST/api/connections/:pluginId/:providerIdAdd a provider connection
DELETE/api/connections/:pluginId/:providerId/:connectionIdRemove a provider connection
GET/api/healthAggregate plugin source health
GET/api/versionCurrent + latest version
GET/api/pluginsRuntime plugin registry
GET/api/plugins/errorsExternal plugin load/register failures
GET/api/plugins/warningsExternal plugin manifest deprecation warnings
GET/api/plugins/uiFrontend plugin extension descriptors
GET/api/plugins/:pluginId/frontendSandboxed frontend bundle source
POST/api/plugins/:pluginId/ui/:id/actionRun a declared plugin UI action
GET/api/plugins/commandsPlugin command descriptors
POST/api/plugins/:pluginId/commands/:idRun a plugin command
GET/api/plugins/eventsRecent plugin event bus entries
GET/api/plugins/reviewPlugin permission/capability review reports
GET/api/plugins/catalogConfigured plugin catalog entries
GET/api/plugins/marketplaceCatalog entries merged with local install state
POST/api/plugins/marketplace/:pluginId/installInstall from the configured catalog
POST/api/plugins/marketplace/:pluginId/updateUpdate an installed catalog plugin
DELETE/api/plugins/marketplace/:pluginIdUninstall a local marketplace plugin
GET/api/plugins/catalogsUser-added catalogs with their pinned key fingerprints
POST/api/plugins/catalogs/previewInspect a catalog and its signing key without trusting it
POST/api/plugins/catalogsTrust and add a catalog (pins its signing key)
DELETE/api/plugins/catalogs?source=Remove a user-added catalog
GET/api/plugins/approvalsPersisted plugin approvals
GET/api/plugins/compatibilityPlugin compatibility warnings and migration metadata
POST/api/plugins/:pluginId/migrateRun a declared plugin compatibility migration
POST/api/plugins/:pluginId/approveApprove the current plugin fingerprint
POST/api/plugins/:pluginId/revoke-approvalRevoke plugin approval
GET/api/plugins/configPlugin config schemas and values
PUT/api/plugins/:pluginId/configUpdate plugin config
POST/api/plugins/:pluginId/reloadReload an external plugin from disk
GET/api/plugins/secretsDeclared plugin secret status
PUT/api/plugins/:pluginId/secrets/:keyStore a declared plugin secret
POST/api/plugins/:pluginId/enableEnable an external plugin
POST/api/plugins/:pluginId/disableDisable an external plugin
WS/wsReal-time graph, stats, events, logs, exec, anomalies, diagnostics