---
search:
  tags:
    - Sources
    - POST
seo:
  description: >-
    Execute a snapshot for the specified source with configurable snapshot type.
    Reference for the POST /sources/snapshot endpoint in the Streamkap REST API.
sidebar:
  label: Execute Snapshot
  badge: POST
title: Execute Snapshot
type: openapi-operation
---
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.

`POST /sources/snapshot`

**Request body** (`application/json`, required)

- `source_id` (string, required)
- `topic_names` (string[] | null)
- `additional_conditions` (AdditionalCondition[] | null)
- `snapshot_type` (string) — 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 | null) — Column name to use as surrogate primary key for all tables during snapshot chunking. Only supported for incremental snapshots, not blocking snapshots.

Request body example:

```json
{
  "source_id": "string",
  "topic_names": [
    "string"
  ],
  "additional_conditions": [
    {
      "data_collection": "string",
      "filter": "string"
    }
  ],
  "snapshot_type": "incremental",
  "surrogate_key": "string"
}
```

**Responses**

- `200` — Successful Response
- `422` — Validation Error
