Skip to content

Add unauthenticated /version endpoint to ambient-api-server #1598

@jeremyeder

Description

@jeremyeder

Summary

The ambient-api-server has no version endpoint. The Makefile already injects Version and BuildTime via ldflags, but the target Go variables don't exist yet. No changes to rh-trex-ai are needed.

Proposed Change

Add GET /version as an unauthenticated endpoint returning:

{"version": "<git-sha>", "build_time": "<timestamp>", "api_version": "v1"}

Five files touched:

  • pkg/api/api.go — declare Version and BuildTime vars (ldflags targets)
  • pkg/middleware/bearer_token.go — add /version to auth bypass
  • plugins/proxy/plugin.go — add /version to native paths
  • plugins/version/plugin.go — new plugin serving the endpoint via RegisterPreAuthMiddleware
  • cmd/ambient-api-server/main.go — import the version plugin

cc @markturansky

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions