Skip to content

HTTP REST API

QilbeeDB provides a JSON-based HTTP REST API for all database operations.

Base URL

http://localhost:7474

Health Check

GET /health

Response:

{
  "status": "healthy",
  "version": "0.1.0"
}

List Graphs

GET /graphs

Response:

{
  "graphs": ["social_network", "knowledge_base"]
}

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