feat(server): add GET /api/v1/uptime endpoint #67

Merged
arcodange merged 1 commits from vibe/batch2-task-b-uptime into main 2026-05-05 19:18:25 +02:00
Owner

Add new GET /api/v1/uptime endpoint that returns server start time and uptime duration in seconds. The endpoint follows the same pattern as handleHealth and handleInfo handlers, using the existing startedAt field from the Server struct. Response includes start_time in RFC3339 format and uptime_seconds as integer. Includes unit tests with httptest.NewRecorder().

Add new GET /api/v1/uptime endpoint that returns server start time and uptime duration in seconds. The endpoint follows the same pattern as handleHealth and handleInfo handlers, using the existing startedAt field from the Server struct. Response includes start_time in RFC3339 format and uptime_seconds as integer. Includes unit tests with httptest.NewRecorder().
arcodange added 1 commit 2026-05-05 19:18:06 +02:00
Add new endpoint that returns server start time and uptime duration in seconds.
The endpoint follows the same pattern as handleHealth and handleInfo handlers,
using the existing startedAt field from the Server struct.

Response format:
{
  "start_time": "2026-05-05T19:30:00Z",
  "uptime_seconds": 1234
}

Includes unit tests with httptest.NewRecorder() to verify JSON response
structure and content type headers.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
arcodange merged commit b17b727157 into main 2026-05-05 19:18:25 +02:00
arcodange deleted branch vibe/batch2-task-b-uptime 2026-05-05 19:18:26 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: arcodange/dance-lessons-coach#67