@@ -242,43 +242,40 @@ A C analyzer exists in the source tree, but it is commented out and is not curre
242242| POST | ` /api/analyze_repo ` | Clone and analyze a git repository |
243243| POST | ` /api/switch_commit ` | Switch the indexed repository to a specific commit |
244244
245- ## License
246-
247- This project is licensed under the MIT License - see the [ LICENSE] ( LICENSE ) file for details.
248-
249- ## API Reference
250-
251- ### Retrieve a graph
252-
253- Fetch graph entities from a repository:
245+ ### Usage examples
254246
247+ Fetch graph entities:
255248``` bash
256- curl -X GET " http://127.0.0.1:5000/api/graph_entities?repo=<REPO_NAME>" -H " Authorization: Bearer ${SECRET_TOKEN} "
249+ curl -X GET " http://127.0.0.1:5000/api/graph_entities?repo=<REPO_NAME>" \
250+ -H " Authorization: Bearer <YOUR_SECRET_TOKEN>"
257251```
258252
259- Example:
260- ``` bash
261- curl -X GET " http://127.0.0.1:5000/api/graph_entities?repo=GraphRAG-SDK" -H " Authorization: Bearer ${SECRET_TOKEN} "
262- ```
263-
264- ### Send Query
265-
266253Query your code graph using natural language:
267-
268254``` bash
269- 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} "
255+ curl -X POST http://127.0.0.1:5000/api/chat \
256+ -H " Content-Type: application/json" \
257+ -H " Authorization: Bearer <YOUR_SECRET_TOKEN>" \
258+ -d ' {"repo": "<REPO_NAME>", "msg": "<YOUR_QUESTION>"}'
270259```
271260
272- ### Commit history
273-
274261List all commits:
275262``` bash
276- 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} "
263+ curl -X POST http://127.0.0.1:5000/api/list_commits \
264+ -H " Content-Type: application/json" \
265+ -H " Authorization: Bearer <YOUR_SECRET_TOKEN>" \
266+ -d ' {"repo": "<REPO_NAME>"}'
277267```
278268
279269Switch to a specific commit:
280270``` bash
281- 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} "
271+ curl -X POST http://127.0.0.1:5000/api/switch_commit \
272+ -H " Content-Type: application/json" \
273+ -H " Authorization: Bearer <YOUR_SECRET_TOKEN>" \
274+ -d ' {"repo": "<REPO_NAME>", "commit": "<COMMIT_HASH>"}'
282275```
283276
277+ ## License
278+
279+ This project is licensed under the MIT License - see the [ LICENSE] ( LICENSE ) file for details.
280+
284281Copyright FalkorDB Ltd. 2025
0 commit comments