Problem
GET /snapshots lists snapshots but there is no way to retrieve a single snapshot by ID or delete one. The SnapshotInfo schema only exposes snapshotID and names — users cannot see resource specs (vCPU, RAM, disk) or creation time without listing all snapshots and filtering client-side.
Proposed changes
New endpoints
GET /snapshots/{snapshotID} — return SnapshotInfo for a single snapshot (404 if not found or not owned by team)
DELETE /snapshots/{snapshotID} — soft-delete a snapshot template, release its aliases, return 204
Enhanced SnapshotInfo
Add four fields populated from the existing ListTeamSnapshotTemplatesRow query result (no new DB queries needed):
| Field |
Source column |
cpuCount |
vcpu |
memoryMB |
ram_mb |
diskSizeMB |
total_disk_size_mb |
createdAt |
created_at |
Implementation notes
GET handler resolves the alias via templateCache.ResolveAlias (same path as POST /snapshots/{id}/fork) then calls ListTeamSnapshotTemplates with PageLimit=1.
DELETE handler reuses the existing unexported softDeleteTemplate helper from template_delete.go and invalidates the template cache.
api.gen.go is manually maintained (not regenerated from spec); updated by hand following existing patterns.
Problem
GET /snapshotslists snapshots but there is no way to retrieve a single snapshot by ID or delete one. TheSnapshotInfoschema only exposessnapshotIDandnames— users cannot see resource specs (vCPU, RAM, disk) or creation time without listing all snapshots and filtering client-side.Proposed changes
New endpoints
GET /snapshots/{snapshotID}— returnSnapshotInfofor a single snapshot (404 if not found or not owned by team)DELETE /snapshots/{snapshotID}— soft-delete a snapshot template, release its aliases, return 204Enhanced
SnapshotInfoAdd four fields populated from the existing
ListTeamSnapshotTemplatesRowquery result (no new DB queries needed):cpuCountvcpumemoryMBram_mbdiskSizeMBtotal_disk_size_mbcreatedAtcreated_atImplementation notes
GEThandler resolves the alias viatemplateCache.ResolveAlias(same path asPOST /snapshots/{id}/fork) then callsListTeamSnapshotTemplateswithPageLimit=1.DELETEhandler reuses the existing unexportedsoftDeleteTemplatehelper fromtemplate_delete.goand invalidates the template cache.api.gen.gois manually maintained (not regenerated from spec); updated by hand following existing patterns.