Features — MDDB API

Module switches (v2.19.0+, GO-049) — optional modules such as chat, geo or temporal an administrator turns on and off; a disabled module's routes answer 404

List the module switches #

GET /v1/features

The server's optional modules (v2.19.0, GO-049) with whether each works now (enabled), its switch (configured), its default, the modules it requires, lockedBy when MDDB_FEATURES_FORCE_OFF forces it off, blockedBy for required modules that are off, and the store's version. A disabled module's routes answer 404 {"error":"feature disabled","feature":"<name>"}.

Authorization: BearerAuth or APIKeyAuth or none

Responses #

Status Description Body
200 Every module and the version counter object (application/json)
401 Auth is on (MDDB_AUTH_ENABLED=true) and the request carries no credentials, an invalid or expired JWT, or an unknown API key. ErrorResponse (application/json)
429 The client is over the API rate limit (MDDB_RATE_LIMIT_ENABLED=true, MDDB_RATE_LIMIT_REQUESTS per MDDB_RATE_LIMIT_WINDOW seconds). A call that embeds can also be refused by the collection's daily embedding budget, with a QuotaExceeded body. Since v2.19.8 (GO-054) a request over its tenant's or its credential's rate or concurrency limit is refused with a TenantLimit body. anyOf RateLimitError | TenantLimit (application/json)

401 example (application/json)

{
  "error": "missing authentication"
}

Switch a module on or off #

PUT /v1/features/{name}

Requires a global administrator and a writable server. The module's data stays; switching it back on restores it. Bumps the version.

Authorization: BearerAuth or APIKeyAuth or none

Parameters #

Name In Type Description
name (required) path string The module, e.g. geo

Request body #

Required.

Content type application/json: object

Property Type Description
enabled (required) boolean
{
  "enabled": false
}

Responses #

Status Description Body
200 The module's new state object (application/json)
400 The request is malformed (a body that is not JSON, a missing or invalid field, an unreadable body) or names a subsystem that is not initialized. The message says which. ErrorResponse (application/json)
401 Auth is on (MDDB_AUTH_ENABLED=true) and the request carries no credentials, an invalid or expired JWT, or an unknown API key. ErrorResponse (application/json)
403 The caller lacks the permission the route needs (SEC-019 access gate, auth on: read, write or admin on the collections the request names), or a write meets read-only mode (MDDB_MODE=read or the protocol's own mode). ErrorResponse (application/json)
404 No such module FeatureError (application/json)
409 Forced off by MDDB_FEATURES_FORCE_OFF; cannot be switched FeatureError (application/json)

400 example (application/json)

{
  "error": "missing collection"
}

401 example (application/json)

{
  "error": "missing authentication"
}

403 example (application/json)

{
  "error": "forbidden"
}