HTTP API
One JSON-over-HTTP surface: run Cypher, manage graphs and schema, stream large results, and, on your own server, watch it with Prometheus and OpenTelemetry. Everything the SDKs and MCP server do, they do over this.
Cypher over HTTP
Post a query and parameters; add a time field to rewind the read. Every request carries a bearer key.
The body is { "query": "…", "parameters": { … } }, with an optional atValid or atRecorded. A write may carry conditions and an idempotency key. A query over the 2 MiB body limit is refused with a clear error rather than truncated.
Idempotency keys and conditions
A write can carry an Idempotency-Key header; a resend with the same key after a lost answer writes nothing more, and GET /graphs/{name}/idempotency-keys/{key} reports what the first attempt did. A write can also carry conditions, checked under the graph’s write lock just before commit; if one fails the answer is 409 CONDITION_FAILED and nothing is written. Conditions are off by default on a self-hosted server, and on for the hosted service.
Registry and declarations
Cursors for large reads
Stream a big result set instead of materializing it server-side. Cursors are read-only.
Beyond query and schema
Each of these is a route group in the feature reference. Several are off by default on a self-hosted server and on for the hosted service.
- Multi-statement transactions —
POST /graphs/{name}/tx,/tx/{id}/cypher,/tx/{id}/commit; serializable, constraints checked at commit. Off by default; on for the hosted service. - Change feed —
GET /graphs/{name}/changes?after=<position>, one event per commit. Off by default; on for the hosted service, except for credentials an access policy restricts. Server-held cursors (/changes/cursors/*) are off by default. - Leases —
/graphs/{name}/leases/*. Off by default; on for the hosted service. - Search —
POST /graphs/{name}/search/fulltextand/search/vector. - Bulk load —
POST /graphs/{name}/bulk(NDJSON; one batch is one commit). Off by default. - History checks —
GET /graphs/{name}/audit/verifyand/graphs/{name}/provenance/verify. - Cancel a running statement —
POST /cancel/{id}; list them withGET /admin/queries.
One error envelope, with a retry answer
Each error has a code, usually a subcode, and a retry field (retryable, terminal or ambiguous): decide on retry, and branch on code and subcode. Unknown body fields are refused rather than ignored. A graph still opening after a restart answers 503 GRAPH_OPENING with Retry-After; a statement that cannot get the query memory it needs within its wait is stopped with 503 QUERY_MEMORY_BUDGET (Retry-After), and nothing of it is written.
Operations
GET /healthz— liveness;GET /metrics— Prometheus metrics for the server operator (scrape token).POST /graphs/{name}/explainreturns the plan with row estimates, without running it;/graphs/{name}/explain-analyze(orEXPLAIN ANALYZE) adds timing and row counts.GET /openapi.yamland a rendered Swagger UI at/docs; OpenTelemetry traces over OTLP when the operator sets an endpoint (self-hosted).- Per-key rate limits, per-query timeouts, a slow-query log, and memory-aware admission: statements wait for query memory and are stopped with nothing written if it doesn’t come; under memory pressure the server stops the statement holding the most memory.
- Operator routes for compaction, warm-up, backup and restore — and the audit, provenance and compliance verify/export endpoints.
Data calls carry a credential
Pass a credential on every data call: Authorization: Bearer gq_…. Health, docs and the OpenAPI spec are open. The full set of modes — static tokens, runtime API keys, JWT, HMAC, capability tokens and tenancy isolation — is on the auth page.