List Repositories
Fetch all GitHub repositories the authenticated user has access to, annotated with connection status.GET /api/v1/repos
Authentication: Required
Response
Array of repository objects:GitHub repository ID
Repository name (e.g.,
"nectr")Full repository name (e.g.,
"octocat/nectr")Repository description
Whether the repository is private
GitHub repository URL
ISO 8601 timestamp of last update
Whether Nectr is connected to this repository
Internal installation ID (null if not connected)
Example Response
Error Responses
- 401: Token decryption failed (SECRET_KEY changed)
- 502: Failed to fetch repositories from GitHub
Connect Repository
Connect a repository to Nectr in one click (no GitHub redirect required).POST /api/v1/repos/{owner}/{repo}/install
Authentication: Required
Repository owner (user or organization)
Repository name
What This Does
- Creates a webhook on the GitHub repository pointing to
{BACKEND_URL}/api/v1/webhooks/github - Stores installation record with webhook ID and secret
- Kicks off background tasks:
- Project scan: Extracts architecture and conventions using AI
- Graph build: Indexes file tree into Neo4j
Response
Always
"connected"Internal installation ID
Full repository name (e.g.,
"octocat/nectr")Example Response
Error Responses
- 400: Repo already connected
- 401: Session expired
- 502: Failed to install webhook (check GitHub permissions)
Rescan Repository
Re-index the repository file tree into Neo4j.POST /api/v1/repos/{owner}/{repo}/rescan
Authentication: Required
Repository owner
Repository name
Response
Always
"scan_complete"Full repository name
Number of files indexed into Neo4j
Example Response
Error Responses
- 404: Repo not connected
- 503: Neo4j not configured
- 500: Rescan failed
Disconnect Repository
Disconnect a repository and remove its webhook.DELETE /api/v1/repos/{owner}/{repo}/install
Authentication: Required
Repository owner
Repository name
Response
Always
"disconnected"Full repository name
Example Response
Notes
- Marks installation as inactive in database
- Attempts to remove webhook from GitHub (warns if fails)
- Does not delete Neo4j graph data or memory records
Error Responses
- 404: Installation not found