Skip to main content

HTTP endpoints and protocol operations

Every HTTP route the server serves, and every Protocol v1 operation that can be sent to POST /protocol/v1/execute (or carried by gRPC and Bolt). For request and response shapes with examples, see the HTTP API guide.

Routes​

MethodPathAuthPurposeSuccess
GET/healthnoneLiveness. Reports engine name, protocol version, and the enabled query languages.200 {"status":"ok",...}; 503 {"status":"maintenance"} in maintenance mode
GET/readynoneReadiness: store open, data directory writable, free disk above threshold, optional vector-index warmup.200 {"status":"ready","commitIndex":N,"dataDir":...}
GET/metricstoken or capability with readPrometheus text exposition (text/plain; version=0.0.4).200
POST/protocol/v1/executetoken or capability (read or write by operation)Execute one Protocol v1 request envelope.200 with a response envelope
GET/internal/replication/walboot token onlyNode-to-node: a follower fetches WAL records. Not a client API.200 {"records":[{"lsn":N,"command_b64":"..."}],"caught_up":bool}
POST/internal/replication/promoteboot token onlyStop following the leader and accept writes.200 {"promoted":true,"persisted":true}
POST/internal/backup/base?out=PATHboot token onlyOnline base backup into PATH on the server's filesystem.200 {"commitIndex":N,"files":N}
anyany other path——404 {"error":"route not found"}

Authentication headers​

HeaderValue
AuthorizationBearer <token>
X-RushDB-Token<token> (checked first; either header works)
X-RushDB-TenantTenant scope, required on /protocol/v1/execute in multitenant mode (at most 1024 bytes).

<token> is the boot token (--token) or a signed capability token when --capability-secret is configured. See Security.

/health​

curl -s http://127.0.0.1:3000/health
{"status":"ok","engine":"rushdb-lmpg","protocolVersion":1,"queryLanguages":["searchQuery","sql"]}

While the node is still opening its store, /health returns 200 with {"status":"starting","phase":"..."} (plain-HTTP listeners only).

/ready​

StatusBody status / reasonCause
200readyServing.
503starting, with the boot phaseThe node is still booting (starting, opening-storage, starting-engines).
503maintenance / maintenance modeMaintenance mode is on.
503not_ready / store is shutting downShutdown in progress.
503not_ready / durable publisher failed (+ error)The write path failed (for example the disk filled up mid-commit); restart required.
503not_ready / data directory is not writableA probe file could not be written to the data directory.
503not_ready / free disk below threshold (+ diskSpaceThresholdPercent)Free space below disk-space-threshold-percent.
503not_ready / vector indexes are still warming--require-index-warmup is on and a vector index is behind.

/internal/replication/wal​

Query parameters: follower_id (required) and since (first LSN wanted, default 1). Returns at most 2,000 records per call. Status 409 with {"error":{"code":"resync_required","oldestAvailableLsn":N}} means the leader no longer retains the requested history. See Replication.

/internal/replication/promote​

Waits up to 5 seconds for the follower task to stop, then removes the replica role from config.yml so a restart stays writable ("persisted"). Returns {"promoted":true,"already_writable":true} if the node was not following, or 503 if the follower did not stop in time.

/internal/backup/base​

Takes a physical base backup of the running server into out (which must not exist; 409 otherwise). The store files are copied while quiescent at a durable commit: reads continue and commits wait for the copy. The base is registered as a backup retention consumer at its commit index. See Backup and restore.

Request envelope​

{
"protocolVersion": 1,
"requestId": "optional-correlation-id",
"context": { "scope": "tenant-a", "deadlineMs": 5000 },
"operation": { "kind": "query", "query": { "kind": "record", "id": "..." } }
}
FieldNotes
protocolVersionMust be 1; anything else fails with unsupported_version.
requestIdOptional; echoed on the response.
context.scopeSingle-tenant: must be omitted. Multitenant: required and must equal the transport scope (the X-RushDB-Tenant header on HTTP).
context.deadlineMsOver HTTP and pgwire this is replaced by the server's --request-timeout-ms.

Successful responses carry protocolVersion, requestId, serverTimingMs and response (tagged by kind). Errors carry {"protocolVersion":1,"error":{"code":...,"message":...,"retryable":...}}; see Error codes.

Protocol v1 operations​

operation.kind selects the family; the nested object's kind selects the operation. The Metric route column is the route label value used in rushdb_requests_total and related metrics. Permission is the capability scope needed.

query (permission read)​

