HeatherDB

Search documentation

Loading the documentation index…

Download
HeatherDB documentation
DocumentationHTTP API

Dream endpoint

On-demand consolidation. One route, and no legacy form — dreaming is addressed by database only. See Dreaming.

POST /db/{db}/dream

Trigger idle-time consolidation now, ignoring the idle gate and the dream.enabled opt-in: a manual trigger should not require the database to have opted in. Runs synchronously and answers with what it did.

Auth: Basic or Bearer, root or Database(db).

Request body: no body. Query parameters override the persisted [dream] config for this call only:

ParamTypeMeaning
modereplay | ladderReorganise in place, or build <name>__L1, __L2… derived collections. Anything other than ladder (case-insensitive) is read as replay
levelsintegerReplay: granularity passes. Ladder: levels to climb
tau_coherefloatLadder: minimum counter coherence to join a family
tau_splitfloatLadder: minimum address similarity for a candidate family
collectionscomma-separated stringRestrict to these collections. Default: all
curl -u admin:pw -X POST \
  'http://localhost:6380/db/movies/dream?mode=replay&levels=1&collections=taste'
{ "database": "movies",
  "collections": [
    { "collection": "taste", "passes": 1, "locations_before": 812,
      "locations_after": 806, "merged": 6,
      "tau_split": 0.0, "tau_cohere": 0.0 }
  ] }

tau_split and tau_cohere are the boundaries the ladder actually used (auto-calibrated when the caller left them unset); both are 0.0 for replay passes.

The call blocks for the length of the dream, so it is subject to --request-timeout (default 30s) on a large database. The background dream loop is unaffected by this route.

StatusCause
403 Forbiddenthe caller is scoped to a different database
404 Not Foundno such database
408 Request Timeoutthe dream outlasted --request-timeout
500 Internal Server Errorstorage failure during consolidation