OriginChain docs
examples · copy-paste json

Query examples.

Copy-paste JSON for every common query against OriginChain. Each example is the full request body plus the full response shape — no chrome, no abridged snippets. Pick a shape and the example you need.

  1. Get your bearer from /app/keys.
  2. Get your engine endpoint from /app/instances.
  3. Pick an example below and paste the curl body into your terminal.
SQL examples
19 examples
SELECT · INSERT · DELETE · JOIN · GROUP BY · HAVING

Nineteen JSON requests covering predicates, joins, aggregates, multi-row inserts, and bound parameters. Every example pairs the curl body with the row JSON the engine returns.

Vector examples
12 examples
put · topk · filter · cosine · dot · L2 · fast · high_recall

Twelve copy-paste calls for HNSW. Default high_recall hits recall@10 = 0.96 at 100k vectors with p99 109 ms; fast mode runs p99 37 ms at recall 0.69.

Full-text examples
10 examples
boolean · phrase · BM25 · 18-language stemming

Ten BM25 examples — boolean AND/OR/NOT, phrase match, ranked retrieval, and per-language Snowball stemming with the full supported language list.

Graph examples
12 examples
neighbors · reverse · bfs · path · dijkstra

Twelve graph traversals on direction-tagged relation keys. Forward and reverse adjacency, depth-bounded BFS, existence checks, weighted shortest path.

Natural language examples
8 examples
POST /v1/ask · plan-cached · returns SQL + rows

Eight English-to-SQL calls. Each response carries the compiled plan and the executed SQL, so the planner is never a black box. Repeat questions hit the plan cache at p99 < 50 ms.

Atomic multi-shape writes
5 recipes
row + vector + FTS + relation in one WAL frame

Five recipes that write a row, its embedding, its full-text document, and its graph edges in a single atomic request. One fsync, one write path, one bearer.

Errors
19 examples
400 · 401 · 402 · 403 · 404 · 409 · 413 · 422 · 429 · 500 · 502

Nineteen error responses with the request that triggers each one. Canonical error body shape, including addon-required, rate-limit Retry-After, and OCC write-write conflict.