API Reference
This documentation covers all public API endpoints available in Lormex.Endpoints Overview
| Endpoint | Method | Description |
|---|---|---|
/api/services | GET | List all services with pagination |
/api/services/:slug | GET | Get details of a specific service |
/api/visitors | GET | Get active visitor count |
/api/visitors | POST | Register an active session |
/api/overview | GET | Get all services with 24h history |
/api/revivals | GET | List revivals with pagination |
/api/metrics | GET | Get metrics for a specific service |
/api/metrics | POST | Submit metrics for a service |
/api/metrics/all | GET | Get metrics for all services |
/api/metrics/history | GET | Get historical data for all services |
Authentication
Currently, all API endpoints are publicly accessible without authentication.Response Codes
| Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request - Invalid parameters |
| 403 | Forbidden - Invalid request (bots blocked) |
| 404 | Not Found - Resource doesn’t exist |
| 415 | Unsupported Media Type |
| 500 | Internal Server Error |
Caching
Most endpoints include caching headers:s-maxage=30- CDN cache for 30 secondsstale-while-revalidate=120- Serve stale while refreshing
/api/overview and /api/metrics/history use no-store for real-time data.
