Authentication¶
Auto-generated reference for Authentication endpoints (17 operations).
OpenAPI tags: auth, preferences
Endpoints: 17
GET /api/auth/capabilities¶
Auth Capabilities
Authentication: none
Responses:
| Status | Description | Example |
|---|---|---|
| 200 | Successful Response | {"password_reset_available": true, "fhir_enabled": true, "siem_export_enabled": true, "telegram_bot_enabled": true, "... |
Example:
curl -X GET https://fileguardian.com.ru/api/auth/capabilities \
-H "Authorization: Bearer $JWT"
GET /api/auth/departments¶
List Public Departments
Authentication: none
Parameters:
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| subdomain | query | string | ✅ | — |
Responses:
| Status | Description | Example |
|---|---|---|
| 200 | Successful Response | [{"id": 0, "name": "string"}] |
| 422 | Validation Error | {"detail": [{"loc": ["string"], "msg": "string", "type": "string"}]} |
Example:
curl -X GET https://fileguardian.com.ru/api/auth/departments \
-H "Authorization: Bearer $JWT"
POST /api/auth/login¶
Login
Authentication: none
Request Body:
{
"email": "user@example.com",
"password": "string",
"subdomain": "string",
"totp_code": "string"
}
Responses:
| Status | Description | Example |
|---|---|---|
| 200 | Successful Response | {"access_token": "string", "refresh_token": "string", "token_type": "bearer", "tenant_id": 0, "role": "string", "demo... |
| 422 | Validation Error | {"detail": [{"loc": ["string"], "msg": "string", "type": "string"}]} |
Example:
curl -X POST https://fileguardian.com.ru/api/auth/login \
-H "Authorization: Bearer $JWT" \
-H "Content-Type: application/json" \
-d '{"email":"user@example.com","password":"string","subdomain":"string","totp_code":"string"}'
POST /api/auth/logout¶
Logout
Authentication: Bearer JWT (required)
Request Body:
{
"refresh_token": "string",
"all_devices": false
}
Responses:
| Status | Description | Example |
|---|---|---|
| 200 | Successful Response | {"detail": "string", "email_verified": true} |
| 422 | Validation Error | {"detail": [{"loc": ["string"], "msg": "string", "type": "string"}]} |
Example:
curl -X POST https://fileguardian.com.ru/api/auth/logout \
-H "Authorization: Bearer $JWT" \
-H "Content-Type: application/json" \
-d '{"refresh_token":"string","all_devices":false}'
GET /api/auth/me¶
Me
Authentication: Bearer JWT (required)
Responses:
| Status | Description | Example |
|---|---|---|
| 200 | Successful Response | {"id": 0, "email": "string", "full_name": "string", "role": "string", "tenant_id": 0, "department_id": 0, "department... |
Example:
curl -X GET https://fileguardian.com.ru/api/auth/me \
-H "Authorization: Bearer $JWT"
POST /api/auth/refresh¶
Refresh Token
Authentication: none
Request Body:
{
"refresh_token": "string"
}
Responses:
| Status | Description | Example |
|---|---|---|
| 200 | Successful Response | {"access_token": "string", "refresh_token": "string", "token_type": "bearer", "tenant_id": 0, "role": "string", "demo... |
| 422 | Validation Error | {"detail": [{"loc": ["string"], "msg": "string", "type": "string"}]} |
Example:
curl -X POST https://fileguardian.com.ru/api/auth/refresh \
-H "Authorization: Bearer $JWT" \
-H "Content-Type: application/json" \
-d '{"refresh_token":"string"}'
POST /api/auth/register¶
Register
Authentication: none
Request Body:
{
"email": "user@example.com",
"password": "string",
"full_name": "string",
"role": "doctor",
"subdomain": "string",
"department_id": 0
}
Responses:
| Status | Description | Example |
|---|---|---|
| 201 | Successful Response | {"id": 0, "email": "string", "full_name": "string", "role": "string", "tenant_id": 0, "department_id": 0, "department... |
| 422 | Validation Error | {"detail": [{"loc": ["string"], "msg": "string", "type": "string"}]} |
Example:
curl -X POST https://fileguardian.com.ru/api/auth/register \
-H "Authorization: Bearer $JWT" \
-H "Content-Type: application/json" \
-d '{"email":"user@example.com","password":"string","full_name":"string","role":"doctor","subdomain":"string","department_id":0}'
POST /api/auth/request-reset¶
Request Reset
Authentication: none
Request Body:
{
"email": "user@example.com",
"subdomain": "string"
}
Responses:
| Status | Description | Example |
|---|---|---|
| 202 | Successful Response | null |
| 422 | Validation Error | {"detail": [{"loc": ["string"], "msg": "string", "type": "string"}]} |
Example:
curl -X POST https://fileguardian.com.ru/api/auth/request-reset \
-H "Authorization: Bearer $JWT" \
-H "Content-Type: application/json" \
-d '{"email":"user@example.com","subdomain":"string"}'
POST /api/auth/resend-verification¶
Resend Verification
Authentication: none
Request Body:
{
"email": "user@example.com",
"subdomain": "string"
}
Responses:
| Status | Description | Example |
|---|---|---|
| 202 | Successful Response | {"detail": "string", "email_verified": true} |
| 422 | Validation Error | {"detail": [{"loc": ["string"], "msg": "string", "type": "string"}]} |
Example:
curl -X POST https://fileguardian.com.ru/api/auth/resend-verification \
-H "Authorization: Bearer $JWT" \
-H "Content-Type: application/json" \
-d '{"email":"user@example.com","subdomain":"string"}'
POST /api/auth/reset-password¶
Reset Password
Authentication: none
Request Body:
{
"token": "string",
"new_password": "string"
}
Responses:
| Status | Description | Example |
|---|---|---|
| 200 | Successful Response | {"detail": "string", "email_verified": true} |
| 422 | Validation Error | {"detail": [{"loc": ["string"], "msg": "string", "type": "string"}]} |
Example:
curl -X POST https://fileguardian.com.ru/api/auth/reset-password \
-H "Authorization: Bearer $JWT" \
-H "Content-Type: application/json" \
-d '{"token":"string","new_password":"string"}'
GET /api/auth/sessions¶
My Sessions
Authentication: Bearer JWT (required)
Responses:
| Status | Description | Example |
|---|---|---|
| 200 | Successful Response | [{"jti": "string", "created_at": 0}] |
Example:
curl -X GET https://fileguardian.com.ru/api/auth/sessions \
-H "Authorization: Bearer $JWT"
DELETE /api/auth/sessions/{jti}¶
Revoke My Session
Authentication: Bearer JWT (required)
Parameters:
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| jti | path | string | ✅ | — |
Responses:
| Status | Description | Example |
|---|---|---|
| 200 | Successful Response | {"detail": "string", "email_verified": true} |
| 422 | Validation Error | {"detail": [{"loc": ["string"], "msg": "string", "type": "string"}]} |
Example:
curl -X DELETE https://fileguardian.com.ru/api/auth/sessions/{jti} \
-H "Authorization: Bearer $JWT"
GET /api/auth/tenants¶
List Public Tenants
Authentication: none
Responses:
| Status | Description | Example |
|---|---|---|
| 200 | Successful Response | [{"id": 0, "name": "string", "subdomain": "string"}] |
Example:
curl -X GET https://fileguardian.com.ru/api/auth/tenants \
-H "Authorization: Bearer $JWT"
POST /api/auth/verify-email¶
Verify Email
Authentication: none
Parameters:
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| token | query | string | ✅ | — |
Responses:
| Status | Description | Example |
|---|---|---|
| 200 | Successful Response | {"detail": "string", "email_verified": true} |
| 422 | Validation Error | {"detail": [{"loc": ["string"], "msg": "string", "type": "string"}]} |
Example:
curl -X POST https://fileguardian.com.ru/api/auth/verify-email \
-H "Authorization: Bearer $JWT"
GET /api/preferences¶
Read Preferences
Authentication: Bearer JWT (required)
Responses:
| Status | Description | Example |
|---|---|---|
| 200 | Successful Response | null |
Example:
curl -X GET https://fileguardian.com.ru/api/preferences \
-H "Authorization: Bearer $JWT"
PUT /api/preferences¶
Write Preferences
Authentication: Bearer JWT (required)
Request Body:
{
"theme": "string",
"settings": {}
}
Responses:
| Status | Description | Example |
|---|---|---|
| 200 | Successful Response | null |
| 422 | Validation Error | {"detail": [{"loc": ["string"], "msg": "string", "type": "string"}]} |
Example:
curl -X PUT https://fileguardian.com.ru/api/preferences \
-H "Authorization: Bearer $JWT" \
-H "Content-Type: application/json" \
-d '{"theme":"string","settings":{}}'
PUT /api/preferences/theme¶
Write Theme
Authentication: Bearer JWT (required)
Request Body:
{
"theme": "string"
}
Responses:
| Status | Description | Example |
|---|---|---|
| 200 | Successful Response | null |
| 422 | Validation Error | {"detail": [{"loc": ["string"], "msg": "string", "type": "string"}]} |
Example:
curl -X PUT https://fileguardian.com.ru/api/preferences/theme \
-H "Authorization: Bearer $JWT" \
-H "Content-Type: application/json" \
-d '{"theme":"string"}'