Shared Routers#
Routers used by both UI and operations.
Auth Routers#
Paths: /auth, /github, /api/tokens
Purpose: Authentication and token management
Key endpoints:
GET /github/login- Initiate OAuthGET /github/callback- OAuth callbackGET /auth/me- Current user infoGET /api/tokens/scopes- Get available scopesPOST /api/tokens/- Create API token (one-time display)GET /api/tokens/- List tokensGET /api/tokens/{id}- Get token detailsPUT /api/tokens/{id}- Update tokenGET /api/tokens/{id}/usage- Get usage statisticsPOST /api/tokens/{id}/regenerate- Regenerate tokenDELETE /api/tokens/{id}- Revoke tokenPOST /api/tokens/bulk-revoke- Bulk revokeGET /api/tokens/export- Export token list
See ../../AuthToken for complete endpoint documentation.
Instruments Router#
Path: /instruments
Purpose: Query instrument configurations
Key endpoints:
GET /- List instrumentsGET /{id}/modules- Get modulesGET /modules/{id}/configurations- Get configurations
Used by:
UI: Display instrument info
Operations: Validate configurations
Site Router#
Path: /api/site
Purpose: Site configuration and status
Key endpoints:
GET /info- Site configurationGET /health- Health checkGET /buffer-stats- Buffer statistics
Example:
curl http://localhost:8000/health
{
"status": "healthy",
"database": "connected",
"redis": "connected",
"transaction_buffer": {"size": 5}
}
Demo Router#
Path: /api/demo
Purpose: Testing and examples
Key endpoints:
POST /create-observation- Demo buffered operationGET /operation-examples- List examplesGET /site-info- Site information
Next Steps#
Authentication Deep Dive - Authentication details
Site Configuration - Site configuration