---
title: "Trigger Collection Processing"
method: POST
path: "/v1/collections/{collection_identifier}/trigger"
tags: ["Collections"]
---

# Trigger Collection Processing

`POST /v1/collections/{collection_identifier}/trigger`

Process data through a collection - works for both bucket-sourced and collection-sourced collections.

    **For bucket-sourced collections:**
    Discovers objects from source bucket(s), creates a batch, and submits for processing.
    Use `include_buckets` to limit which source buckets to process from.

    **For collection-sourced collections:**
    Processes existing documents from upstream collection(s).
    Use `include_collections` to limit which source collections to process from.

    **Filtering:**
    - `source_filters`: Field-level filters using LogicalOperator format
    - Example: `{"AND": [{"field": "status", "operator": "eq", "value": "pending"}]}`
    - For specific objects: `{"AND": [{"field": "object_id", "operator": "in", "value": ["obj_1", "obj_2"]}]}`

    **Returns:**
    - batch_id: Track progress via GET /batches/{batch_id}
    - task_id: Monitor via GET /tasks/{task_id}

## Path parameters

- `collection_identifier` string, required — The ID or name of the collection to trigger

## Request body

- TriggerCollectionRequest — Request to trigger (re)processing through a collection. **For bucket-sourced collections (tier 0):** Discovers objects from source bucket(s) and creates a batch for processing. Use `include_buckets` to limit which source buckets to process from. **For collection-sourced collections (tier N):** Processes existing documents from upstream collection(s). Use `include_collections` to limit which source collections to process from. Use `source_filters` for field-level filtering on objects or documents. **Document Overwrite Behavior:** - If source bucket has `unique_key` configured: Documents are UPSERTED (overwrites existing) - If source bucket has NO `unique_key`: New documents are CREATED (may cause duplicates) To enable idempotent re-processing, configure `unique_key` on the source bucket.
  - `include_buckets` string[], nullable — Limit processing to objects from these specific buckets (IDs or names). Only applies to bucket-sourced collections. If not provided, all configured source buckets are used.
  - `include_collections` string[], nullable — Limit processing to documents from these specific collections (IDs or names). Only applies to collection-sourced collections. If not provided, all configured source collections are used.
  - `object_ids` string[], nullable — Limit processing to these specific object IDs. Only applies to bucket-sourced collections. This is a convenience shorthand — equivalent to using source_filters with {"AND": [{"field": "object_id", "operator": "in", "value": [...]}]}.
  - `source_filters` LogicalOperatorInput — Represents a logical operation (AND, OR, NOT) on filter conditions. Allows nesting with a defined depth limit. Also supports shorthand syntax where field names can be passed directly as key-value pairs for equality filtering (e.g., {"metadata.title": "value"}).
    - `AND` union[], nullable — Logical AND operation - all conditions must be true
      - union
        - LogicalOperatorInput — recursive
        - FilterCondition — Represents a single filter condition. Attributes: field: The field to filter on operator: The comparison operator value: The value to compare against
          - `field` string, required — Field name to filter on
          - `operator` 'eq' | 'ne' | 'gt' | 'lt' | 'gte' | 'lte' | 'in' | 'nin' | 'contains' | 'starts_with' | 'ends_with' | 'regex' | 'exists' | 'is_null' | 'text' | 'phrase' | 'geo_radius' | 'geo_bounding_box' | 'geo_polygon' — Supported filter operators across database implementations.
          - `value` union, required — Value to compare against
            - DynamicValue — A value that should be dynamically resolved from the query request.
              - …
            - unknown
    - `OR` union[], nullable — Logical OR operation - at least one condition must be true
      - union
        - LogicalOperatorInput — recursive
        - FilterCondition — Represents a single filter condition. Attributes: field: The field to filter on operator: The comparison operator value: The value to compare against
          - `field` string, required — Field name to filter on
          - `operator` 'eq' | 'ne' | 'gt' | 'lt' | 'gte' | 'lte' | 'in' | 'nin' | 'contains' | 'starts_with' | 'ends_with' | 'regex' | 'exists' | 'is_null' | 'text' | 'phrase' | 'geo_radius' | 'geo_bounding_box' | 'geo_polygon' — Supported filter operators across database implementations.
          - `value` union, required — Value to compare against
            - DynamicValue — A value that should be dynamically resolved from the query request.
              - …
            - unknown
    - `NOT` union[], nullable — Logical NOT operation - all conditions must be false
      - union
        - LogicalOperatorInput — recursive
        - FilterCondition — Represents a single filter condition. Attributes: field: The field to filter on operator: The comparison operator value: The value to compare against
          - `field` string, required — Field name to filter on
          - `operator` 'eq' | 'ne' | 'gt' | 'lt' | 'gte' | 'lte' | 'in' | 'nin' | 'contains' | 'starts_with' | 'ends_with' | 'regex' | 'exists' | 'is_null' | 'text' | 'phrase' | 'geo_radius' | 'geo_bounding_box' | 'geo_polygon' — Supported filter operators across database implementations.
          - `value` union, required — Value to compare against
            - DynamicValue — A value that should be dynamically resolved from the query request.
              - …
            - unknown
    - `case_sensitive` boolean, nullable — Whether to perform case-sensitive matching
  - `dedup_strategy` 'skip' | 'replace' | 'force' — Controls how duplicate objects are handled during batch processing. Dedup is scoped to (bucket_id, collection_id): an object is considered a duplicate if the target collection already has documents produced from the same source object in any prior batch.

## Response `202`

Successful Response

- TriggerCollectionResponse — Response after triggering collection processing. Use `batch_id` or `task_id` to monitor progress via GET /v1/batches/{batch_id} or GET /v1/tasks/{task_id}.
  - `batch_id` string, required — ID of the created batch for tracking progress.
  - `task_id` string, required — Task ID for monitoring via GET /v1/tasks/{task_id}.
  - `collection_id` string, required — ID of the collection being processed.
  - `source_bucket_ids` string[], nullable — Bucket IDs that objects were discovered from (bucket-sourced collections).
  - `source_collection_ids` string[], nullable — Collection IDs that documents were read from (collection-sourced collections).
  - `object_count` integer, nullable — Total number of objects included in the batch (bucket-sourced collections).
  - `document_count` integer, nullable — Total number of documents to process (collection-sourced collections).
  - `total_tiers` integer, required — Number of processing tiers in the DAG.
  - `message` string, required — Human-readable status message.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Validation Error
- `500` — Internal Server Error

---

[API](https://skmtc.net/mixpeek/apis/mixpeek-api.md) · [All operations](https://skmtc.net/mixpeek/apis/mixpeek-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mixpeek/mixpeek-api/versions/220a3b263fda/schema)
