Settings API
Settings API
User preferences and configuration key-value store.
Settings Scopes
Settings operate at different scopes with cascading resolution:
| Scope | Description | Permission |
|---|---|---|
system |
Server-wide defaults (read-only) | Requires restart to change |
global |
Shared across all tenants (tn_id=0) | Admin only |
tenant |
User-specific settings | Owner |
Permission Levels
| Level | Access |
|---|---|
system |
Non-changeable (compile-time) |
admin |
Requires SADM role |
user |
Any authenticated user |
Resolution Order
When retrieving a setting value, the system resolves in this order:
- Tenant-specific value (if exists)
- Global value (if exists)
- System default
Endpoints
List Settings
Get all settings for the authenticated user.
Authentication: Required
Response:
Get Setting
Get a specific setting value.
Example:
Update Setting
Set or update a setting value.
Request:
Usage
Common Settings
theme- UI theme preferencelanguage- User languagefontSize- Text sizenotifications- Enable/disable notificationsdarkMode- Dark mode preference