mirror of
https://github.com/portainer/portainer.git
synced 2025-08-10 00:05:24 +02:00
docs(settings): update api docs
This commit is contained in:
parent
d8c503a7f6
commit
d0e9ea17c5
2 changed files with 12 additions and 11 deletions
|
@ -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{}
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue