RepoPilot

API reference

Fastify REST API served at NEXT_PUBLIC_API_URL (default http://localhost:3001). Most dashboard routes proxy through Next.js BFF handlers.

Base URL

# Local
http://localhost:3001

# Health
GET /health

Public endpoints

MethodPathDescription
POST/api/v1/public/repositories/openRegister + start indexing a public GitHub repo
GET/api/v1/public/repositories/browseSearch public repos for the Browse page

Repository endpoints

All paths below are prefixed with /api/v1/repositories/:repoId.

MethodPath suffixDescription
GET/revisionsList indexed revisions
GET/revisions/:shaRevision status and counts
GET/index/statusCurrent index job state
GET/index/streamSSE stream of index progress
POST/indexEnqueue full re-index
POST/graph/rebuildRebuild dependency graph
POST/searchHybrid code search ({ query, topK })
POST/askAsk with citations ({ query, revisionSha })
GET/graphContext graph (+ op=shortestPath|neighborhood|cycles)
GET/architectureArchitecture layout payload
GET/dependenciesSymbol/module traversal queries
GET/impactImpact for filePath, symbolName, or pullNumber
GET/hotspotsHotspot rankings (?topK=&windowDays=7|30|90|365)
GET/co-changeFiles that change together
POST/search/historySearch commit messages and PR titles
GET/similar-changesFind similar historical diffs (?pullNumber= or ?file=)
GET/findingsLatest-review findings across PRs (?limit=)
GET/wikiIndexed markdown / ADR pages (?path=&revisionSha=&limit=)
GET/ownershipCODEOWNERS rules + owners for ?path=
GET/pullsList pull requests
GET/pulls/:numberPR details + review
POST/pulls/:number/reviewTrigger PR review
GET/reviews/historyPast review runs
GET/analyticsRepository analytics summary
POST/history/ingestIngest git history
GET/symbols/:name/historySymbol change timeline

Webhooks

POST /webhook
# GitHub push/PR events (requires GITHUB_WEBHOOK_SECRET)

Example: search

curl -X POST http://localhost:3001/api/v1/repositories/$REPO_ID/search \
  -H 'Content-Type: application/json' \
  -d '{"query":"authenticate user","topK":5}'

Authentication

Dashboard pages call Next.js API routes under /pages/api/repositories/[repoId]/, which attach the internal secret. Direct API access in production should go through the same BFF or supply INTERNAL_API_SECRET as configured in api/.env.

See Development for env setup.