Reserved Routes
pb-ext registers the following routes. Do not register your own routes at these paths.Dashboard Routes
pb-ext Dashboard
Purpose: Serves the main pb-ext monitoring dashboard.
Features:
- System health metrics (CPU, memory, disk, network)
- Request analytics and visitor stats
- Cron job management and execution history
- Runtime configuration
/_/ login if not authenticated.
Cron Job API Routes
All cron routes require superuser authentication.
List Jobs
Trigger Job Manually
Remove Job
Get Scheduler Status
Update Timezone
Get Job Logs (Paginated)
page(default: 1)perPage(default: 20, max: 100)sort(default:-start_time)
Get Logs for Specific Job
Get Log Analytics
API Documentation Routes
List API Versions
Get Version Metadata
GET /api/docs/v1
Response:
Get OpenAPI Spec
GET /api/docs/v1/openapi.json
Response: Full OpenAPI 3.0.3 JSON spec
Content-Type: application/json
Swagger UI
GET /api/docs/v1/swagger
Purpose: Serves interactive Swagger UI for exploring and testing API endpoints.
Features:
- Try-it-out functionality
- Dark mode by default (SwaggerDark theme)
- Authentication support
- Request/response examples
PublicSwagger in APIDocsConfig:
Debug AST Endpoint
- Debugging why handler metadata isn’t detected
- Inspecting generated schemas
- Verifying parameter extraction
- Troubleshooting OpenAPI generation
Route Registration Order
pb-ext registers its routes during theOnServe event. To avoid conflicts:
✅ Good: Register your routes in the same event
Path Conflicts
/_/_— pb-ext dashboard/api/cron/*— Cron management API/api/docs/*— OpenAPI documentation
Example Conflicts
Middleware on Reserved Routes
pb-ext’s reserved routes have their own middleware chains. You cannot bind middleware to these routes. Example (this has no effect):Authentication Requirements
Customizing Documentation Routes
To disable or customize API docs routes:Health Check Endpoint
While not strictly “reserved,” pb-ext registers:Best Practices
Avoid Path Collisions
Check reserved paths before registering your routes. Use versioned prefixes like
/api/v1/*.Don't Override
Never attempt to override pb-ext routes. They’re registered with high priority.
Use Route Groups
Group your routes under a common prefix to avoid conflicts and simplify middleware.
Test in Dev
Verify your routes work alongside pb-ext routes during development.
Further Reading
- Reserved Collections - System collections
- Middleware - Custom middleware patterns
- Spec Generation - OpenAPI spec generation