Settings
4 endpoints.
get_settings
Section titled “get_settings”Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet.
The handler is get_settings in crates/lanrurugi-api/src/settings.rs:624.
Responses
200The endpoint responded. Its exact shape is not documented yet — see the handler at crates/lanrurugi-api/src/settings.rs:59.
This response carries no example body.
Request failed — Usual causes: the instance address is wrong or unreachable; cross-origin access is not enabled on the instance; or this page is HTTPS while the instance is plain HTTP on a LAN address, which the browser blocks as mixed content. “Copy as cURL” above sends the same request from a terminal.
Your own instance address. Requests go from this browser straight to it.
put_settings
Section titled “put_settings”Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet.
The handler is put_settings in crates/lanrurugi-api/src/settings.rs:751.
Responses
200The endpoint responded. Its exact shape is not documented yet — see the handler at crates/lanrurugi-api/src/settings.rs:59.
This response carries no example body.
This endpoint needs an administrator token — a guest (read-only) token is refused by the server.
Request failed — Usual causes: the instance address is wrong or unreachable; cross-origin access is not enabled on the instance; or this page is HTTPS while the instance is plain HTTP on a LAN address, which the browser blocks as mixed content. “Copy as cURL” above sends the same request from a terminal.
Your own instance address. Requests go from this browser straight to it.
Sets a new admin password, hashed the same way legacy stores one ({CRYPT}$2a$... — see
Section titled “Sets a new admin password, hashed the same way legacy stores one ({CRYPT}$2a$... — see”Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet.
The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/settings.rs:1017), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers.
Sets a new admin password, hashed the same way legacy stores one ({CRYPT}$2a$... — see
lanrurugi_core::password) so a legacy instance sharing this Redis keeps accepting it too. An
empty string clears password protection’s practical effect the same way legacy’s own
config-page “leave blank to keep current password” convention does not work here — this
endpoint always sets whatever was submitted, so the frontend must not submit an empty field
unless the user explicitly means to set an empty password.
Responses
200The endpoint responded. Its exact shape is not documented yet — see the handler at crates/lanrurugi-api/src/settings.rs:60.
This response carries no example body.
This endpoint accepts a browser session only — the cookie set when you log in to your own instance. API tokens are refused by the server, so there is no token field here and the command above carries no Authorization header.
Request failed — Usual causes: the instance address is wrong or unreachable; cross-origin access is not enabled on the instance; or this page is HTTPS while the instance is plain HTTP on a LAN address, which the browser blocks as mixed content. “Copy as cURL” above sends the same request from a terminal.
Your own instance address. Requests go from this browser straight to it.
issue #92: this response also carries language now, not just theme — useApplyTheme/
Section titled “issue #92: this response also carries language now, not just theme — useApplyTheme/”Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet.
The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/settings.rs:160), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers.
issue #92: this response also carries language now, not just theme — useApplyTheme/
useApplySettingsLanguage (apps/frontend/src/theme.ts/i18n/index.ts) both used to read
their respective field off the full, auth-gated GET /settings (which 401s pre-login, since
that response also carries the API key and other genuinely secret fields that can’t be made
public) — every page rendered before a session exists (the Login page’s own bespoke
usePublicTheme fallback aside) hit that 401, and the global 401 handler in client.ts
force-navigates to /login on every single one regardless of whether the calling hook itself
already had a fallback ready, defeating issue #92’s own “stay on the page, don’t redirect”
requirement for anything rendered while logged out (the new 404 page very much included —
live-reported as a real double-navigation: the 404 content flashes, then /login anyway).
theme/language are the only two fields anything needs before a session exists, and neither
is remotely secret, so folding language into this already-public endpoint is simpler than
standing up a whole second public settings surface for one more field. The response also
carries admin_theme — always the administrator’s own theme, regardless of guest-eligibility
— so the Login page can render with the admin theme even when guest mode is on and the guest
theme is a different one.
Responses
200The endpoint responded. Its exact shape is not documented yet — see the handler at crates/lanrurugi-api/src/settings.rs:70.
This response carries no example body.
This endpoint needs no credentials.
Request failed — Usual causes: the instance address is wrong or unreachable; cross-origin access is not enabled on the instance; or this page is HTTPS while the instance is plain HTTP on a LAN address, which the browser blocks as mixed content. “Copy as cURL” above sends the same request from a terminal.
Your own instance address. Requests go from this browser straight to it.