Data Version Snapshots API Code Samples
Selection of code samples that demonstrate the use of the Data Version Snapshots API. Copy and edit these code samples to suit your needs.
When using the code samples, remember to replace:
- {vanity_name} with your tenant name
- {api_key} with your API key
- {security_token} with a valid security token
These code samples may not include all available parameters and request body fields for each endpoint. For the endpoint's full request schema, see "Data Version Snapshots" in API Reference.
Retrieve data version snapshots
Use this sample request to retrieve all the data version snapshots in your tenant.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1alpha/admin/data-version-snapshots' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
The response returns the list of snapshots.
{
"dataVersionSnapshots": [
{
"id": "3f9a5d2c-8b1e-4c7a-9f2d-1a2b3c4d5e6f",
"name": "Q1 2026 snapshot",
"description": "Snapshot taken after the Q1 data load",
"dataVersionId": "1024",
"productionVersionId": "7c1b9e4a-2d3f-4a5b-8c9d-0e1f2a3b4c5d",
"createdAt": "2026-07-31T18:24:05.000Z",
"creatorId": "30217"
},
{
"id": "a2d4e6f8-1234-4b5c-8d9e-0f1a2b3c4d5e",
"name": "Baseline snapshot",
"dataVersionId": "998",
"productionVersionId": "5a6b7c8d-9e0f-4a1b-2c3d-4e5f6a7b8c9d",
"createdAt": "2026-06-15T09:10:00.000Z",
"creatorId": "30217"
}
]
}
Retrieve a data version snapshot
Use this sample request to retrieve the details of a specific data version snapshot.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1alpha/admin/data-version-snapshots/3f9a5d2c-8b1e-4c7a-9f2d-1a2b3c4d5e6f' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
The response returns the snapshot's details.
{
"id": "3f9a5d2c-8b1e-4c7a-9f2d-1a2b3c4d5e6f",
"name": "Q1 2026 snapshot",
"description": "Snapshot taken after the Q1 data load",
"dataVersionId": "1024",
"productionVersionId": "7c1b9e4a-2d3f-4a5b-8c9d-0e1f2a3b4c5d",
"createdAt": "2026-07-31T18:24:05.000Z",
"creatorId": "30217"
}
Create a data version snapshot
Use this sample request to create a new data version snapshot. This example omits the data version ID and production version ID so it creates a data version snapshot using the latest production version.
curl -X POST --url 'https://{vanity_name}.api.visier.io/v1alpha/admin/data-version-snapshots' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
-d '{
"name": "Q1 2026 snapshot"
}'
Use this sample request to create a new data version snapshot of a specific data version.
curl -X POST --url 'https://{vanity_name}.api.visier.io/v1alpha/admin/data-version-snapshots' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
-d '{
"name": "Q1 2026 snapshot",
"dataVersionId": "1024"
}'
The response returns the new snapshot's details.
{
"id": "3f9a5d2c-8b1e-4c7a-9f2d-1a2b3c4d5e6f",
"name": "Q1 2026 snapshot",
"description": "Snapshot taken after the Q1 data load",
"dataVersionId": "1024",
"productionVersionId": "7c1b9e4a-2d3f-4a5b-8c9d-0e1f2a3b4c5d",
"createdAt": "2026-07-31T18:24:05.000Z",
"creatorId": "30217"
}
Delete a data version snapshot
Use this sample request to delete an existing data version snapshot.
curl -X DELETE --url 'https://{vanity_name}.api.visier.io/v1alpha/admin/data-version-snapshots/3f9a5d2c-8b1e-4c7a-9f2d-1a2b3c4d5e6f' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
The response returns a 200 OK with an empty body.
