Appearance
API Documentation
Scalar
The API documentation is served by Scalar, a modern interactive API documentation UI. When the API is running locally, access Scalar at:
Scalar reads the OpenAPI specification generated by Microsoft.AspNetCore.OpenApi and provides:
- Interactive request/response testing
- All registered endpoints with their schemas
- Request body examples
- Authentication support
API Endpoints
Health Checks
| Method | Path | Description |
|---|---|---|
| GET | /health | Aggregated health status (cached 10s) |
| GET | /health/live | Liveness probe (no dependency checks) |
| GET | /health/ready | Readiness probe (all dependencies) |
Storage (Internal)
| Method | Path | Description |
|---|---|---|
| POST | /api/internal/storage/upload | Upload file (multipart) |
| GET | /api/internal/storage/{id}/url | Get presigned download URL |
| DELETE | /api/internal/storage/{id} | Delete file |
Test Endpoints (Development Only)
These endpoints are only registered when ASPNETCORE_ENVIRONMENT=Development:
| Method | Path | Description |
|---|---|---|
| POST | /api/internal/test/audit | Create test audit log in ClickHouse |
| POST | /api/internal/test/database | Insert and retrieve test record in PostgreSQL |
| POST | /api/internal/test/email | Send test email via Mailpit |
| POST | /api/internal/test/cache | Write and read Redis cache entry |
| POST | /api/internal/test/outbox | Write a test outbox message and verify processing |
Email Renderer API
The email renderer runs as a separate Hono/Bun service on port 3050.
| Method | Path | Description |
|---|---|---|
| GET | /health | Health check ({ "status": "ok", "service": "wilo-email" }) |
| POST | /render | Render email template to HTML + plain text |
POST /render
Request:
json
{
"template": "welcome",
"props": {
"userName": "John Doe",
"baseUrl": "https://clubwilo.com",
"dashboardUrl": "https://clubwilo.com/dashboard"
}
}Response:
json
{
"html": "<!DOCTYPE html>...",
"text": "Welcome, John Doe..."
}Available templates: welcome, verify-email, reset-password, notification