v5
latestOpenAPI 3.1.02026-08-025631,1012.8 MBCollection Documents
Batch Update Documents
Batch update multiple documents by explicit IDs or filters.
Supports TWO modes:
-
Explicit IDs mode: Provide 'updates' array with document_id + update_data for each document
- Each document can have DIFFERENT update_data
- Returns detailed per-document results
-
Filter mode: Provide 'filters' + 'update_data' to update all matching documents
- All documents receive the SAME update_data
- Returns total count only
Key Features:
- Update any document field except vectors (metadata, internal_metadata, source_blobs, etc.)
- Maximum 1000 documents per batch in explicit mode
- Per-document success/failure reporting in explicit mode
- Validates documents exist in the specified collection
Examples: Explicit IDs mode: json { "updates": [ {"document_id": "doc_123", "update_data": {"metadata": {"status": "processed"}}}, {"document_id": "doc_456", "update_data": {"metadata": {"status": "archived"}}} ] }
Filter mode (logical AND/OR/NOT shape — NOT MVS-native must/key):
```json
{
"filters": {"AND": [{"field": "metadata.status", "operator": "eq", "value": "pending"}]},
"update_data": {"metadata": {"status": "processed"}}
}
```
post/v1/collections/{collection_identifier}/documents/batch
Path parameters
collection_identifierstring required
The ID of the collection to update documents in.
The ID of the collection to update documents in.
Request body
Example request
{
"description": "Explicit IDs mode: Update 3 documents with different values",
"updates": [
{
"document_id": "doc_frame_001",
"update_data": {
"metadata": {
"quality_score": 0.95,
"reviewed": true
}
}
},
{
"document_id": "doc_frame_002",
"update_data": {
"metadata": {
"flagged": true,
"quality_score": 0.87
}
}
},
{
"document_id": "doc_frame_003",
"update_data": {
"metadata": {
"discarded": true,
"quality_score": 0.72
}
}
}
]
}Response
Successful Response
Example response
{
"failed_count": 0,
"message": "Successfully updated 3 document(s)",
"results": [
{
"document_id": "doc_123",
"success": true
},
{
"document_id": "doc_456",
"success": true
},
{
"document_id": "doc_789",
"success": true
}
],
"updated_count": 3
}