Access API
Generated from servtuner commit 5b46cdad0e5c.
GET /audit
Section titled “GET /audit”Newest first; pass the last id as before_id for the next page.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
limit |
query | integer |
No | ≥ 1; ≤ 500 Default: 100. |
before_id |
query | integer or null |
No |
| Status | Meaning | Body |
|---|---|---|
200 |
Successful Response | array of AuditEventView |
422 |
Validation Error | HTTPValidationError |
POST /auth/login
Section titled “POST /auth/login”Signs in with a username and password and sets the session cookie.
Request body: LoginRequest (application/json)
| Status | Meaning | Body |
|---|---|---|
200 |
Successful Response | UserView |
422 |
Validation Error | HTTPValidationError |
POST /auth/logout
Section titled “POST /auth/logout”Ends the current session.
| Status | Meaning | Body |
|---|---|---|
204 |
Successful Response | None |
GET /auth/me
Section titled “GET /auth/me”Returns the signed-in user, their role and the actions it allows.
| Status | Meaning | Body |
|---|---|---|
200 |
Successful Response | UserView |
POST /auth/password
Section titled “POST /auth/password”Needs the current password; signs out the user’s other sessions.
Request body: PasswordChange (application/json)
| Status | Meaning | Body |
|---|---|---|
204 |
Successful Response | None |
422 |
Validation Error | HTTPValidationError |
GET /auth/sessions
Section titled “GET /auth/sessions”Lists the user’s own sessions.
| Status | Meaning | Body |
|---|---|---|
200 |
Successful Response | array of SessionView |
POST /auth/sessions/revoke-others
Section titled “POST /auth/sessions/revoke-others”Sign out everywhere else.
| Status | Meaning | Body |
|---|---|---|
200 |
Successful Response | RevokedSessions |
DELETE /auth/sessions/{session_id}
Section titled “DELETE /auth/sessions/{session_id}”Ends one of the user’s sessions.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
session_id |
path | string |
Yes |
| Status | Meaning | Body |
|---|---|---|
204 |
Successful Response | None |
422 |
Validation Error | HTTPValidationError |
POST /auth/setup
Section titled “POST /auth/setup”Create the first admin with the setup token; 409 once any admin exists.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
X-Servtuner-Setup-Token |
header | string or null |
No |
Request body: SetupRequest (application/json)
| Status | Meaning | Body |
|---|---|---|
201 |
Successful Response | UserView |
422 |
Validation Error | HTTPValidationError |
GET /auth/status
Section titled “GET /auth/status”Reports the auth mode and whether setup is still required.
| Status | Meaning | Body |
|---|---|---|
200 |
Successful Response | AuthStatus |
GET /users
Section titled “GET /users”Lists users.
| Status | Meaning | Body |
|---|---|---|
200 |
Successful Response | array of UserAdminView |
POST /users
Section titled “POST /users”Creates a user.
Request body: UserCreate (application/json)
| Status | Meaning | Body |
|---|---|---|
201 |
Successful Response | UserAdminView |
422 |
Validation Error | HTTPValidationError |
GET /users/{user_id}
Section titled “GET /users/{user_id}”Returns one user with their identities.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
user_id |
path | string |
Yes |
| Status | Meaning | Body |
|---|---|---|
200 |
Successful Response | UserAdminView |
422 |
Validation Error | HTTPValidationError |
PATCH /users/{user_id}
Section titled “PATCH /users/{user_id}”A role change or disabling signs the user out everywhere; never the last admin.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
user_id |
path | string |
Yes |
Request body: UserUpdate (application/json)
| Status | Meaning | Body |
|---|---|---|
200 |
Successful Response | UserAdminView |
422 |
Validation Error | HTTPValidationError |
DELETE /users/{user_id}/identities
Section titled “DELETE /users/{user_id}/identities”The subject is a query parameter: DNs hold commas and slashes.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
user_id |
path | string |
Yes | |
subject |
query | string |
Yes | at most 512 characters |
| Status | Meaning | Body |
|---|---|---|
200 |
Successful Response | UserAdminView |
422 |
Validation Error | HTTPValidationError |
POST /users/{user_id}/identities
Section titled “POST /users/{user_id}/identities”Links a forward-header identity to a user.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
user_id |
path | string |
Yes |
Request body: IdentityLink (application/json)
| Status | Meaning | Body |
|---|---|---|
201 |
Successful Response | UserAdminView |
422 |
Validation Error | HTTPValidationError |
POST /users/{user_id}/password
Section titled “POST /users/{user_id}/password”A temporary password, shown once; the user must change it, and is signed out.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
user_id |
path | string |
Yes |
| Status | Meaning | Body |
|---|---|---|
200 |
Successful Response | TemporaryPassword |
422 |
Validation Error | HTTPValidationError |
DELETE /users/{user_id}/sessions
Section titled “DELETE /users/{user_id}/sessions”Signs a user out everywhere.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
user_id |
path | string |
Yes |
| Status | Meaning | Body |
|---|---|---|
204 |
Successful Response | None |
422 |
Validation Error | HTTPValidationError |