From acebea353b540f4e0e3108a4c57de3a31daa8e45 Mon Sep 17 00:00:00 2001 From: Gabriel Radureau Date: Sun, 3 May 2026 00:01:43 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20docs(api):=20add=20/api/version?= =?UTF-8?q?=20endpoint=20reference?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- documentation/API.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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