--- method: PUT path: /api/libraries/scan-settings auth: jwt+admin area: libraries --- # Update Scan Settings Sets the global scan poll interval and auto-scan flag, then reloads the settings registry so running code picks the new values up. ## Example request ```json example-request { "scan_poll_interval_seconds": 3600, "auto_scan_enabled": true } ``` ## Example response ```json example-response { "scan_poll_interval_seconds": 3600, "auto_scan_enabled": true, "message": "scan settings updated successfully" } ``` ## Request fields | Field | Type | Required | Notes | | ----- | ---- | -------- | ----- | | scan_poll_interval_seconds | number | yes | 1–3600 | | auto_scan_enabled | boolean | no | defaults false when omitted | ## Errors | Status | Body | When | | ------ | ---- | ---- | | 400 | `{"error": "..."}` | validation failure | | 401 / 403 | — | missing JWT / not an admin | | 404 | `{"error": "system setting not found"}` | settings rows missing from DB | | 500 | `{"error": "..."}` | unexpected server error |