Build metadata
GET
/version
const url = 'https://example.com/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/versionReturns deliberate build metadata only (invariant #9) — version and commit, ldflags-injected at build time. Exempt from authentication (invariant #1).
Responses
Section titled “Responses”Build metadata.
Media typeapplication/json
object
version
required
Ldflags-injected build version.
string
commit
required
Ldflags-injected short commit SHA.
string
Examplegenerated
{ "version": "example", "commit": "example"}