Documentation Index
Fetch the complete documentation index at: https://visual-layer-my-changes.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
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.
Prerequisites
- A Visual Layer Cloud account with API access.
- A valid JWT token. See Authentication.
- 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.
List Snapshots
Retrieve all snapshots for a dataset, ordered newest first.Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
dataset_id | UUID | Yes | The dataset to list snapshots for. |
Example
Response
Snapshot Object Fields
Each snapshot in the response contains the following fields:| Field | Type | Description |
|---|---|---|
snapshot_id | UUID | Unique identifier for the snapshot. |
snapshot_name | string | Display name. Defaults to {dataset_name}_snapshot_{snapshot_id} if not set at creation. |
source_dataset_name | string | Name of the dataset this snapshot belongs to. |
created_at | datetime | ISO 8601 timestamp of when the snapshot was created. |
created_by | string | Email address of the user who created the snapshot. |
n_images | integer | Number of images in the dataset at the time of the snapshot. |
n_videos | integer | Number of videos in the dataset at the time of the snapshot. |
description | string | User-provided description, or empty string if none. |
reason | string | How the snapshot was created: manual, creation, or clone. |
training_model_id | UUID or null | Associated training model ID, if the snapshot was created during model training. |
training_model_name | string or null | Display name of the associated training model. |
is_current | boolean | true if this snapshot represents the active state of the dataset. |
is_restoring | boolean | true if a restore operation is currently in progress for this snapshot. |
reason field indicates how the snapshot was created:
creation— Automatically created when the dataset was first indexed.manual— Created by a user through the API or UI.clone— Created as part of a clone operation.
Create a Snapshot
Save the current state of a dataset as a named checkpoint.Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
dataset_id | UUID | Yes | The dataset to snapshot. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Display name for the snapshot. Defaults to {dataset_name}_snapshot_{snapshot_id} if omitted. |
description | string | No | Optional description to record why you created this checkpoint. Defaults to empty string. |
Example
Response
Returns the created snapshot object. See Snapshot Object Fields for the full schema.is_current: true).
Update a Snapshot
Change the name or description of an existing snapshot. This does not affect the saved data in the snapshot.Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
dataset_id | UUID | Yes | The dataset the snapshot belongs to. |
snapshot_id | UUID | Yes | The snapshot to update. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | New display name for the snapshot. |
description | string | No | New description text. |
Example
Response
Returns the updated snapshot object. See Snapshot Object Fields for the full schema.Restore 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.Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
dataset_id | UUID | Yes | The dataset to restore into. |
snapshot_id | UUID or current | Yes | The snapshot to restore from. Use the literal string current to restore the latest stable snapshot. |
Example
Response
Returns HTTP202 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 ID. The dataset returns to Ready status once the restore completes.
State During Restore
While a restore is in progress:- The dataset status changes to Read Only.
- The snapshot
is_restoringfield istruein the list response. - All data-modifying operations (enrichment, media addition, re-indexing) are blocked.
- Read operations (search, explore, export) continue to work against the pre-restore data.
Clone a Snapshot
Create a new, independent dataset from a snapshot. The original dataset is unaffected. This is an asynchronous operation.Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
dataset_id | UUID | Yes | The source dataset containing the snapshot. |
snapshot_id | UUID | Yes | The snapshot to clone from. |
Example
Response
Returns HTTP202 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.
Delete a Snapshot
Remove a snapshot from the catalog. This is a soft delete — the snapshot is hidden from all API responses but does not affect the current dataset data or any datasets previously cloned from the snapshot.Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
dataset_id | UUID | Yes | The dataset the snapshot belongs to. |
snapshot_id | UUID | Yes | The snapshot to delete. |
Example
Response
Returns HTTP200 OK with an empty body.
The snapshot marked as the current version cannot be deleted. Create a new snapshot first to change the current version, then delete the old one.
Python Example
This example demonstrates the full snapshot lifecycle: listing existing snapshots, creating a checkpoint, verifying it, and cleaning up.Use Cases
Checkpoint Before Enrichment
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.A/B Test Enrichment Models
Clone a snapshot to create two identical datasets, then apply different enrichment models to each for comparison.Audit Trail
List all snapshots to see the history of dataset checkpoints and understand how the dataset evolved over time.reason field distinguishes between the automatic creation snapshot, manual checkpoints, and cloned versions.
Operation Constraints
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.
Response Codes
See Error Handling for the error response format and Python handling patterns.| HTTP Code | Meaning |
|---|---|
| 200 | Request successful (list, create, update, delete). |
| 202 | Accepted — async operation started (restore, clone). |
| 403 | Forbidden — snapshot feature not enabled for this dataset, or insufficient permissions. |
| 404 | Dataset or snapshot not found. |
| 409 | Conflict — dataset not in valid status, conflicting operation running, or attempting to delete the current version. |
| 500 | Internal Server Error — contact support if this persists. |
Related Resources
Dataset Snapshots (UI)
Manage snapshots from the Visual Layer interface.
Task Manager
Track snapshot restore and clone operations programmatically.
Enrichment
Run AI models on your dataset — create a snapshot first as a safety net.
Export Dataset
Export a specific version of your dataset after restoring a snapshot.