---
title: "Execute Snapshot"
method: POST
path: "/sources/snapshot"
tags: ["Sources"]
---

# Execute Snapshot

`POST /sources/snapshot`

Execute a snapshot for the specified source with configurable snapshot type.

This unified endpoint supports both incremental and blocking snapshots:

- **incremental** (default): Uses watermarking to capture data in chunks while streaming
  continues. Supports additional_conditions for filtered snapshots. Requires primary keys.

- **blocking**: Pauses streaming during the snapshot operation. Required for keyless
  tables. Faster for large tables but blocks streaming until complete.
  Note: additional_conditions filters are not supported for blocking snapshots.

For stopping/cancelling snapshots, use the cancel_snapshot endpoint which auto-detects
the running snapshot type and uses the appropriate cancellation method.

## Request body

- UnifiedSnapshotBody — Unified snapshot request body supporting all snapshot types. This model supports: - Incremental snapshots: Use watermarking, streaming continues, supports filters - Blocking snapshots: Pause streaming, useful for keyless tables or faster snapshots The snapshot_type field determines which snapshot mechanism is used. For stop operations, the type is auto-detected from the running snapshot.
  - `source_id` string, required
  - `topic_names` string[], nullable
  - `additional_conditions` AdditionalCondition[], nullable
    - `data_collection` string, required — The data collection (e.g., table or collection name) to apply the filter to.
    - `filter` string, required — The filter expression to apply to the data collection (e.g., createdAt > '2023-01-01').
  - `snapshot_type` 'incremental' | 'blocking' — Type of snapshot to execute. 'incremental' uses watermarking and allows streaming to continue. 'blocking' pauses streaming and is required for keyless tables. Note: additional_conditions and surrogate_key are only supported for incremental snapshots.
  - `surrogate_key` string, nullable — Column name to use as surrogate primary key for all tables during snapshot chunking. Only supported for incremental snapshots, not blocking snapshots.

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/streamkap/apis/streamkap-rest-api.md) · [All operations](https://skmtc.net/streamkap/apis/streamkap-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/streamkap/streamkap-rest-api/revisions/e9ce8221bac6/schema)
