📝 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user