Document Store
Built-in NoSQL document store with collections, composite keys, TTL, secondary indexes, and bidirectional graph-document sync. Collections are organized into schemas: public (default) and auth (system).
REST API
| Method | Endpoint | Description |
|---|---|---|
| POST | /docs/{collection} | Create collection |
| DELETE | /docs/{collection} | Drop collection |
| GET | /docs/{collection}/{id} | Get document |
| PUT | /docs/{collection}/{id} | Upsert document |
| DELETE | /docs/{collection}/{id} | Delete document |
| POST | /docs/{collection}/query | Query with filters |
| POST | /docs/{collection}/batch | Batch operations |
| GET | /docs/{collection}/scan | Paginated scan |
Create & Query Documents
# Create a collection
curl -X POST http://localhost:7474/docs/orders \
-H "Authorization: Bearer $TOKEN" \
-d '{"composite_keys": false}'
# Insert a document
curl -X PUT http://localhost:7474/docs/orders/order-1 \
-H "Authorization: Bearer $TOKEN" \
-d '{"body": {"item": "Widget", "qty": 10, "status": "pending"}}'
# Query with filters
curl -X POST http://localhost:7474/docs/orders/query \
-H "Authorization: Bearer $TOKEN" \
-d '{"filter": {"op": "eq", "field": "status", "value": "pending"}}'Cypher Integration
CREATE DOCUMENT IN orders order1 {item: "Widget", qty: 10}
MATCH DOCUMENT d IN orders WHERE d.status = "pending" RETURN d.itemFilter Operators
| Operator | Description |
|---|---|
| eq / neq | Equal / not equal |
| lt / gt | Less than / greater than |
| between | Range (inclusive) |
| begins_with | String prefix |
| contains | String or list contains |
| in | Value in array |
| exists | Field exists |
| and / or | Logical combinators |
Collection Management (Cypher)
-- Create a collection CREATE COLLECTION orders -- Create only if it doesn't already exist CREATE COLLECTION IF NOT EXISTS orders -- Drop a collection DROP COLLECTION orders
System collections (auth.*) cannot be dropped.