---
title: "Snapshot data model"
url: "https://docs.unified.to/compute/snapshot/model"
description: "The Snapshot data model object in Unified's Snapshot API: 11 fields, including created_at, updated_at and name, with types and enum values."
---
# Snapshot data model

 View field support, webhooks, and list parameters for each integration on the [Supported Integrations](https://docs.unified.to/compute/integrations.md) page. 

| Field                    | Type                                                                                     | Required | Description                                                                   |
| ------------------------ | ---------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------- |
| id                       | string                                                                                   | No       | Unique identifier for the snapshot                                            |
| created\_at              | string (date-time)                                                                       | No       | When the snapshot was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)        |
| updated\_at              | string (date-time)                                                                       | No       | When the snapshot was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)   |
| name                     | string                                                                                   | No       | Display name of the snapshot                                                  |
| instance\_id             | string                                                                                   | No       | The instance the snapshot was taken from                                      |
| volume\_id               | string                                                                                   | No       | The volume the snapshot was taken from                                        |
| type                     | enum                                                                                     | No       | Whether memory state is included Values: MEMORY, DISK, OTHER                  |
| status                   | enum                                                                                     | No       | Normalized snapshot status Values: CREATING, READY, FAILED, DELETING, OTHER   |
| size\_mb                 | number                                                                                   | No       | Snapshot size in MiB                                                          |
| expires\_at              | string (date-time)                                                                       | No       | When the snapshot will be deleted (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)    |
| metadata                 | [ComputeMetadata](https://docs.unified.to/compute/snapshot/model.md#ComputeMetadata)\[\] | No       | Vendor labels, tags and metadata                                              |
| metadata\[\].id          | string                                                                                   | No       |                                                                               |
| metadata\[\].slug        | string                                                                                   | No       | The label, tag or metadata key                                                |
| metadata\[\].value       | object                                                                                   | No       | The label, tag or metadata value                                              |
| metadata\[\].namespace   | string                                                                                   | No       | The origin of the value (eg. labels, tags, metadata)                          |
| metadata\[\].format      | enum                                                                                     | No       | The data type of the value Values: TEXT, NUMBER, DATE, BOOLEAN, ARRAY, OBJECT |
| metadata\[\].extra\_data | object                                                                                   | No       |                                                                               |

## TypeScript

```typescript
export type ComputeSnapshot = {
	id?: string; // Unique identifier for the snapshot
	created_at?: string-time; // When the snapshot was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-time; // When the snapshot was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	name?: string; // Display name of the snapshot
	instance_id?: string; // The instance the snapshot was taken from
	volume_id?: string; // The volume the snapshot was taken from
	type?: 'MEMORY' | 'DISK' | 'OTHER'; // Whether memory state is included
	status?: 'CREATING' | 'READY' | 'FAILED' | 'DELETING' | 'OTHER'; // Normalized snapshot status
	size_mb?: number; // Snapshot size in MiB
	expires_at?: string-time; // When the snapshot will be deleted (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	metadata?: []; // Vendor labels, tags and metadata
	raw?: any; // Raw data from integration
} 
```

## Zod

```typescript
import { z } from 'zod';

export const ZodComputeSnapshot = z.object({
	id: z.string().optional().describe("Unique identifier for the snapshot"),
	created_at: z.string-time().optional().describe("When the snapshot was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("When the snapshot was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	name: z.string().optional().describe("Display name of the snapshot"),
	instance_id: z.string().optional().describe("The instance the snapshot was taken from"),
	volume_id: z.string().optional().describe("The volume the snapshot was taken from"),
	type: z.enum("MEMORY", "DISK", "OTHER").optional().describe("Whether memory state is included"),
	status: z.enum("CREATING", "READY", "FAILED", "DELETING", "OTHER").optional().describe("Normalized snapshot status"),
	size_mb: z.number().optional().describe("Snapshot size in MiB"),
	expires_at: z.string-time().optional().describe("When the snapshot will be deleted (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	metadata: z.array().optional().describe("Vendor labels, tags and metadata"),

});
```

## Python

```python
import dataclasses

@dataclasses.dataclass
class ComputeSnapshotType(str, Enum):
	MEMORY = 'MEMORY'
	DISK = 'DISK'
	OTHER = 'OTHER'

@dataclasses.dataclass
class ComputeSnapshotStatus(str, Enum):
	CREATING = 'CREATING'
	READY = 'READY'
	FAILED = 'FAILED'
	DELETING = 'DELETING'
	OTHER = 'OTHER'

@dataclasses.dataclass
class ComputeSnapshot:
	"""Unique identifier for the snapshot"""
	id: Optional[str]
	"""When the snapshot was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""When the snapshot was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	"""Display name of the snapshot"""
	name: Optional[str]
	"""The instance the snapshot was taken from"""
	instance_id: Optional[str]
	"""The volume the snapshot was taken from"""
	volume_id: Optional[str]
	"""Whether memory state is included"""
	type: Optional[ComputeSnapshotType]
	"""Normalized snapshot status"""
	status: Optional[ComputeSnapshotStatus]
	"""Snapshot size in MiB"""
	size_mb: Optional[int]
	"""When the snapshot will be deleted (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	expires_at: Optional[str]
	"""Vendor labels, tags and metadata"""
	metadata: Optional[PropertyComputeSnapshotMetadata]

```
