[data-reveal]{opacity:1!important;transform:none!important}
AntelopeJS DMS
DocumentationExtending

Extending

Automation nodes, who may open the console, and how routes from your modules are classified and documented.

The module has no interface to implement: it watches the routes registered with the API provider. This page covers what other modules can rely on.

Automation nodes

When @antelopejs/dms-automation is loaded, the module registers three nodes. Without it, the registration is a silent no-op.

Route unhealthy trigger

api.route-unhealthy fires when a route enters a bad state by the API health rules. It runs on one node of a cluster.

ConfigTypeDefaultDescription
intervalSecondsnumber60 (min. 10)How often the routes are checked.
flags("broken" | "slow" | "warn")[]["broken", "slow"]broken: failing on its 5xx rate. slow: p95 at or above the slow threshold. warn: many 4xx.

Output: routeKey, method, uri, flag, errorRate, averageLatencyMs, requestsLast24h.

Get API health action

api.get-api-health returns the KPIs of the routes in scope: totalRoutes, failingRoutes, slowRoutesCount, averageLatencyMs, callsToday, errors24h, and a status breakdown (success, clientErrors, serverErrors, total). The optional days input restricts the breakdown to the last N days.

Query request logs action

api.query-request-logs reads captured requests under the active scope. Inputs: routeId, uri, method, statusClass (success, client-error, server-error), statusMin, statusMax, and limit (default 50, max 200). It returns results and a nextCursor to read the next page.

Access

The console is for the platform owner only. Its pages belong to the api module, and the DMS grants a module page's permissions to the owner alone: they do not appear in the role editor, and a role cannot be given the console or any block of it. A member who calls a console route gets a 403.

Each block is declared with .meta({ name, icon }), and each route is guarded with @AuthUserWithPermission(<block>) for the block it feeds. The 403 names that block's permission id.

Own routes and module routes

The console sorts each route by where its controller comes from: own routes from the project's code, module routes from installed AntelopeJS modules. The scope setting picks which ones the pages watch. A distributable module that adds routes shows up under Module routes.

Make the documentation tab accurate

The Documentation tab infers a route's contract from its handler and its traffic:

  • Guard routes with the DMS auth decorators, or name your auth middlewares to match authMiddlewareNamePatterns (^auth_, ^requireAuth, ^session_ by default), so the route reads as authenticated.
  • Parameters and bodies come from captured client requests. Make a representative call from your application or an API client, then open the Documentation tab. Tester calls are excluded from contract inference; they cannot populate missing examples.
LinkOpens
/modules/api/routes?route=<METHOD> <path>&tab=statistics|documentation|testerA route on one of its tabs
/modules/api/logs?record=<requestId>A request in its drawer
/modules/api/logs?since=<iso>&until=<iso>The requests of a time range
?api.period=last-hour|last-24h|last-7-days|last-30-daysA page on a period
?api.compare=previous-period|noneThe Overview or Routes against the period before, or alone
?live=0A page paused