History & commits
Every file (template assets and the reserved helpers.hbs / data.json /
options.json) has its own version history. {file} is the filename.
| Method | Path | Purpose |
|---|---|---|
GET | /api/reports/{id}/history/{file} | List versions of a file. |
GET | /api/reports/{id}/history/{file}/{version} | Get one version's metadata. |
GET | /api/reports/{id}/history/{file}/{version}/download | Download that version. |
POST | /api/reports/{id}/history/{file}/{version}/restore | Restore that version. |
Commits
A commit groups the files that changed into one named history entry.
| Method | Path | Purpose |
|---|---|---|
POST | /api/reports/{id}/commits | Capture changed files as a commit. |
GET | /api/reports/{id}/commits | List commits. |
GET | /api/reports/{id}/commits/{number} | Get one commit + its files. |
Create body: { "message": "…", "description": "…" } — message required,
description optional. A commit that would record zero changes is rejected with
422 empty_commit. If the backend was started without the commit/version store
configured, the commit and history endpoints respond 503 versions_unavailable.