[data-reveal]{opacity:1!important;transform:none!important}
Configuration
API

Configuration

Every option of the dms-api module, its default, and how the API settings page overrides it.

Set options in the config block of the dms-api entry of antelope.config.ts. Retentions use milliseconds; body sizes use bytes.

antelope.config.ts
"dms-api": {
  source: { type: "package", package: "@antelopejs/dms-api", version: ">=0.4.0 <1.0.0" },
  config: {
    statisticsLifetime: 60 * 24 * 60 * 60 * 1000, // 60 days
    requestLogRetention: 14 * 24 * 60 * 60 * 1000, // 14 days
    requestSlownessThreshold: 500,
    requestLogCaptureHeaders: ["content-type", "user-agent", "x-webhook-signature"],
    testerSourceSecret: process.env.API_TESTER_SECRET,
  },
},

Options

OptionTypeDefaultDescription
statisticsLifetimenumber (ms)90 daysHow long per-day statistics are kept: 30, 60 or 90 days. The 30D period compares itself with the 30 days before, so it needs 60 days or more.
requestLogRetentionnumber (ms)30 daysHow long full request logs are kept, independently of the statistics. 1 to 366 days.
requestSlownessThresholdnumber (ms)1000A request at or above it is flagged slow; a route whose p95 reaches it is listed as Slow. 50 to 600,000, in steps of 50.
requestLogMaxBodySizenumber (bytes)65536 (64 KB)Request and response bodies above it are stored truncated and flagged. 0 to 10,240 KB; 0 turns body capture off.
requestLogCaptureHeadersstring[]content-type, content-length, user-agent, accept, accept-encoding, host, referer, originThe request headers stored, in lower case. Secret-looking headers (authorization, cookies, API keys) are never stored. An empty list stores none.
authMiddlewareNamePatternsstring[] (regex sources)^auth_, ^requireAuth, ^session_Middleware names matching one of these mark a route as authenticated in its documentation.
authMiddlewareCallbacksstring[][]Exact middleware names that mark a route as authenticated, alongside the patterns.
testerSourceSecretstringrandom per instanceKey the Tester's tokens are signed with. Set the same value on every instance behind one console.
The module refuses to start with a value the API settings page would refuse: statistics kept other than 30, 60 or 90 days, a slow threshold off its 50 ms step, a body cap or a log retention out of bounds, or a secret header in the captured list.

Settings page overrides

Values saved on the API settings page override the module configuration at runtime, without a restart.

Setting choiceEffect
Use defaultReturns a field to its module default and removes its override.
Retention valuesHave no Use default button, since lowering a retention deletes data.
Empty list of captured headersKeeps an explicit override: no header is captured.

The route scope (own routes, module routes, all routes) is a setting only; it has no configuration option.

Public API origin

The cURL and fetch snippets of a route and a request are written against the DMS's public API origin, its apiBaseUrl (read with GetApiBaseUrl()). Set it in the DMS configuration to the URL clients reach your API at, such as https://api.example.com. Under ajs dms dev it follows the dev server.

Data handling

Request logs can contain application data. Before collecting real traffic:

  • Review the capture and retention settings.
  • Use synthetic requests for screenshots or shared demos.

Values under keys that look secret (password, token, authorization, cookie, card numbers and so on) are replaced with [REDACTED] in bodies and query strings before storage. That list is fixed.