Snapshots API
Snapshots are point-in-time copies of a Droplet’s disk. Use them for backup, recovery, or as a base image for new Droplets.
Create a Snapshot
POST /api/v1/droplets/{id}/snapshots
{
"name": "pre-upgrade-backup"
}
Response: 201 Created
{
"id": "snap_a1b2c3d4",
"droplet_id": "dpl_e5f6g7h8",
"name": "pre-upgrade-backup",
"status": "creating",
"size_gb": 25,
"created_at": "2024-01-15T10:30:00Z"
}
List Snapshots
GET /api/v1/droplets/{id}/snapshots
Returns all snapshots for a specific Droplet.
Response:
[
{
"id": "snap_a1b2c3d4",
"droplet_id": "dpl_e5f6g7h8",
"name": "pre-upgrade-backup",
"status": "available",
"size_gb": 25,
"created_at": "2024-01-15T10:30:00Z"
}
]
Restore from Snapshot
Restore a Droplet to a previous snapshot:
POST /api/v1/droplets/{id}/snapshots/{snapshotId}/restore
Restoring a snapshot replaces the current disk contents. This operation cannot be undone.
Snapshot Lifecycle
creating → available → restoring → available
↓
deleting → deleted
| Status | Description |
|---|
creating | Snapshot is being taken |
available | Ready for use or restore |
restoring | Being applied to a Droplet |
deleting | Being permanently removed |