Get server version
const url = 'https://example.com/api/version';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/versionUnauthenticated endpoint that returns the running server’s build identity for display in the web UI footer. What it reveals is governed by version.mode: “show” (the real build), “hide” (nothing), or “fake” (a fixed string). Values come from the build stamp; an untagged build reports “development” and omits the release URL.
Responses
Section titled “Responses”Build identity of the running server
object
object
Commit is the git revision the build came from. It is what identifies a “development” build, which has no release of its own to point at.
GithubURL is the project’s source repository. Served rather than hardcoded in the frontend so that a fork only has to change internal/version.
ReleaseURL points at the GitHub release matching Version. Omitted for an untagged build, where there is no release page to link to.
Version is the release this binary was built from, without the tag’s leading “v” (goreleaser and the Makefile both strip it). Untagged builds report the “development” default from internal/version.
Example generated
{ "data": { "commit": "example", "github_url": "example", "release_url": "example", "version": "example" }, "error": "example"}