From cc7906c7648ca74878d694ccba889b24b0671ab3 Mon Sep 17 00:00:00 2001 From: Robby Zambito Date: Fri, 8 Aug 2025 13:29:10 -0400 Subject: Add logs to api docs --- main.go | 2 +- static/api-docs.html | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 2ae6e3b..3561876 100644 --- a/main.go +++ b/main.go @@ -40,7 +40,7 @@ func main() { http.HandleFunc("/", api.CreateFilesHandler(&logs, &n, toLogParser)) http.HandleFunc("/logs", api.CreateGetLogs(&logs)) - http.HandleFunc("/api/v1/logs", api.CreateGetLogs(&logs)) + http.HandleFunc("/api/v1/status/logs", api.CreateGetLogs(&logs)) http.HandleFunc("/api/v1/auth/login", api.CreateLoginHandler(&logs, &n, toLogParser)) http.HandleFunc("/api/v1/king", func(w http.ResponseWriter, r *http.Request) { diff --git a/static/api-docs.html b/static/api-docs.html index 8a15386..3fd9ff9 100644 --- a/static/api-docs.html +++ b/static/api-docs.html @@ -66,6 +66,7 @@
  • Services Status
  • Metrics
  • Incidents
  • +
  • Logs
  • Maintenance
  • Uptime History
  • Subscribe
  • @@ -734,6 +735,29 @@ X-RateLimit-Reset: 1640995200 +
    +
    +
    + GET + /status/logs +
    +

    Get service logs.

    + +

    Response

    +
    +
    + 200 OK +
    +
    +
    {"clientAddr":"127.0.0.XXX:33906","requestedPath":"/api-docs.html","requestTime":"2025-08-08T17:26:29.552168681Z","httpMethod":"GET"}
    +{"incidentEvent": {"id":"32","title":"Out-of-memory exception in worker thread","description":"Out-of-memory exception in worker thread","status":"degraded","severity":"minor","startTime":"2025-08-08T17:26:38.05963434Z","affectedServices":[]}}
    +
    + +
    +
    +
    +
    +
    -- cgit