v44

latestSwagger 2.0raw.githubusercontent.com2026-08-01304236810.6 KB
System Admin

Update a system setting value

Persist a new value for :key. Service validates the rawValue against the registry's declared value_type and rejects mismatches with 400. SystemAdmin only. Emits an audit row (action=system.setting_changed) on success.

put/system/admin/settings/{key}

Path parameters

keystring required

Setting key

Request body

{"stackTrail":"components:schemas:internal_handler.UpdateSystemSettingRequest:properties:value","oasType":"schema","type":"unknown","description":"Value is intentionally `any` (decoded as float64 / string / bool /\netc. by the JSON unmarshaller). Service.encodeForType normalises\nthese against the registry's declared type and rejects mismatches."}

Response

the updated row

categorystring

Category groups settings in the management UI ("limits", "agent", "auth", ...). Free-form string so adding a new category is a data-only change.

created_atstring
descriptionstring
enumstring[]

Enum is populated by the service layer (NOT persisted) from the in-code registry. Empty/nil means "free-form input"; non-empty means the UI should render a select with these options. Tagged gorm:"-" so GORM never tries to read/write the column.

idinteger
is_secretboolean

IsSecret reserves UI affordances for P3 (mask + reveal-with-confirm). In P1 every row is is_secret=false; service Update accepts the column but does not yet enforce special handling.

keystring
last_modified_bystring
last_modified_by_namestring

LastModifiedByName is a display label resolved from LastModifiedBy (the user's UUID) at handler time — username when available, otherwise email. Empty for virtual rows that were never persisted (LastModifiedBy=""). Not stored: derived per request so renaming a user reflects on the next reload without a backfill job.

requires_restartboolean

RequiresRestart reserves UI affordances for P3 (banner "this change won't take effect until the next restart"). In P1 the only seeded key is per-request, so always false.

updated_atstring
valueinteger[]
value_typestring

ValueType is one of "int", "string", "bool". Service layer rejects updates whose payload type does not match; UI uses it to pick InputNumber vs Input vs Switch.