Skip to content

Commit d4cb104

Browse files
gkorlandCopilot
andcommitted
fix(docs): merge duplicate API sections, standardize auth format
- Remove duplicate 'API Reference' section, merge curl examples into 'API Endpoints' as 'Usage examples' subsection - Standardize auth header to Bearer <YOUR_SECRET_TOKEN> placeholder - Move License section to end of file Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 625f87d commit d4cb104

1 file changed

Lines changed: 20 additions & 23 deletions

File tree

README.md

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
266253
Query 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-
274261
List 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

279269
Switch 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+
284281
Copyright FalkorDB Ltd. 2025

0 commit comments

Comments
 (0)