diff --git a/api/v2/client/alert/alert_client.go b/api/v2/client/alert/alert_client.go index 24cbe8c95..0695bcf60 100644 --- a/api/v2/client/alert/alert_client.go +++ b/api/v2/client/alert/alert_client.go @@ -60,7 +60,7 @@ func (a *Client) GetAlerts(params *GetAlertsParams) (*GetAlertsOK, error) { result, err := a.transport.Submit(&runtime.ClientOperation{ ID: "getAlerts", Method: "GET", - PathPattern: "/alerts", + PathPattern: "/api/v2/alerts", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, @@ -94,7 +94,7 @@ func (a *Client) PostAlerts(params *PostAlertsParams) (*PostAlertsOK, error) { result, err := a.transport.Submit(&runtime.ClientOperation{ ID: "postAlerts", Method: "POST", - PathPattern: "/alerts", + PathPattern: "/api/v2/alerts", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, diff --git a/api/v2/client/alert/get_alerts_responses.go b/api/v2/client/alert/get_alerts_responses.go index 0fd6e282b..9cfc65594 100644 --- a/api/v2/client/alert/get_alerts_responses.go +++ b/api/v2/client/alert/get_alerts_responses.go @@ -75,7 +75,7 @@ type GetAlertsOK struct { } func (o *GetAlertsOK) Error() string { - return fmt.Sprintf("[GET /alerts][%d] getAlertsOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /api/v2/alerts][%d] getAlertsOK %+v", 200, o.Payload) } func (o *GetAlertsOK) GetPayload() models.GettableAlerts { @@ -106,7 +106,7 @@ type GetAlertsBadRequest struct { } func (o *GetAlertsBadRequest) Error() string { - return fmt.Sprintf("[GET /alerts][%d] getAlertsBadRequest %+v", 400, o.Payload) + return fmt.Sprintf("[GET /api/v2/alerts][%d] getAlertsBadRequest %+v", 400, o.Payload) } func (o *GetAlertsBadRequest) GetPayload() string { @@ -137,7 +137,7 @@ type GetAlertsInternalServerError struct { } func (o *GetAlertsInternalServerError) Error() string { - return fmt.Sprintf("[GET /alerts][%d] getAlertsInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[GET /api/v2/alerts][%d] getAlertsInternalServerError %+v", 500, o.Payload) } func (o *GetAlertsInternalServerError) GetPayload() string { diff --git a/api/v2/client/alert/post_alerts_responses.go b/api/v2/client/alert/post_alerts_responses.go index 693efd5b1..aa90ff270 100644 --- a/api/v2/client/alert/post_alerts_responses.go +++ b/api/v2/client/alert/post_alerts_responses.go @@ -72,7 +72,7 @@ type PostAlertsOK struct { } func (o *PostAlertsOK) Error() string { - return fmt.Sprintf("[POST /alerts][%d] postAlertsOK ", 200) + return fmt.Sprintf("[POST /api/v2/alerts][%d] postAlertsOK ", 200) } func (o *PostAlertsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -94,7 +94,7 @@ type PostAlertsBadRequest struct { } func (o *PostAlertsBadRequest) Error() string { - return fmt.Sprintf("[POST /alerts][%d] postAlertsBadRequest %+v", 400, o.Payload) + return fmt.Sprintf("[POST /api/v2/alerts][%d] postAlertsBadRequest %+v", 400, o.Payload) } func (o *PostAlertsBadRequest) GetPayload() string { @@ -125,7 +125,7 @@ type PostAlertsInternalServerError struct { } func (o *PostAlertsInternalServerError) Error() string { - return fmt.Sprintf("[POST /alerts][%d] postAlertsInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[POST /api/v2/alerts][%d] postAlertsInternalServerError %+v", 500, o.Payload) } func (o *PostAlertsInternalServerError) GetPayload() string { diff --git a/api/v2/client/alertgroup/alertgroup_client.go b/api/v2/client/alertgroup/alertgroup_client.go index f7c4a1faa..7df335524 100644 --- a/api/v2/client/alertgroup/alertgroup_client.go +++ b/api/v2/client/alertgroup/alertgroup_client.go @@ -58,7 +58,7 @@ func (a *Client) GetAlertGroups(params *GetAlertGroupsParams) (*GetAlertGroupsOK result, err := a.transport.Submit(&runtime.ClientOperation{ ID: "getAlertGroups", Method: "GET", - PathPattern: "/alerts/groups", + PathPattern: "/api/v2/alerts/groups", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, diff --git a/api/v2/client/alertgroup/get_alert_groups_responses.go b/api/v2/client/alertgroup/get_alert_groups_responses.go index 6c686ef3e..9ab586df0 100644 --- a/api/v2/client/alertgroup/get_alert_groups_responses.go +++ b/api/v2/client/alertgroup/get_alert_groups_responses.go @@ -75,7 +75,7 @@ type GetAlertGroupsOK struct { } func (o *GetAlertGroupsOK) Error() string { - return fmt.Sprintf("[GET /alerts/groups][%d] getAlertGroupsOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /api/v2/alerts/groups][%d] getAlertGroupsOK %+v", 200, o.Payload) } func (o *GetAlertGroupsOK) GetPayload() models.AlertGroups { @@ -106,7 +106,7 @@ type GetAlertGroupsBadRequest struct { } func (o *GetAlertGroupsBadRequest) Error() string { - return fmt.Sprintf("[GET /alerts/groups][%d] getAlertGroupsBadRequest %+v", 400, o.Payload) + return fmt.Sprintf("[GET /api/v2/alerts/groups][%d] getAlertGroupsBadRequest %+v", 400, o.Payload) } func (o *GetAlertGroupsBadRequest) GetPayload() string { @@ -137,7 +137,7 @@ type GetAlertGroupsInternalServerError struct { } func (o *GetAlertGroupsInternalServerError) Error() string { - return fmt.Sprintf("[GET /alerts/groups][%d] getAlertGroupsInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[GET /api/v2/alerts/groups][%d] getAlertGroupsInternalServerError %+v", 500, o.Payload) } func (o *GetAlertGroupsInternalServerError) GetPayload() string { diff --git a/api/v2/client/general/general_client.go b/api/v2/client/general/general_client.go index 35304b179..f7c20f146 100644 --- a/api/v2/client/general/general_client.go +++ b/api/v2/client/general/general_client.go @@ -58,7 +58,7 @@ func (a *Client) GetStatus(params *GetStatusParams) (*GetStatusOK, error) { result, err := a.transport.Submit(&runtime.ClientOperation{ ID: "getStatus", Method: "GET", - PathPattern: "/status", + PathPattern: "/api/v2/status", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, diff --git a/api/v2/client/general/get_status_responses.go b/api/v2/client/general/get_status_responses.go index d457ccc92..22ea8aebc 100644 --- a/api/v2/client/general/get_status_responses.go +++ b/api/v2/client/general/get_status_responses.go @@ -63,7 +63,7 @@ type GetStatusOK struct { } func (o *GetStatusOK) Error() string { - return fmt.Sprintf("[GET /status][%d] getStatusOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /api/v2/status][%d] getStatusOK %+v", 200, o.Payload) } func (o *GetStatusOK) GetPayload() *models.AlertmanagerStatus { diff --git a/api/v2/client/receiver/get_receivers_responses.go b/api/v2/client/receiver/get_receivers_responses.go index 3bc473d86..2ca185389 100644 --- a/api/v2/client/receiver/get_receivers_responses.go +++ b/api/v2/client/receiver/get_receivers_responses.go @@ -63,7 +63,7 @@ type GetReceiversOK struct { } func (o *GetReceiversOK) Error() string { - return fmt.Sprintf("[GET /receivers][%d] getReceiversOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /api/v2/receivers][%d] getReceiversOK %+v", 200, o.Payload) } func (o *GetReceiversOK) GetPayload() []*models.Receiver { diff --git a/api/v2/client/receiver/receiver_client.go b/api/v2/client/receiver/receiver_client.go index 1cda82018..75bb8d9e7 100644 --- a/api/v2/client/receiver/receiver_client.go +++ b/api/v2/client/receiver/receiver_client.go @@ -58,7 +58,7 @@ func (a *Client) GetReceivers(params *GetReceiversParams) (*GetReceiversOK, erro result, err := a.transport.Submit(&runtime.ClientOperation{ ID: "getReceivers", Method: "GET", - PathPattern: "/receivers", + PathPattern: "/api/v2/receivers", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, diff --git a/api/v2/client/silence/delete_silence_responses.go b/api/v2/client/silence/delete_silence_responses.go index 848c53dc0..b7ad5cd7e 100644 --- a/api/v2/client/silence/delete_silence_responses.go +++ b/api/v2/client/silence/delete_silence_responses.go @@ -66,7 +66,7 @@ type DeleteSilenceOK struct { } func (o *DeleteSilenceOK) Error() string { - return fmt.Sprintf("[DELETE /silence/{silenceID}][%d] deleteSilenceOK ", 200) + return fmt.Sprintf("[DELETE /api/v2/silence/{silenceID}][%d] deleteSilenceOK ", 200) } func (o *DeleteSilenceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -88,7 +88,7 @@ type DeleteSilenceInternalServerError struct { } func (o *DeleteSilenceInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /silence/{silenceID}][%d] deleteSilenceInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[DELETE /api/v2/silence/{silenceID}][%d] deleteSilenceInternalServerError %+v", 500, o.Payload) } func (o *DeleteSilenceInternalServerError) GetPayload() string { diff --git a/api/v2/client/silence/get_silence_responses.go b/api/v2/client/silence/get_silence_responses.go index 7fc3f53da..73adcf3b1 100644 --- a/api/v2/client/silence/get_silence_responses.go +++ b/api/v2/client/silence/get_silence_responses.go @@ -75,7 +75,7 @@ type GetSilenceOK struct { } func (o *GetSilenceOK) Error() string { - return fmt.Sprintf("[GET /silence/{silenceID}][%d] getSilenceOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /api/v2/silence/{silenceID}][%d] getSilenceOK %+v", 200, o.Payload) } func (o *GetSilenceOK) GetPayload() *models.GettableSilence { @@ -107,7 +107,7 @@ type GetSilenceNotFound struct { } func (o *GetSilenceNotFound) Error() string { - return fmt.Sprintf("[GET /silence/{silenceID}][%d] getSilenceNotFound ", 404) + return fmt.Sprintf("[GET /api/v2/silence/{silenceID}][%d] getSilenceNotFound ", 404) } func (o *GetSilenceNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -129,7 +129,7 @@ type GetSilenceInternalServerError struct { } func (o *GetSilenceInternalServerError) Error() string { - return fmt.Sprintf("[GET /silence/{silenceID}][%d] getSilenceInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[GET /api/v2/silence/{silenceID}][%d] getSilenceInternalServerError %+v", 500, o.Payload) } func (o *GetSilenceInternalServerError) GetPayload() string { diff --git a/api/v2/client/silence/get_silences_responses.go b/api/v2/client/silence/get_silences_responses.go index 819a24279..467be505f 100644 --- a/api/v2/client/silence/get_silences_responses.go +++ b/api/v2/client/silence/get_silences_responses.go @@ -69,7 +69,7 @@ type GetSilencesOK struct { } func (o *GetSilencesOK) Error() string { - return fmt.Sprintf("[GET /silences][%d] getSilencesOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /api/v2/silences][%d] getSilencesOK %+v", 200, o.Payload) } func (o *GetSilencesOK) GetPayload() models.GettableSilences { @@ -100,7 +100,7 @@ type GetSilencesInternalServerError struct { } func (o *GetSilencesInternalServerError) Error() string { - return fmt.Sprintf("[GET /silences][%d] getSilencesInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[GET /api/v2/silences][%d] getSilencesInternalServerError %+v", 500, o.Payload) } func (o *GetSilencesInternalServerError) GetPayload() string { diff --git a/api/v2/client/silence/post_silences_responses.go b/api/v2/client/silence/post_silences_responses.go index c71931f73..4596862c1 100644 --- a/api/v2/client/silence/post_silences_responses.go +++ b/api/v2/client/silence/post_silences_responses.go @@ -74,7 +74,7 @@ type PostSilencesOK struct { } func (o *PostSilencesOK) Error() string { - return fmt.Sprintf("[POST /silences][%d] postSilencesOK %+v", 200, o.Payload) + return fmt.Sprintf("[POST /api/v2/silences][%d] postSilencesOK %+v", 200, o.Payload) } func (o *PostSilencesOK) GetPayload() *PostSilencesOKBody { @@ -107,7 +107,7 @@ type PostSilencesBadRequest struct { } func (o *PostSilencesBadRequest) Error() string { - return fmt.Sprintf("[POST /silences][%d] postSilencesBadRequest %+v", 400, o.Payload) + return fmt.Sprintf("[POST /api/v2/silences][%d] postSilencesBadRequest %+v", 400, o.Payload) } func (o *PostSilencesBadRequest) GetPayload() string { @@ -138,7 +138,7 @@ type PostSilencesNotFound struct { } func (o *PostSilencesNotFound) Error() string { - return fmt.Sprintf("[POST /silences][%d] postSilencesNotFound %+v", 404, o.Payload) + return fmt.Sprintf("[POST /api/v2/silences][%d] postSilencesNotFound %+v", 404, o.Payload) } func (o *PostSilencesNotFound) GetPayload() string { diff --git a/api/v2/client/silence/silence_client.go b/api/v2/client/silence/silence_client.go index b601f9d8c..d2274e407 100644 --- a/api/v2/client/silence/silence_client.go +++ b/api/v2/client/silence/silence_client.go @@ -64,7 +64,7 @@ func (a *Client) DeleteSilence(params *DeleteSilenceParams) (*DeleteSilenceOK, e result, err := a.transport.Submit(&runtime.ClientOperation{ ID: "deleteSilence", Method: "DELETE", - PathPattern: "/silence/{silenceID}", + PathPattern: "/api/v2/silence/{silenceID}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, @@ -98,7 +98,7 @@ func (a *Client) GetSilence(params *GetSilenceParams) (*GetSilenceOK, error) { result, err := a.transport.Submit(&runtime.ClientOperation{ ID: "getSilence", Method: "GET", - PathPattern: "/silence/{silenceID}", + PathPattern: "/api/v2/silence/{silenceID}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, @@ -132,7 +132,7 @@ func (a *Client) GetSilences(params *GetSilencesParams) (*GetSilencesOK, error) result, err := a.transport.Submit(&runtime.ClientOperation{ ID: "getSilences", Method: "GET", - PathPattern: "/silences", + PathPattern: "/api/v2/silences", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, @@ -166,7 +166,7 @@ func (a *Client) PostSilences(params *PostSilencesParams) (*PostSilencesOK, erro result, err := a.transport.Submit(&runtime.ClientOperation{ ID: "postSilences", Method: "POST", - PathPattern: "/silences", + PathPattern: "/api/v2/silences", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, diff --git a/api/v2/restapi/embedded_spec.go b/api/v2/restapi/embedded_spec.go index cca7e8067..9aa808939 100644 --- a/api/v2/restapi/embedded_spec.go +++ b/api/v2/restapi/embedded_spec.go @@ -49,7 +49,7 @@ func init() { "version": "0.0.1" }, "paths": { - "/alerts": { + "/api/v2/alerts": { "get": { "description": "Get a list of alerts", "tags": [ @@ -147,7 +147,7 @@ func init() { } } }, - "/alerts/groups": { + "/api/v2/alerts/groups": { "get": { "description": "Get a list of alert groups", "tags": [ @@ -209,7 +209,7 @@ func init() { } } }, - "/receivers": { + "/api/v2/receivers": { "get": { "description": "Get list of all receivers (name of notification integrations)", "tags": [ @@ -229,7 +229,7 @@ func init() { } } }, - "/silence/{silenceID}": { + "/api/v2/silence/{silenceID}": { "get": { "description": "Get a silence by its ID", "tags": [ @@ -287,7 +287,7 @@ func init() { } ] }, - "/silences": { + "/api/v2/silences": { "get": { "description": "Get a list of silences", "tags": [ @@ -359,7 +359,7 @@ func init() { } } }, - "/status": { + "/api/v2/status": { "get": { "description": "Get current status of an Alertmanager instance and its cluster", "tags": [ @@ -832,7 +832,7 @@ func init() { "version": "0.0.1" }, "paths": { - "/alerts": { + "/api/v2/alerts": { "get": { "description": "Get a list of alerts", "tags": [ @@ -942,7 +942,7 @@ func init() { } } }, - "/alerts/groups": { + "/api/v2/alerts/groups": { "get": { "description": "Get a list of alert groups", "tags": [ @@ -1010,7 +1010,7 @@ func init() { } } }, - "/receivers": { + "/api/v2/receivers": { "get": { "description": "Get list of all receivers (name of notification integrations)", "tags": [ @@ -1030,7 +1030,7 @@ func init() { } } }, - "/silence/{silenceID}": { + "/api/v2/silence/{silenceID}": { "get": { "description": "Get a silence by its ID", "tags": [ @@ -1094,7 +1094,7 @@ func init() { } ] }, - "/silences": { + "/api/v2/silences": { "get": { "description": "Get a list of silences", "tags": [ @@ -1172,7 +1172,7 @@ func init() { } } }, - "/status": { + "/api/v2/status": { "get": { "description": "Get current status of an Alertmanager instance and its cluster", "tags": [ diff --git a/api/v2/restapi/operations/alert/get_alerts.go b/api/v2/restapi/operations/alert/get_alerts.go index 27caf27b1..3e6b66891 100644 --- a/api/v2/restapi/operations/alert/get_alerts.go +++ b/api/v2/restapi/operations/alert/get_alerts.go @@ -43,7 +43,7 @@ func NewGetAlerts(ctx *middleware.Context, handler GetAlertsHandler) *GetAlerts return &GetAlerts{Context: ctx, Handler: handler} } -/*GetAlerts swagger:route GET /alerts alert getAlerts +/*GetAlerts swagger:route GET /api/v2/alerts alert getAlerts Get a list of alerts diff --git a/api/v2/restapi/operations/alert/get_alerts_urlbuilder.go b/api/v2/restapi/operations/alert/get_alerts_urlbuilder.go index a2f41d24d..a9f89b04f 100644 --- a/api/v2/restapi/operations/alert/get_alerts_urlbuilder.go +++ b/api/v2/restapi/operations/alert/get_alerts_urlbuilder.go @@ -60,7 +60,7 @@ func (o *GetAlertsURL) SetBasePath(bp string) { func (o *GetAlertsURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/alerts" + var _path = "/api/v2/alerts" _basePath := o._basePath _result.Path = golangswaggerpaths.Join(_basePath, _path) diff --git a/api/v2/restapi/operations/alert/post_alerts.go b/api/v2/restapi/operations/alert/post_alerts.go index 858db94bb..24f40b96e 100644 --- a/api/v2/restapi/operations/alert/post_alerts.go +++ b/api/v2/restapi/operations/alert/post_alerts.go @@ -43,7 +43,7 @@ func NewPostAlerts(ctx *middleware.Context, handler PostAlertsHandler) *PostAler return &PostAlerts{Context: ctx, Handler: handler} } -/*PostAlerts swagger:route POST /alerts alert postAlerts +/*PostAlerts swagger:route POST /api/v2/alerts alert postAlerts Create new Alerts diff --git a/api/v2/restapi/operations/alert/post_alerts_urlbuilder.go b/api/v2/restapi/operations/alert/post_alerts_urlbuilder.go index fdfd24e60..3931c5f89 100644 --- a/api/v2/restapi/operations/alert/post_alerts_urlbuilder.go +++ b/api/v2/restapi/operations/alert/post_alerts_urlbuilder.go @@ -49,7 +49,7 @@ func (o *PostAlertsURL) SetBasePath(bp string) { func (o *PostAlertsURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/alerts" + var _path = "/api/v2/alerts" _basePath := o._basePath _result.Path = golangswaggerpaths.Join(_basePath, _path) diff --git a/api/v2/restapi/operations/alertgroup/get_alert_groups.go b/api/v2/restapi/operations/alertgroup/get_alert_groups.go index 3ea3975d5..4a2415b2b 100644 --- a/api/v2/restapi/operations/alertgroup/get_alert_groups.go +++ b/api/v2/restapi/operations/alertgroup/get_alert_groups.go @@ -43,7 +43,7 @@ func NewGetAlertGroups(ctx *middleware.Context, handler GetAlertGroupsHandler) * return &GetAlertGroups{Context: ctx, Handler: handler} } -/*GetAlertGroups swagger:route GET /alerts/groups alertgroup getAlertGroups +/*GetAlertGroups swagger:route GET /api/v2/alerts/groups alertgroup getAlertGroups Get a list of alert groups diff --git a/api/v2/restapi/operations/alertgroup/get_alert_groups_urlbuilder.go b/api/v2/restapi/operations/alertgroup/get_alert_groups_urlbuilder.go index cf95a2e10..4f7fd6f2f 100644 --- a/api/v2/restapi/operations/alertgroup/get_alert_groups_urlbuilder.go +++ b/api/v2/restapi/operations/alertgroup/get_alert_groups_urlbuilder.go @@ -59,7 +59,7 @@ func (o *GetAlertGroupsURL) SetBasePath(bp string) { func (o *GetAlertGroupsURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/alerts/groups" + var _path = "/api/v2/alerts/groups" _basePath := o._basePath _result.Path = golangswaggerpaths.Join(_basePath, _path) diff --git a/api/v2/restapi/operations/alertmanager_api.go b/api/v2/restapi/operations/alertmanager_api.go index fcc6431c8..18e2bf6bb 100644 --- a/api/v2/restapi/operations/alertmanager_api.go +++ b/api/v2/restapi/operations/alertmanager_api.go @@ -323,39 +323,39 @@ func (o *AlertmanagerAPI) initHandlerCache() { if o.handlers["DELETE"] == nil { o.handlers["DELETE"] = make(map[string]http.Handler) } - o.handlers["DELETE"]["/silence/{silenceID}"] = silence.NewDeleteSilence(o.context, o.SilenceDeleteSilenceHandler) + o.handlers["DELETE"]["/api/v2/silence/{silenceID}"] = silence.NewDeleteSilence(o.context, o.SilenceDeleteSilenceHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } - o.handlers["GET"]["/alerts/groups"] = alertgroup.NewGetAlertGroups(o.context, o.AlertgroupGetAlertGroupsHandler) + o.handlers["GET"]["/api/v2/alerts/groups"] = alertgroup.NewGetAlertGroups(o.context, o.AlertgroupGetAlertGroupsHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } - o.handlers["GET"]["/alerts"] = alert.NewGetAlerts(o.context, o.AlertGetAlertsHandler) + o.handlers["GET"]["/api/v2/alerts"] = alert.NewGetAlerts(o.context, o.AlertGetAlertsHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } - o.handlers["GET"]["/receivers"] = receiver.NewGetReceivers(o.context, o.ReceiverGetReceiversHandler) + o.handlers["GET"]["/api/v2/receivers"] = receiver.NewGetReceivers(o.context, o.ReceiverGetReceiversHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } - o.handlers["GET"]["/silence/{silenceID}"] = silence.NewGetSilence(o.context, o.SilenceGetSilenceHandler) + o.handlers["GET"]["/api/v2/silence/{silenceID}"] = silence.NewGetSilence(o.context, o.SilenceGetSilenceHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } - o.handlers["GET"]["/silences"] = silence.NewGetSilences(o.context, o.SilenceGetSilencesHandler) + o.handlers["GET"]["/api/v2/silences"] = silence.NewGetSilences(o.context, o.SilenceGetSilencesHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } - o.handlers["GET"]["/status"] = general.NewGetStatus(o.context, o.GeneralGetStatusHandler) + o.handlers["GET"]["/api/v2/status"] = general.NewGetStatus(o.context, o.GeneralGetStatusHandler) if o.handlers["POST"] == nil { o.handlers["POST"] = make(map[string]http.Handler) } - o.handlers["POST"]["/alerts"] = alert.NewPostAlerts(o.context, o.AlertPostAlertsHandler) + o.handlers["POST"]["/api/v2/alerts"] = alert.NewPostAlerts(o.context, o.AlertPostAlertsHandler) if o.handlers["POST"] == nil { o.handlers["POST"] = make(map[string]http.Handler) } - o.handlers["POST"]["/silences"] = silence.NewPostSilences(o.context, o.SilencePostSilencesHandler) + o.handlers["POST"]["/api/v2/silences"] = silence.NewPostSilences(o.context, o.SilencePostSilencesHandler) } // Serve creates a http handler to serve the API over HTTP diff --git a/api/v2/restapi/operations/general/get_status.go b/api/v2/restapi/operations/general/get_status.go index 8b6a6f5c7..eb0127aa3 100644 --- a/api/v2/restapi/operations/general/get_status.go +++ b/api/v2/restapi/operations/general/get_status.go @@ -43,7 +43,7 @@ func NewGetStatus(ctx *middleware.Context, handler GetStatusHandler) *GetStatus return &GetStatus{Context: ctx, Handler: handler} } -/*GetStatus swagger:route GET /status general getStatus +/*GetStatus swagger:route GET /api/v2/status general getStatus Get current status of an Alertmanager instance and its cluster diff --git a/api/v2/restapi/operations/general/get_status_urlbuilder.go b/api/v2/restapi/operations/general/get_status_urlbuilder.go index ec165fb5e..3b4b271c6 100644 --- a/api/v2/restapi/operations/general/get_status_urlbuilder.go +++ b/api/v2/restapi/operations/general/get_status_urlbuilder.go @@ -49,7 +49,7 @@ func (o *GetStatusURL) SetBasePath(bp string) { func (o *GetStatusURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/status" + var _path = "/api/v2/status" _basePath := o._basePath _result.Path = golangswaggerpaths.Join(_basePath, _path) diff --git a/api/v2/restapi/operations/receiver/get_receivers.go b/api/v2/restapi/operations/receiver/get_receivers.go index 40197940a..c663e78a1 100644 --- a/api/v2/restapi/operations/receiver/get_receivers.go +++ b/api/v2/restapi/operations/receiver/get_receivers.go @@ -43,7 +43,7 @@ func NewGetReceivers(ctx *middleware.Context, handler GetReceiversHandler) *GetR return &GetReceivers{Context: ctx, Handler: handler} } -/*GetReceivers swagger:route GET /receivers receiver getReceivers +/*GetReceivers swagger:route GET /api/v2/receivers receiver getReceivers Get list of all receivers (name of notification integrations) diff --git a/api/v2/restapi/operations/receiver/get_receivers_urlbuilder.go b/api/v2/restapi/operations/receiver/get_receivers_urlbuilder.go index 861d98f60..c4732b625 100644 --- a/api/v2/restapi/operations/receiver/get_receivers_urlbuilder.go +++ b/api/v2/restapi/operations/receiver/get_receivers_urlbuilder.go @@ -49,7 +49,7 @@ func (o *GetReceiversURL) SetBasePath(bp string) { func (o *GetReceiversURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/receivers" + var _path = "/api/v2/receivers" _basePath := o._basePath _result.Path = golangswaggerpaths.Join(_basePath, _path) diff --git a/api/v2/restapi/operations/silence/delete_silence.go b/api/v2/restapi/operations/silence/delete_silence.go index d0a227484..92730272f 100644 --- a/api/v2/restapi/operations/silence/delete_silence.go +++ b/api/v2/restapi/operations/silence/delete_silence.go @@ -43,7 +43,7 @@ func NewDeleteSilence(ctx *middleware.Context, handler DeleteSilenceHandler) *De return &DeleteSilence{Context: ctx, Handler: handler} } -/*DeleteSilence swagger:route DELETE /silence/{silenceID} silence deleteSilence +/*DeleteSilence swagger:route DELETE /api/v2/silence/{silenceID} silence deleteSilence Delete a silence by its ID diff --git a/api/v2/restapi/operations/silence/delete_silence_urlbuilder.go b/api/v2/restapi/operations/silence/delete_silence_urlbuilder.go index a9ca5b6b0..c67c18e03 100644 --- a/api/v2/restapi/operations/silence/delete_silence_urlbuilder.go +++ b/api/v2/restapi/operations/silence/delete_silence_urlbuilder.go @@ -56,7 +56,7 @@ func (o *DeleteSilenceURL) SetBasePath(bp string) { func (o *DeleteSilenceURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/silence/{silenceID}" + var _path = "/api/v2/silence/{silenceID}" silenceID := o.SilenceID.String() if silenceID != "" { diff --git a/api/v2/restapi/operations/silence/get_silence.go b/api/v2/restapi/operations/silence/get_silence.go index afaf6dd5f..29cb8d128 100644 --- a/api/v2/restapi/operations/silence/get_silence.go +++ b/api/v2/restapi/operations/silence/get_silence.go @@ -43,7 +43,7 @@ func NewGetSilence(ctx *middleware.Context, handler GetSilenceHandler) *GetSilen return &GetSilence{Context: ctx, Handler: handler} } -/*GetSilence swagger:route GET /silence/{silenceID} silence getSilence +/*GetSilence swagger:route GET /api/v2/silence/{silenceID} silence getSilence Get a silence by its ID diff --git a/api/v2/restapi/operations/silence/get_silence_urlbuilder.go b/api/v2/restapi/operations/silence/get_silence_urlbuilder.go index 5080a74dd..942a96d2a 100644 --- a/api/v2/restapi/operations/silence/get_silence_urlbuilder.go +++ b/api/v2/restapi/operations/silence/get_silence_urlbuilder.go @@ -56,7 +56,7 @@ func (o *GetSilenceURL) SetBasePath(bp string) { func (o *GetSilenceURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/silence/{silenceID}" + var _path = "/api/v2/silence/{silenceID}" silenceID := o.SilenceID.String() if silenceID != "" { diff --git a/api/v2/restapi/operations/silence/get_silences.go b/api/v2/restapi/operations/silence/get_silences.go index 0346a421b..2446bcb0c 100644 --- a/api/v2/restapi/operations/silence/get_silences.go +++ b/api/v2/restapi/operations/silence/get_silences.go @@ -43,7 +43,7 @@ func NewGetSilences(ctx *middleware.Context, handler GetSilencesHandler) *GetSil return &GetSilences{Context: ctx, Handler: handler} } -/*GetSilences swagger:route GET /silences silence getSilences +/*GetSilences swagger:route GET /api/v2/silences silence getSilences Get a list of silences diff --git a/api/v2/restapi/operations/silence/get_silences_urlbuilder.go b/api/v2/restapi/operations/silence/get_silences_urlbuilder.go index 7ab757fd0..f4da15a92 100644 --- a/api/v2/restapi/operations/silence/get_silences_urlbuilder.go +++ b/api/v2/restapi/operations/silence/get_silences_urlbuilder.go @@ -55,7 +55,7 @@ func (o *GetSilencesURL) SetBasePath(bp string) { func (o *GetSilencesURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/silences" + var _path = "/api/v2/silences" _basePath := o._basePath _result.Path = golangswaggerpaths.Join(_basePath, _path) diff --git a/api/v2/restapi/operations/silence/post_silences.go b/api/v2/restapi/operations/silence/post_silences.go index 98cc0576d..626b4132f 100644 --- a/api/v2/restapi/operations/silence/post_silences.go +++ b/api/v2/restapi/operations/silence/post_silences.go @@ -45,7 +45,7 @@ func NewPostSilences(ctx *middleware.Context, handler PostSilencesHandler) *Post return &PostSilences{Context: ctx, Handler: handler} } -/*PostSilences swagger:route POST /silences silence postSilences +/*PostSilences swagger:route POST /api/v2/silences silence postSilences Post a new silence or update an existing one diff --git a/api/v2/restapi/operations/silence/post_silences_urlbuilder.go b/api/v2/restapi/operations/silence/post_silences_urlbuilder.go index 7341cb31d..62592da7d 100644 --- a/api/v2/restapi/operations/silence/post_silences_urlbuilder.go +++ b/api/v2/restapi/operations/silence/post_silences_urlbuilder.go @@ -49,7 +49,7 @@ func (o *PostSilencesURL) SetBasePath(bp string) { func (o *PostSilencesURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/silences" + var _path = "/api/v2/silences" _basePath := o._basePath _result.Path = golangswaggerpaths.Join(_basePath, _path)