Skip to main content

Reserved Routes

pb-ext registers the following routes. Do not register your own routes at these paths.
Registering routes at these paths will cause conflicts with pb-ext’s built-in functionality.

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
Access:
Authentication: Requires PocketBase superuser (admin) authentication. Redirects to /_/ login if not authenticated.

Cron Job API Routes

All cron routes require superuser authentication.

List Jobs

Response:

Trigger Job Manually

Example:
Response:

Remove Job

Example:
Response:
Cannot remove system jobs (prefixed with __pbExt). Attempting to do so returns an error.

Get Scheduler Status

Response:

Update Timezone

Request Body:
Response:

Get Job Logs (Paginated)

Query Parameters:
  • page (default: 1)
  • perPage (default: 20, max: 100)
  • sort (default: -start_time)
Response:

Get Logs for Specific Job

Response: Same format as paginated logs, filtered to the specified job.

Get Log Analytics

Response:

API Documentation Routes

List API Versions

Response:

Get Version Metadata

Example: GET /api/docs/v1 Response:

Get OpenAPI Spec

Example: GET /api/docs/v1/openapi.json Response: Full OpenAPI 3.0.3 JSON spec Content-Type: application/json

Swagger UI

Example: 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
Access Control: Controlled by PublicSwagger in APIDocsConfig:

Debug AST Endpoint

Purpose: Returns full AST parser state for debugging. Authentication: Requires superuser auth. Response:
Use Cases:
  • 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 the OnServe event. To avoid conflicts: ✅ Good: Register your routes in the same event
❌ Bad: Register routes at reserved paths

Path Conflicts

Do NOT register routes at these path prefixes:
  • /_/_ — 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):
To apply middleware to your own routes only:

Authentication Requirements

Customizing Documentation Routes

To disable or customize API docs routes:
To use a custom base path:

Health Check Endpoint

While not strictly “reserved,” pb-ext registers:
Response:
Purpose: Load balancer health checks.

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