Skip to content
Streamkap
Esc
↑↓navigate↵open⌘Jpreview

Execute 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.

POST/sources/snapshot
Authorization
AuthorizationBearer token · headerrequired
Request body
requiredapplication/json
source_idstringrequired
topic_namesstring[] | null
Show properties
Any of:
string[]
Array of string
string
null
null
additional_conditionsAdditionalCondition[] | null
Show properties
Any of:
AdditionalCondition[]
Array of AdditionalCondition
data_collectionstringrequired

The data collection (e.g., table or collection name) to apply the filter to.

filterstringrequired

The filter expression to apply to the data collection (e.g., createdAt > '2023-01-01').

null
null
snapshot_typestring

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.

default: "incremental"
Allowed:incrementalblocking
surrogate_keystring | null

Column name to use as surrogate primary key for all tables during snapshot chunking. Only supported for incremental snapshots, not blocking snapshots.

Show properties
Any of:
string
string
null
null
Responses
200

Successful Response

any
422

Validation Error

detailValidationError[]
Show properties
Array of ValidationError
locstring | integer[]required
Show properties
Array of string | integer
Any of:
string
string
integer
integer
msgstringrequired
typestringrequired
inputany
ctxobject
Request
curl -X POST 'https://api.streamkap.com/sources/snapshot' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "source_id": "string",
  "topic_names": [
    "string"
  ],
  "additional_conditions": [
    {
      "data_collection": "string",
      "filter": "string"
    }
  ],
  "snapshot_type": "incremental",
  "surrogate_key": "string"
}'
Response
Successful Response