Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,4 +246,39 @@ A C analyzer exists in the source tree, but it is commented out and is not curre

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

## API Reference

### Retrieve a graph

Fetch graph entities from a repository:

```bash
curl -X GET "http://127.0.0.1:5000/api/graph_entities?repo=<REPO_NAME>" -H "Authorization: Bearer ${SECRET_TOKEN}"
```

Example:
```bash
curl -X GET "http://127.0.0.1:5000/api/graph_entities?repo=GraphRAG-SDK" -H "Authorization: Bearer ${SECRET_TOKEN}"
```

### Send Query

Query your code graph using natural language:

```bash
curl -X POST http://127.0.0.1:5000/api/chat -H "Content-Type: application/json" -d '{"repo": "<REPO_NAME>", "msg": "<YOUR_QUESTION>"}' -H "Authorization: Bearer ${SECRET_TOKEN}"
```

### Commit history

List all commits:
```bash
curl -X POST http://127.0.0.1:5000/api/list_commits -H "Content-Type: application/json" -d '{"repo": "<REPO_NAME>"}' -H "Authorization: Bearer ${SECRET_TOKEN}"
```

Switch to a specific commit:
```bash
curl -X POST http://127.0.0.1:5000/api/switch_commit -H "Content-Type: application/json" -d '{"repo": "<REPO_NAME>", "commit": "<COMMIT_HASH>"}' -H "Authorization: Bearer ${SECRET_TOKEN}"
```
Comment on lines +248 to +275
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auth examples elsewhere in the README use Authorization: Bearer <YOUR_SECRET_TOKEN>. Here the header is shown as Authorization: ${SECRET_TOKEN}; since the backend accepts either raw token or Bearer, consider standardizing these examples to the Bearer form for consistency and clarity.

Copilot uses AI. Check for mistakes.

Copyright FalkorDB Ltd. 2025
Loading