diff --git a/api/api.go b/api/api.go index c3f133a7..060e977b 100644 --- a/api/api.go +++ b/api/api.go @@ -133,16 +133,10 @@ func (api *API) Register(r *route.Router) { r.Options("/*path", wrap(func(w http.ResponseWriter, r *http.Request) {})) - // Register legacy forwarder for alert pushing. - r.Post("/alerts", wrap(api.legacyAddAlerts)) - - // Register actual API. - r = r.WithPrefix("/v1") - r.Get("/status", wrap(api.status)) r.Get("/receivers", wrap(api.receivers)) - r.Get("/alerts/groups", wrap(api.alertGroups)) + r.Get("/alerts/groups", wrap(api.alertGroups)) r.Get("/alerts", wrap(api.listAlerts)) r.Post("/alerts", wrap(api.addAlerts)) diff --git a/cmd/alertmanager/main.go b/cmd/alertmanager/main.go index 19946926..fe72c561 100644 --- a/cmd/alertmanager/main.go +++ b/cmd/alertmanager/main.go @@ -370,7 +370,7 @@ func main() { ui.Register(router, webReload, logger) - apiv.Register(router.WithPrefix("/api")) + apiv.Register(router.WithPrefix("/api/v1")) level.Info(logger).Log("msg", "Listening", "address", *listenAddress) go listen(*listenAddress, router, logger)