query.kindPurposeMetric route
statementRun a statement in an enabled language (sql, gql, cypher, gremlin, sqlPgq, mongo).query.statement
recordsNative search query document.query.records
cursorContinue a snapshot-pinned records cursor (cursorId, limit).query.cursor
recordFetch one record by id.query.record
relationshipsQuery relationships.query.relationships
propertyValuesDistinct values of a property (mode: values, count, range, topK).query.propertyValues
vectorVector similarity search.query.vector
joinPairsPairwise join of two record sets.query.joinPairs
vectorIndexCandidatesRecords not yet bound to a vector index (default limit 500).query.vectorIndexCandidates
textFull-text search against a declared text index (default limit 10).query.text
hybridGraph + vector + full-text query fused by reciprocal-rank fusion.query.hybrid

mutate (permission write)​

mutation.kindPurposeMetric route
statementWrite statement in an enabled language.mutate.statement
putRecordCreate, merge or replace one record (mode: create, merge, replace).mutate.putRecord
deleteRecordDelete a record by id.mutate.deleteRecord
retypeRecordChange a record's primary label.mutate.retypeRecord
deleteRecordsDelete every record matching a query.mutate.deleteRecords
deletePropertyRemove a property from the whole tenant.mutate.deleteProperty
linkRecords / unlinkRecordsLink or unlink records matched by label, key and predicate.mutate.linkRecords / mutate.unlinkRecords
retypeRelationsRename a relationship type between two labels.mutate.retypeRelations
linkRecordsById / unlinkRecordsByIdLink or unlink explicit record ids.mutate.linkRecordsById / mutate.unlinkRecordsById
linkRecordsPairsBatch-link explicit (source, target) pairs.mutate.linkRecordsPairs

describe (permission read)​

describe.kindPurposeMetric route
schemaLabels, properties and relationship shapes for a query.describe.schema
labelsLabels present on the records matching a query.describe.labels
propertiesProperties of the records matching a query (detail: full or catalog; skip, limit).describe.properties
queryLanguagesEnabled languages and their capability descriptors.describe.queryLanguages
capabilitiesFeature flags for client negotiation.describe.capabilities
buildInfoEngine build information.describe.buildInfo
explainQuery plan for a search query.describe.explain
explainVectorPlan for a vector query.describe.explainVector
indexesDeclared property and text indexes.describe.indexes
vectorIndexesVector indexes.describe.vectorIndexes
vectorIndexStatistics for one vector index (name).describe.vectorIndex

ingest (permission write)​

ingest.kindPurposeMetric route
documentsImport nested JSON documents as records and relationships.ingest.documents

index (permission write)​

index.kindPurposeMetric route
create / dropDeclare or drop an ordered (default) or text index on a label property.index.create / index.drop
createVector / dropVectorDeclare or drop a vector index.index.createVector / index.dropVector
upsertVectorsBind vectors to records in a vector index.index.upsertVectors
revalidateVectorRevalidate a vector index's bindings.index.revalidateVector

transaction (permission write)​

transaction.kindPurposeMetric route
beginStart a transaction (ttlMs, autocommit).transaction.begin
stageStage one mutation (createRecord, updateRecord, retypeRecord, deleteRecord, createRelationship, getRecord, statement).transaction.stage
commitCommit; returns status committed, aborted, expired or unknown, with retryable.transaction.commit
rollbackDiscard. Always allowed, even after the deadline or under memory pressure.transaction.rollback

Tenant and backup operations​

operation.kindPermissionPurposeMetric route
purgeTenantwriteDelete every key of the request's tenant.purgeTenant
backupreadLogical backup of the request's scope as JSONL inside the response (request.scopes; in multitenant mode only the caller's own scope).backup
policyoperator (boot token only; never a capability token)Read ({"kind":"get"}) or install ({"kind":"put","policy":{…},"enforced":true}) the request tenant's data-access policy.policy.get / policy.put

Operations refused by mode​

SituationRefused operationsError
Maintenance modeWrites (mutate, ingest, index, purgeTenant, policy put, transaction stage/commit)unavailable
Streaming-replication followermutate, ingest, index, purgeTenant, policy put, transaction stage/commitunavailable ("writes must go to the leader")
Free disk below thresholdEvery write operation, on every transportHTTP 503, code unavailable
Language not enabledstatement in that languagelanguage_disabled

Other transports​

The same envelopes travel over:

TransportEndpointAuthTenant scope
gRPCservice rushdb.v1.Database on --grpc-portmetadata authorization: Bearer <token> (boot token)metadata x-rushdb-tenant
Bolt--bolt-port (graph statements only)HELLO scheme: basic, credentials: <token>HELLO db field
PostgreSQL wire--pgwire-port (SQL only)password = boot token; user name ignoreddatabase connection parameter

Their request metrics use the routes transport.execute (gRPC and Bolt) and pgwire.execute.

See also​