Collection Documents

Bulk Update Documents

Changed on

Bulk update documents matching filter conditions.

Partially updates all documents in the collection that match the provided filters. If no filters are provided, updates all documents in the collection.

This endpoint applies the SAME update_data to ALL documents matching the filters. For per-document updates with different values, use POST /batch endpoint instead.

patch/v1/collections/{collection_identifier}/documents/bulk

Request

  • Base URL: https://api.mixpeek.com
  • URL: https://api.mixpeek.com/v1/collections/{collection_identifier}/documents/bulk
  • Auth: HTTP bearer and API key in header X-Namespace

Path parameters

collection_identifierstring required

The ID of the collection to update documents in.

Request body

update_dataobject required

REQUIRED. Dictionary of field-value pairs to update on ALL matching documents. Can update any document field except vectors (metadata, source_blobs, etc.). All matched documents receive the SAME updates. A dotted key sets one nested field and keeps its siblings: {'metadata.status': 'processed'} changes only metadata.status. A key without a dot replaces that whole top-level field, so {'metadata': {'status': 'processed'}} replaces the entire metadata object and drops its other keys. Object values are stored as given, but read back with their keys in alphabetical order. Example: {'metadata.status': 'processed', 'metadata.reviewed': true}

Example request

{
  "description": "Update all pending documents to processed",
  "filters": {
    "AND": [
      {
        "field": "metadata.status",
        "operator": "eq",
        "value": "pending"
      }
    ]
  },
  "update_data": {
    "metadata.status": "processed"
  }
}

Response

Successful Response

task_idstring nullable

Id of the background task running the bulk update. Poll GET /v1/tasks/{task_id} for status and the final updated_count.

statusstring nullable

Task status at enqueue time (PENDING). The terminal status (COMPLETED / FAILED) and updated_count land on the task record.

updated_countinteger nullable

Number of documents updated. Null on the async enqueue response; populated on the task record when the task completes.

messagestring

Changes

    • warning

      removed the optional property from the response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the new words enum value to the request property //////

    • info

      added the new words enum value to the request property //////

    • info

      added the new words enum value to the request property //////