API: users
GET /api/users#
List Users
Whoever may manage users (an admin) sees everyone. Every other role sees only its own account: the full list (names, roles, last login, 2FA status) is a directory an attacker with any low-privilege account or token could use to pick targets.
Berechtigung users.read (ansehen)
Antwort 200 UserRead[]
7 Felder anzeigen
| Feld | Typ | Hinweise |
|---|---|---|
auth_source | string | default: "local" |
created_at * | string (date-time) | |
id * | string (uuid) | |
last_login_at * | string (date-time) | null | |
role * | string | |
totp_enabled | boolean | default: false |
username * | string |
POST /api/users#
Create User
Berechtigung users.manage (verwalten)
Anfrage-Body UserCreate
3 Felder anzeigen
| Feld | Typ | Hinweise |
|---|---|---|
password * | string | minLength 10, maxLength 1024 |
role | string | default: "read_only" · minLength 2, maxLength 40, pattern ^[a-z0-9_-]+$ |
username * | string | minLength 1, maxLength 150 |
Antwort 201 UserRead
7 Felder anzeigen
| Feld | Typ | Hinweise |
|---|---|---|
auth_source | string | default: "local" |
created_at * | string (date-time) | |
id * | string (uuid) | |
last_login_at * | string (date-time) | null | |
role * | string | |
totp_enabled | boolean | default: false |
username * | string |
DELETE /api/users/{user_id}#
Delete User
Berechtigung users.manage (verwalten)
Parameter
user_id * | path | string (uuid) |
Antwort 204
POST /api/users/{user_id}/reset-2fa#
Reset Two Factor
Admin recovery for a user who lost their authenticator and recovery codes.
Berechtigung users.manage (verwalten)
Parameter
user_id * | path | string (uuid) |
Antwort 200 UserRead
7 Felder anzeigen
| Feld | Typ | Hinweise |
|---|---|---|
auth_source | string | default: "local" |
created_at * | string (date-time) | |
id * | string (uuid) | |
last_login_at * | string (date-time) | null | |
role * | string | |
totp_enabled | boolean | default: false |
username * | string |
POST /api/users/{user_id}/reset-password#
Reset Password
Berechtigung users.manage (verwalten)
Parameter
user_id * | path | string (uuid) |
Anfrage-Body UserPasswordReset
1 Felder anzeigen
| Feld | Typ | Hinweise |
|---|---|---|
new_password * | string | minLength 10, maxLength 1024 |
Antwort 200 UserRead
7 Felder anzeigen
| Feld | Typ | Hinweise |
|---|---|---|
auth_source | string | default: "local" |
created_at * | string (date-time) | |
id * | string (uuid) | |
last_login_at * | string (date-time) | null | |
role * | string | |
totp_enabled | boolean | default: false |
username * | string |
PATCH /api/users/{user_id}/role#
Update Role
Berechtigung users.manage (verwalten)
Parameter
user_id * | path | string (uuid) |
Anfrage-Body UserRoleUpdate
1 Felder anzeigen
| Feld | Typ | Hinweise |
|---|---|---|
role * | string | minLength 2, maxLength 40, pattern ^[a-z0-9_-]+$ |
Antwort 200 UserRead
7 Felder anzeigen
| Feld | Typ | Hinweise |
|---|---|---|
auth_source | string | default: "local" |
created_at * | string (date-time) | |
id * | string (uuid) | |
last_login_at * | string (date-time) | null | |
role * | string | |
totp_enabled | boolean | default: false |
username * | string |