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
string
required
Name for the snapshot
{
  "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
StatusDescription
creatingSnapshot is being taken
availableReady for use or restore
restoringBeing applied to a Droplet
deletingBeing permanently removed