Maintenance — MDDB API
Database maintenance operations
Truncate revision history #
POST /v1/truncate
Remove old revisions to save disk space. Keeps the latest N revisions per document.
Warning: This operation is irreversible.
Authorization: BearerAuth or APIKeyAuth or none
Request body #
Required.
Content type application/json: TruncateRequest
{
"collection": "blog",
"dropCache": true,
"keepRevs": 3
}
Responses #
| Status | Description | Body |
|---|---|---|
200 |
Revisions truncated successfully | object (application/json) |
400 |
Invalid request | ErrorResponse (application/json) |
403 |
Read-only mode | ErrorResponse (application/json) |