Skip to content

Commit cf62eb5

Browse files
gkorlandCopilot
andcommitted
Add API documentation for graph retrieval, query, and commit history endpoints
Migrated from FalkorDB/code-graph-backend PR #96. Original issue: FalkorDB/code-graph-backend#83 Resolves #534 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c372a5e commit cf62eb5

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,4 +246,41 @@ A C analyzer exists in the source tree, but it is commented out and is not curre
246246

247247
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
248248

249+
Knowledge Graph, Code Analysis, Code Visualization, Dead Code Analysis, Graph Database
250+
251+
## API Reference
252+
253+
### Retrieve a graph
254+
255+
Fetch graph entities from a repository:
256+
257+
```bash
258+
curl -X GET "http://127.0.0.1:5000/graph_entities?repo=<REPO_NAME>" -H "Authorization: ${SECRET_TOKEN}"
259+
```
260+
261+
Example:
262+
```bash
263+
curl -X GET "http://127.0.0.1:5000/graph_entities?repo=GraphRAG-SDK" -H "Authorization: ${SECRET_TOKEN}"
264+
```
265+
266+
### Send Query
267+
268+
Query your code graph using natural language:
269+
270+
```bash
271+
curl -X POST http://127.0.0.1:5000/chat -H "Content-Type: application/json" -d '{"repo": "<REPO_NAME>", "msg": "<YOUR_QUESTION>"}' -H "Authorization: ${SECRET_TOKEN}"
272+
```
273+
274+
### History change
275+
276+
List all commits:
277+
```bash
278+
curl -X POST http://127.0.0.1:5000/list_commits -H "Content-Type: application/json" -d '{"repo": "<REPO_NAME>"}' -H "Authorization: ${SECRET_TOKEN}"
279+
```
280+
281+
Switch to a specific commit:
282+
```bash
283+
curl -X POST http://127.0.0.1:5000/switch_commit -H "Content-Type: application/json" -d '{"repo": "<REPO_NAME>", "commit": "<COMMIT_HASH>"}' -H "Authorization: ${SECRET_TOKEN}"
284+
```
285+
249286
Copyright FalkorDB Ltd. 2025

0 commit comments

Comments
 (0)