Skip to content

[C4GT Community]: Implement /health and /version Endpoints Across All API Repositories #102

@Sneha6003

Description

@Sneha6003

Ticket Contents

Description

We need to implement standard /health and /version endpoints across all API repositories to improve observability, maintainability, and deployment traceability.

/health: Should return a minimal response indicating the service is live and healthy. Useful for uptime monitoring, and load balancers.

/version: Should return metadata including the latest Git commit hash and build timestamp.

Goals

Goals

  • Implement /health in all API services with a 200 response and status message.
  • Implement /version to return commit hash and build timestamp.
  • Automate generation of version metadata during the build.
  • Ensure all responses follow a consistent JSON schema across services.

Expected Outcome

  • Every API repository has a functional /health and /version endpoint.
  • Endpoints are minimal, fast, and production-safe.
  • No disruption to existing routes or CI/CD workflows.

Acceptance Criteria

  • /health responds with { "status": "UP" } on all services.
  • /version returns consistent metadata in JSON format.
  • GitHub Actions or other CI tools validate the presence of these endpoints.

Implementation Details

  • Use existing web framework to expose both endpoints.
  • Ensure these endpoints are lightweight, do not require authentication, and are safe to expose in production.

Mockups/Wireframes

No response

Product Name

AMRIT

Organisation Name

Piramal Swasthya Management and Research Institute

Domain

No response

Tech Skills Needed

Spring Boot

Organizational Mentor

@drtechie

Angel Mentor

No response

Complexity

Medium

Category

Configuration, CI/CD, Accessibility

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions