API Reference
Verified against implementation on 2026-05-31.
Contract source of truth
src/app/api/*src/app/schemas/*- runtime
GET /openapi.json(development/debug mode) - shared error contracts in
src/app/api/contracts.py
Important clarification
GitPulse does not use a JWT login endpoint such as /api/v1/auth/login.
Authentication uses three modes:
- Dashboard: GitLab OAuth + session cookie.
- API: static bearer token (
TEACHER_API_TOKEN) or dashboard session. - Webhook endpoint:
X-Gitlab-Token.
Base prefixes
| Area | Prefix | Notes |
|---|---|---|
| REST API | /api/v1 | CRUD, sync, telemetry, jobs |
| Dashboard | /dashboard | server-rendered UI + JSON endpoints |
| Ops | /health, /metrics | health checks and Prometheus scrape |
Health, ops, and public metadata endpoints
GET /healthGET /health/liveGET /health/readyGET /metricsGET /robots.txt- Dynamic search engine indexing rulesGET /sitemap.xml- XML sitemap listing public-facing pages with hreflang alternatesGET /llms.txt- Developer-focused prompt configuration declaring private boundariesGET /google32f411f09f436ae2.html- Google Search Console ownership verification tokenGET /privacy- GDPR Privacy Policy redirect to documentation siteGET /terms- Terms of Service redirect to documentation site
Example:
| Bash | |
|---|---|
API authentication examples
Bearer token
Webhook endpoint
| Bash | |
|---|---|
Endpoint inventory (grouped)
Current scan: 222 route handlers (213 under /api/v1 and /dashboard, plus 9 public/operational in main.py).
Core API
- Courses:
/api/v1/courses/* - Teams:
/api/v1/teams/* - Students:
/api/v1/students/* - Projects:
/api/v1/projects/* - Users:
/api/v1/users/*
Event pipeline
- Webhook ingest:
POST /api/v1/webhooks/gitlab - DLQ/replay:
/api/v1/events/*
Sync and jobs
- Sync:
/api/v1/teams/{team_id}/sync,/api/v1/courses/{course_id}/sync-all - Recheck:
/api/v1/teams/{team_id}/recheck- immediate metric recomputation (force all checks) - Job status/SSE:
/api/v1/jobs/{job_id},/api/v1/jobs/{job_id}/stream
Extensions
- LLM:
/api/v1/llm/mr/{project_id}/{mr_iid} - GitLab parse:
/api/v1/gitlab/parse-url
Telemetry
/api/v1/telemetry/*(activity, compliance snapshots, feedback, report preview)
Dashboard routes
/dashboard/* includes:
- login/logout/OAuth callback
- dashboards for courses, teams, students, projects
- admin sections (users, courses, system, events)
Mermaid API domain map
flowchart TB
API["/api/v1"]
API --> C["Courses"]
API --> T["Teams"]
API --> S["Students"]
API --> P["Projects"]
API --> U["Users"]
API --> E["Events/Webhooks"]
API --> SY["Sync + Jobs"]
API --> TE["Telemetry"]
API --> X["LLM / GitLab Parse"] OpenAPI export
| Bash | |
|---|---|
Note: openapi.json, /docs, and /redoc are available in development/debug mode.
Related docs
- Architecture
- GitLab webhooks
- Monitoring
- Detailed route inventory:
docs/04-api-spec.md