http://localhost:5050 by default.
Base URL
Authentication
Currently, CodeGraph runs locally without authentication. For production deployments, configure authentication in the API server settings.Response Format
All responses are JSON:Error Responses
| Status Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad request (invalid parameters) |
| 404 | Resource not found |
| 500 | Server error |
Endpoints Overview
Graph Data
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/graph | Get all nodes and edges |
| GET | /api/graph/nodes/{id} | Get single node |
| POST | /api/graph/layout | Save layout positions |
| DELETE | /api/graph/layout | Clear layout positions |
Layout Compute
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/graph/layout/compute | Start GPU layout |
| GET | /api/graph/layout/compute/status | Get computation progress |
| POST | /api/graph/layout/compute/cancel | Cancel computation |
| GET | /api/graph/layout/compute/available | Check GPU availability |
Overlays
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/overlays | List available plugins |
| POST | /api/overlays/{id}/apply | Apply overlay data |
| DELETE | /api/overlays/{id}/apply | Remove overlay data |
Quick Examples
Get the entire graph
Trigger GPU layout
Apply git overlay
SDK / Client Libraries
Currently, CodeGraph provides a REST API. Client libraries for popular languages are planned. For now, you can use any HTTP client:Rate Limiting
No rate limiting is applied by default. For production deployments, consider adding rate limiting at the API gateway level.What’s Next?
Graph API
Graph data endpoints
Layout API
Layout computation endpoints
Overlays API
Overlay management endpoints