diff --git a/documentation/API.md b/documentation/API.md index 509da87..82dac5b 100644 --- a/documentation/API.md +++ b/documentation/API.md @@ -58,6 +58,21 @@ GET /api/health {"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 ```http