Delete multiple documents matching IDs or filter criteria
ids or filter must be provided.Maximum: 1000 IDs (configurable)ids or filter must be provided.handlers_batch.go:546-556:
For collections with versioning enabled, the current state of each document is saved as a version snapshot before deletion. This allows for potential recovery through the version history.
handlers_batch.go:559-595:
handlers_batch.go:541-544:
The provided filter/IDs are combined with RBAC query filters to ensure users can only delete documents they have permission to access.
filter parameter supports MongoDB query operators:
$eq, $ne: Equal, not equal$gt, $gte, $lt, $lte: Comparison operators$in, $nin: Array membership$and, $or, $not: Logical operators$exists: Field existence check$regex: Pattern matchingdeleted field and filtering it in queries instead of hard deletesdelete permission for the collectionids or filter must be provided (not both)ids parametercollection_not_found: Collection does not existforbidden: User lacks delete permissionbad_request: Invalid request (missing ids/filter, invalid IDs, batch size exceeded)internal_error: Database operation failedhandlers_batch.go:597-602
pkg/api/handlers_batch.go:461-610