HTTP REST API¶
QilbeeDB provides a JSON-based HTTP REST API for all database operations.
Base URL¶
Health Check¶
Response:
List Graphs¶
Response:
Execute Query¶
POST /graphs/{graph_name}/query
Content-Type: application/json
{
"cypher": "MATCH (n:User) WHERE n.age > $min_age RETURN n",
"parameters": {
"min_age": 25
}
}
Response:
{
"results": [
{"n.name": "Alice", "n.age": 28},
{"n.age": 32, "n.name": "Bob"}
],
"stats": {
"nodesScanned": 150,
"executionTimeMs": 12
}
}
Create Node¶
POST /graphs/{graph_name}/nodes
Content-Type: application/json
{
"labels": ["User", "Person"],
"properties": {
"name": "Alice",
"age": 28
}
}
Create Relationship¶
POST /graphs/{graph_name}/relationships
Content-Type: application/json
{
"startNode": 123,
"type": "KNOWS",
"endNode": 456,
"properties": {
"since": "2023-01-15"
}
}
Authentication¶
# Basic Auth
curl -u username:password http://localhost:7474/graphs
# Token Auth
curl -H "Authorization: Bearer <token>" http://localhost:7474/graphs
Next Steps¶
- Learn about Bolt Protocol
- Explore Graph API
- Use the Python SDK