Create, list, update, restore, clone, and delete dataset snapshots for version control and safe rollbacks.
How This Helps
Snapshots capture the exact state of a dataset — media, metadata, enrichment models, clustering, tags, and labels — at a specific point in time. Use them to create checkpoints before risky operations, roll back to known-good states, or clone a dataset version for parallel experimentation.
A dataset ID for a dataset in Ready status with snapshot support enabled. See Retrieve Dataset Status.
Snapshots are available only for datasets created with snapshot support. Older datasets created before this feature may not support snapshots. Contact support to enable snapshot support on an existing dataset.
The new snapshot becomes the dataset’s current version (is_current: true).
Snapshot creation is blocked while any of the following operations are running on the dataset: dataset creation, enrichment, media addition, re-indexing, label propagation, custom metadata import, or snapshot restore. Wait for the active operation to complete before creating a snapshot.
Revert a dataset to a previously saved snapshot state. This is an asynchronous operation — the dataset enters Read Only status while the restore processes.
POST /api/v1/dataset/{dataset_id}/snapshot/{snapshot_id}/restoreAuthorization: Bearer <jwt>
Returns HTTP 202 Accepted with an empty body. The restore operation runs asynchronously.Track the restore progress using the Task Manager API. A SNAPSHOT_RESTORE task appears with the dataset’s ID. The dataset returns to Ready status once the restore completes.
Restore replaces all current dataset data — media, metadata, enrichment results, clustering, tags, and labels — with the snapshot’s saved state. This operation cannot be undone. Create a new snapshot of the current state before restoring if you want to preserve it.
Returns HTTP 202 Accepted with an empty body. The clone operation runs asynchronously.The new dataset appears in the Dataset Inventory with the name {Original Dataset Name} (cloned). Track the clone progress using the Task Manager API. A SNAPSHOT_CLONE task appears for the new dataset.
The cloned dataset is fully independent. Changes to the clone do not affect the original dataset, and changes to the original do not affect the clone.
Remove a snapshot from the catalog. This is a soft delete — the snapshot is hidden from all API responses but does not affect the dataset’s current data or any datasets previously cloned from the snapshot.
Create a snapshot before running a new enrichment model. If the results are unsatisfactory, restore the snapshot to undo the enrichment and try a different model.
# 1. Create checkpointcurl -X POST -H "Authorization: Bearer <jwt>" \ -H "Content-Type: application/json" \ -d '{"name": "pre-captioning", "description": "Before VL-Image-Captioner run"}' \ "https://app.visual-layer.com/api/v1/dataset/<dataset_id>/snapshot"# 2. Run enrichment (separate API call)# ...# 3. If results are not satisfactory, restore the checkpointcurl -X POST -H "Authorization: Bearer <jwt>" \ "https://app.visual-layer.com/api/v1/dataset/<dataset_id>/snapshot/<snapshot_id>/restore"
Clone a snapshot to create two identical datasets, then apply different enrichment models to each for comparison.
# 1. Create a snapshot of the baseline datasetcurl -X POST -H "Authorization: Bearer <jwt>" \ -H "Content-Type: application/json" \ -d '{"name": "baseline-for-comparison"}' \ "https://app.visual-layer.com/api/v1/dataset/<dataset_id>/snapshot"# 2. Clone the snapshot to a new datasetcurl -X POST -H "Authorization: Bearer <jwt>" \ "https://app.visual-layer.com/api/v1/dataset/<dataset_id>/snapshot/<snapshot_id>/clone"# 3. Run Model A on the original, Model B on the clone, and compare results
Keep the following constraints in mind when working with the Snapshot API:
The dataset must be in Ready status to create a snapshot. Restore and clone also accept Partial Index and Error statuses.
Snapshot creation is blocked while another operation is running (enrichment, media addition, re-indexing, label propagation, custom metadata import, or snapshot restore).
Restore is blocked while any major operation is running, including other restore or clone operations.
Clone operations run on the new dataset, so they do not block operations on the source dataset.
The current version snapshot cannot be deleted. Create a new snapshot to change the current version first.
Restore and clone are asynchronous. The dataset enters Read Only status during restore. Track progress through the Task Manager API.