presentation.routers.system¶
src.presentation.routers.system
¶
System router for non-versioned application endpoints.
Provides external-facing system endpoints that are not part of the versioned API contract, such as root, health, and configuration.
These endpoints are intentionally lightweight and side-effect free to support health checks and basic diagnostics.
Classes¶
Functions¶
root
async
¶
Root endpoint - basic health/status check.
Returns:
| Type | Description |
|---|---|
dict[str, str]
|
dict[str, str]: Welcome message with API status and version. |
Source code in src/presentation/routers/system.py
health
async
¶
Health check endpoint for monitoring and load balancers.
Returns:
| Type | Description |
|---|---|
dict[str, str]
|
dict[str, str]: Health status indicator. |
health_jobs
async
¶
Health check for background jobs service (load balancer use).
Simple health check endpoint for load balancers and infrastructure monitoring. Returns only status without sensitive details like queue length or error messages.
For detailed job status, use the authenticated admin endpoint: GET /api/v1/admin/jobs
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
monitor
|
JobsMonitor
|
JobsMonitor instance for querying job queue status. |
Depends(get_jobs_monitor)
|
Returns:
| Type | Description |
|---|---|
dict[str, str]
|
dict[str, str]: Simple status indicator (healthy/unhealthy). |
Source code in src/presentation/routers/system.py
get_config
async
¶
Configuration debug endpoint (development only).
Returns configuration information for debugging purposes. In non-development environments this endpoint is disabled.
Returns:
| Name | Type | Description |
|---|---|---|
JSONResponse |
JSONResponse
|
Configuration details (sanitized) or 403 in non-development environments. |