API Overview
Quizzz exposes REST API endpoints under /api/.
Authentication
Admin API routes require a valid session cookie. The session is established via Google OAuth login at /login.
Base URL
| Environment | URL |
|---|---|
| Dev | https://quizzz-dev.techtranslab.com |
| Prod | https://quizzz-gke.techtranslab.com |
Key Endpoints
Health Check
GET /api/healthzReturns 200 OK when the service is healthy.
Quiz Generation
POST /api/generate-quizGenerate a single quiz question. See Quiz Generation.
Batch Generation
POST /api/admin/quizzes/batches/{batchId}/run
GET /api/admin/quizzes/batches/{batchId}/statusStart and monitor batch generation. See Batch Generation.
Error Format
All API errors follow this structure:
json
{
"error": "Human-readable error message",
"code": "ERROR_CODE"
}Common HTTP status codes:
| Code | Meaning |
|---|---|
| 200 | Success |
| 202 | Accepted (job enqueued) |
| 400 | Bad request (validation error) |
| 401 | Unauthorized (not logged in) |
| 403 | Forbidden (not your resource) |
| 404 | Not found |
| 429 | Rate limited |
| 500 | Internal server error |