DataHub

REST API

Interactive API reference, Swagger UI, Postman collection, and authentication.

DataHub exposes a REST API for all console operations and integrations. Endpoint details below are generated from the OpenAPI spec.

In each endpoint playground, choose an API server (for local Docker use http://localhost:4400, or Same origin when the console and API share a reverse proxy). Requests are sent through the docs proxy (/api/openapi-proxy) to avoid CORS issues.

Integrator surfaces

SurfaceURLUse
This referenceSidebar pages by API tagBrowse schemas + try requests
Swagger UI/api/docs on your API hostInteractive try against running API
OpenAPI JSONGET /api/docs-jsonCodegen / CI
Postman/postman/datahub.postman_collection.jsonOffline collection ({{baseUrl}}, Bearer {{token}})
Console Devs/devs (signed-in)Quick links to all of the above

Authentication

All API endpoints (except login, health, and documented public share routes) require a JWT bearer token.

POST /api/auth/login
Content-Type: application/json

{ "username": "admin", "password": "your-password" }

Use the returned token as:

Authorization: Bearer <token>

In Swagger UI, click Authorize and paste the token. Postman collection variables use the same Bearer pattern.

Plant scope and UNS filter

Users may be scoped to a single plant and/or a UNS path filter. List and read endpoints respect these limits server-side — do not rely on client-side filtering alone. See Permissions matrix and RBAC.

Public routes (no JWT)

RoutePurpose
GET /api/public/dashboards/:tokenShared dashboard data (tag paths limited to widgets)
GET /api/public/dashboards/:token/latestLatest telemetry for one widget tag
GET /api/public/dashboards/:token/historyHistory for one widget tag
GET /api/public/screens/:tokenShared screen payload
GET /api/public/files/:tokenShared file or directory metadata
GET /api/public/files/:token/contentDownload shared file binary
GET /api/healthService liveness

Mark Postman requests for these routes with "auth": { "type": "noauth" }.

Error responses

API errors return JSON with statusCode, message, and error. User-visible error codes in the console are translated via the frontend i18n catalog — integrators should handle HTTP status and stable message shapes.

Webhook testing

For HTTP rule actions during development, inspect deliveries at GET /api/webhooks/test/log (authenticated).