# Snapshots

Diagnostic snapshots run 30+ node diagnostics covering the operating system, runtimes, certificates, network, kernel configuration, and logs. Results form a self-contained interactive HTML report. A ZIP of the Iggy data directory is optional.

Snapshots help diagnose node problems. They do not protect against data loss. For point-in-time recovery, use [Backups](/api/backups).

Use the Supervisor API, `{supervisor_url}`, for these requests.

Listing and downloading require `deployment:read`. Creation and deletion require `deployment:manage`.

Snapshot statuses: `processing`, `completed`

All plans support snapshots. Standard permits 3 with 7-day retention, Performance 5 with 14-day retention, and Enterprise 20 with 90-day retention.

***

## Create a Snapshot

`POST {supervisor_url}/deployments/{deployment_id}/snapshots`

Trigger a diagnostic snapshot on every node. Only one snapshot can be in progress per deployment at a time.

```bash
curl -X POST {supervisor_url}/deployments/{deployment_id}/snapshots \
-H "ld-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "redact_secrets": true,
  "include_iggy": true
}'
```

| Field | Default | Description |
| --- | --- | --- |
| `redact_secrets` | `true` | Mask passwords, keys, and tokens in the report |
| `include_iggy` | `true` | Bundle the Iggy data directory state as a separate ZIP |

The endpoint returns `204 No Content`. Status changes from `processing` to `completed` after every node finishes.

## List Snapshots

`GET {supervisor_url}/deployments/{deployment_id}/snapshots`

List all snapshots for the deployment, paginated by node.

```bash
curl "{supervisor_url}/deployments/{deployment_id}/snapshots?page=1&results=10" \
-H "ld-api-key: YOUR_API_KEY"
```

```json
{
  "items": [
    {
      "id": 1,
      "tenant_id": 615380456123456789,
      "workspace_id": 1,
      "environment_id": 1,
      "deployment_id": 611298765432109056,
      "node_id": 610809900976570889,
      "deployment_name": "events-prod",
      "name": "snapshot-20260601-103000",
      "status": "completed",
      "created_at": "2026-06-01T10:30:00Z",
      "completed_at": "2026-06-01T10:31:00Z"
    }
  ],
  "page": 1,
  "total_results": 1,
  "total_pages": 1
}
```

## Download a Snapshot

`GET {supervisor_url}/deployments/{deployment_id}/snapshots/{snapshot_id}/download`

Retrieve a presigned URL for the snapshot ZIP containing the interactive HTML report and the optional Iggy data bundle.

```bash
curl {supervisor_url}/deployments/{deployment_id}/snapshots/{snapshot_id}/download \
-H "ld-api-key: YOUR_API_KEY"
```

```json
{
  "url": "https://storage.example.com/snapshots/...?signature=..."
}
```

Download the archive promptly because the presigned URL expires.

## Delete a Snapshot

`DELETE {supervisor_url}/deployments/{deployment_id}/snapshots/{snapshot_id}`

Delete a snapshot and its stored archive.

```bash
curl -X DELETE {supervisor_url}/deployments/{deployment_id}/snapshots/{snapshot_id} \
-H "ld-api-key: YOUR_API_KEY"
```

A successful request returns `204 No Content`.

- [Snapshots Guide](/deployments/snapshots): Full list of diagnostic categories captured per node
- [Backups API](/api/backups): Point-in-time data backups (separate feature)

Source: https://docs.laserdata.com/api/snapshots
