Temporal Tracking — MDDB API

Document event history, hot-docs leaderboard and activity histograms (requires MDDB_TEMPORAL=true)

Query document event history #

POST /v1/temporal/query

Returns create/update/access events for a specific document within a time range. Requires MDDB_TEMPORAL=true.

Authorization: BearerAuth or APIKeyAuth or none

Request body #

Required.

Content type application/json: object

Property Type Description
collection (required) string
key (required) string
lang (required) string
eventType string Filter by event type; omit for all events One of "create", "update", "access".
from integer (int64) Unix timestamp; defaults to 30 days ago
to integer (int64) Unix timestamp; defaults to now
limit integer Default 100.
{
  "collection": "string",
  "eventType": "create",
  "from": 0,
  "key": "string",
  "lang": "string",
  "limit": 100,
  "to": 0
}

Responses #

Status Description Body
200 Event history object (application/json)
400 Missing required fields or temporal not available

Hot documents leaderboard #

POST /v1/temporal/hot

Returns the top-N most accessed documents in a collection. Requires MDDB_TEMPORAL=true.

Authorization: BearerAuth or APIKeyAuth or none

Request body #

Required.

Content type application/json: object

Property Type Description
collection (required) string
topN integer Default 10.
since integer (int64) Unix timestamp to filter events from
{
  "collection": "string",
  "since": 0,
  "topN": 10
}

Responses #

Status Description Body
200 Hot documents list object (application/json)
400 Missing required field or temporal not available

Event frequency histogram #

POST /v1/temporal/histogram

Returns a bucketed histogram of event frequency for a collection. Requires MDDB_TEMPORAL=true.

Authorization: BearerAuth or APIKeyAuth or none

Request body #

Required.

Content type application/json: object

Property Type Description
collection (required) string
eventType string One of "create", "update", "access". Default "access".
interval string One of "day", "week", "month". Default "day".
from integer (int64)
to integer (int64)
{
  "collection": "string",
  "eventType": "access",
  "from": 0,
  "interval": "day",
  "to": 0
}

Responses #

Status Description Body
200 Histogram buckets object (application/json)
400 Missing required field or temporal not available