📝 docs(api): add /api/version endpoint reference

Endpoint introduced in PR #16 (commit c17fb4f) was missing from our
restructured documentation/API.md. Catching up before merging origin/main
into this feature branch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-03 00:01:43 +02:00
parent 732eee7586
commit acebea353b

View File

@@ -58,6 +58,21 @@ GET /api/health
{"status":"healthy"} {"status":"healthy"}
``` ```
## Version Info
```http
GET /api/version
GET /api/version?format=plain
GET /api/version?format=full
GET /api/version?format=json
```
Returns the running binary version (injected at build time via `-ldflags`). The `format` query parameter controls the response shape:
- `format=plain` (or `?format=short`): plain text version (e.g. `1.0.0`)
- `format=full`: detailed multi-line text (Version, Commit, Built date, Go version)
- `format=json` (default): structured JSON `{"version": "1.0.0", "commit": "abc1234", "built": "...", "go_version": "go1.26.1"}`
## Readiness Check ## Readiness Check
```http ```http