-
-
Notifications
You must be signed in to change notification settings - Fork 1
API Reference
Yiğit ERDOĞAN edited this page Jan 11, 2026
·
1 revision
This page documents the backend API endpoints for CodeScope. All endpoints are prefixed with /api/v1 by default.
http://localhost:8000/api/v1
Checks if the backend and its dependencies (Ollama, ChromaDB) are online.
-
URL:
/health -
Method:
GET -
Response:
{ "status": "healthy", "service": "CodeScope", "version": "0.1.0", "ollama": "connected" }
Indexes a local repository into the vector database.
-
URL:
/ingest -
Method:
POST -
Request Body:
{ "path": "/absolute/path/to/repo" } -
Response:
{ "status": "success", "message": "Ingestion completed", "files_processed": 142 }
Send a query to the AI assistant based on the indexed codebase.
-
URL:
/chat -
Method:
POST -
Request Body:
{ "query": "How is authentication implemented?", "stream": true } - Response: Server-Sent Events (SSE) streaming the AI response.
Retrieves the file structure of the indexed repository.
-
URL:
/files/tree -
Method:
GET - Response: Hierarchical JSON structure of the codebase.
Retrieves the content of a specific file.
-
URL:
/files/content -
Method:
GET -
Params:
path=/relative/path/to/file.py
The API uses standard HTTP status codes:
- 200: Success
- 400: Bad Request (e.g., invalid path)
- 404: Not Found
- 500: Internal Server Error (e.g., Ollama connection lost)
- Technical details: Architecture
- Configuration: Configuration
- Developer Guide: Developer Guide