Server Config
serverconfig.xml read/write, with automatic backups.
ConfigController
- Route prefix:
api/config - Auth: All endpoints require admin role.
| Method | Path | Description | Request | Response |
|---|---|---|---|---|
| GET | / | Current properties, field definitions, config file path | { properties, groups, configPath } | |
| GET | /raw | Raw XML content of config file | { xml } | |
| PUT | / | Update properties (creates a backup first) | { [key]: string } | string |
| PUT | /raw | Replace raw XML (creates a backup first) | { xml } | string |
| GET | /worlds | Available world names (for config dropdowns) | string[] |
Notes
propertiesis a flat map of key → current value.groupsdescribes the form UI structure (categories + field metadata). The web panel usesgroupsto render the Form tab; the bare API here returns both.- Both
PUT /andPUT /rawcreate a timestamped backup of the previous file before writing. Backups are kept indefinitely; prune them manually if they grow. PUT /is partial. Only the keys you include are written. Untouched keys are preserved.