diff --git a/api/http/handler/settings/settings_inspect.go b/api/http/handler/settings/settings_inspect.go index b374ac84a..b7c0a0d15 100644 --- a/api/http/handler/settings/settings_inspect.go +++ b/api/http/handler/settings/settings_inspect.go @@ -10,14 +10,16 @@ import ( httperror "github.com/portainer/portainer/pkg/libhttp/error" ) -// @id settingsInspect -// @summary Retrieve Portainer settings -// @description Retrieve settings. Will returns settings based on the user role. -// @description **Access policy**: authenticated +// @id SettingsInspect +// @summary Retrieve the settings of the Portainer instance +// @description Get the settings of the Portainer instance. Will return either all the settings or a subset of settings based on the user role. +// @description **Access policy**: Authenticated user. // @tags settings +// @security ApiKeyAuth || jwt // @produce json -// @success 200 {object} settingsInspectResponse "Success" -// @failure 500 "Server error" +// @success 200 {object} settingsInspectResponse "The settings object" +// @failure 401 "Unauthorized access or operation not allowed." +// @failure 500 "Server error occurred while attempting to retrieve the settings." // @router /settings [get] func (handler *Handler) settingsInspect(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { var roleBasedResponse interface{} diff --git a/api/http/handler/settings/settings_public.go b/api/http/handler/settings/settings_public.go index 9db5100a9..b2b0ac11a 100644 --- a/api/http/handler/settings/settings_public.go +++ b/api/http/handler/settings/settings_public.go @@ -8,13 +8,12 @@ import ( ) // @id SettingsPublic -// @summary Retrieve Portainer public settings -// @description Retrieve public settings. Returns a small set of settings that are not reserved to administrators only. -// @description **Access policy**: public +// @summary Retrieve the public settings of the Portainer instance +// @description Get the settings of the Portainer instance. Will return only a subset of settings. // @tags settings // @produce json -// @success 200 {object} publicSettingsResponse "Success" -// @failure 500 "Server error" +// @success 200 {object} publicSettingsResponse "The settings object" +// @failure 500 "Server error occurred while attempting to retrieve the settings." // @router /settings/public [get] func (handler *Handler) settingsPublic(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { settings, err := handler.DataStore.Settings().Settings()