Docs
  • 0.57.0latest
  • 0.56.0
  • 0.55.0
  • 0.54.0
  • 0.53.0
  • 0.52.1
  • 0.52.0
  • 0.51.0
  • 0.48.0
  • 0.47.0
  • 0.46.0
  • 0.45.0
  • 0.44.0
  • 0.43.0
  • 0.42.0
  • 0.41.0
  • 0.40.0
  • 0.39.6
  • 0.39.5
  • 0.39.3
  • 0.39.2
  • 0.39.1
  • 0.39.0
  • 0.38.4
  • 0.38.2
  • 0.38.1
  • 0.37.1
  • 0.37.0
  • 0.36.2
  • 0.36.1
  • 0.36.0
  • 0.35.3
  • 0.35.2
  • 0.35.1
  • 0.35.0
  • 0.34.4
  • 0.34.3-beta
  • 0.34.2-beta
  • 0.34.1-beta
  • 0.34.0-beta
  • 0.33.4-beta
  • 0.33.3-beta
  • 0.33.2-beta
  • 0.33.1-beta
  • 0.33.0-beta
  • 0.32.0-beta

The app surface

A versioned REST surface under /v1 for applications that talk to the database directly — token auth, records, spaces, files with signed URLs, graphs, series and declared operations, with no backend of your own.

Since node 0.57.0. The app surface is a versioned REST API under /v1 on the node's HTTP port, built for the case where an application — a mobile app, a single-page site, a small service — works with the database directly, with no backend of its own in between. Records, spaces, files, graphs, series and declared operations are all reachable over plain HTTP with a token.

Every route runs the engine's own statements through your own session: the grants, the tenancy, the row guards and the refusals are exactly what a script run as that user would meet. No route carries permission logic of its own, so anything you can do over /v1 you could already do in TessariQL — the surface changes the transport, never the authority.

The shape of a route

/v1/{namespace}/{database}/{resource}/…

The first two segments select the tenancy the way USE NAMESPACE and USE DATABASE do, per request. Resource names — a table, a space, a bucket, a graph, a series, an operation — are names: letters, digits and underscores, never starting with a digit; anything else is a 400. Everything after them — record ids, keys, object paths, filter values, documents — is a value: bound as a parameter or percent-decoded from the path, never spliced into a statement. An injection has nowhere to land.

Every request and answer body is JSON, except an object's bytes, which travel raw. A first exchange, end to end:

# Sign in — the only routes that answer with no credential are the auth doors.
curl -X POST http://127.0.0.1:8000/v1/auth/signin \
  -H 'Content-Type: application/json' \
  -d '{"user": "owner", "password": "…"}'
# {"token":"…","refresh":"…","expires_in":43200}

# Create a record.
curl -X POST http://127.0.0.1:8000/v1/app/main/tables/orders/records \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"total": 10, "tenant": "a"}'
# {"record":{"id":"…","total":10,"tenant":"a"}}

# Ask a question.
curl -H "Authorization: Bearer $TOKEN" \
  'http://127.0.0.1:8000/v1/app/main/tables/orders/records?where=total:gte:5&order=total.desc&limit=10'
# {"records":[…]}

What lives here

  • Tokens, keys and the doors — signin, refresh rotation, API keys, and the signup and anonymous doors a database declares.
  • Records — CRUD and the list grammar: filters, full text, nearest-vector, geo radius, ordering and cursor paging.
  • Spaces and structures — keys with expiry and counters, and the list, hash, set and ranking operations.
  • Files and signed URLs — bucket bytes over HTTP and expiring URLs that serve one object with no credential.
  • Graphs, series and operations — traversals, series points, named operations, the live feed and the database describing itself.

The five clients wrap all of it — a bound app(namespace, database) handle with the same calls in Rust, Python, TypeScript, Go and Kotlin — see Choosing a client. The wire-level contract is §5.12 of the protocol specification.

Refusals

The status is the engine's own class, everywhere on the surface:

statusmeans
401no usable credential — sign in
403a credential that may not: cross-tenant, a secret key from a browser, a bad or expired signature
404a resource of the route's kind that is not there — a name of another kind answers the same 404, so existence never leaks across a tenancy
400a parameter, operator, name or body field outside its closed set — the message names it and the set
405a method the route does not take
409a conflict the engine classes as one — a taken name at signup
429the node holding its ceiling of sessions or signatures

A row-guard denial is the engine's own class — 400, with the guard named in the message. Signing in again never helps a 403; a 401 is the one worth retrying after a fresh signin.

Honest limits

  • Tokens, refresh tokens and signed URLs live in the node's memory: they die with the node, and with any change to the user record behind them. A restart signs everyone out; plan for a 401 and a re-signin.
  • The surface serves one node. Cluster redirects and follower reads are the wire protocol's story — see the clients.
  • Topics and queues stay on the language and the wire; the app surface deliberately does not expose them.