API pipeline: Draw boards, keep docs and sheets

Index: API pipelines — index

Goal: draw a board (a free canvas, or cards laid out on a canvas) and keep doc and sheet cards whose body you store yourself.

Boards, docs and sheets are cards with a title, text and a scene: the body as one string, saved with a revision number. Docs and sheets take the same calls as boards; paths below say boards, use docs or sheets for those.

Steps

1. Create.

POST /v0/my/boards
Idempotency-Key: board-2b7c…
{"title": "Shop floor plan", "kind": "flow", "content": "Where each service sits.",
 "language": "en", "project": "470000000000000001"}
→ {"nonce": "470000000000000060", "card_type": "board", "kind": "flow", "visibility": "Private", "scene_rev": 0, …}

2. Save the scene.

PUT /v0/my/boards/470000000000000060/scene
{"scene": "{\"nodes\":[{\"id\":\"n1\",\"type\":\"card\",\"position\":{\"x\":0,\"y\":0},\"data\":{\"card_type\":\"project\",\"nonce\":\"470000000000000001\"}}],\"edges\":[]}",
 "revision": 0}
→ {"scene_rev": 1}

3. Read. GET /v0/my/boards/{nonce|@handle} → the card with scene and scene_rev. Public: GET /v0/graph/boards, GET /v0/graph/boards/{nonce} (also /v0/graph/docs, /v0/graph/sheets). Yours: GET /v0/my/boards (scope, archived as for articles).

4. Edit, share, delete. PATCH /v0/my/boards/{nonce} (title, content, visibility, project, rubrics, …; same rules as articles); archive with POST /v0/my/archive; DELETE /v0/my/boards/{nonce}.

Behind

Rules (400)

API surface

Endpoint Purpose FE AI / oracle
POST /v0/my/boards Create a board yes yes
PUT /v0/my/boards/{nonce}/scene Save the canvas yes (autosave) yes
PATCH/DELETE /v0/my/boards/{nonce} Edit, delete yes yes
GET /v0/my/boards, GET /v0/graph/boards (+ /{nonce}) Yours, public yes yes
POST /v0/my/docs, POST /v0/my/sheets (+ /{nonce}, /{nonce}/scene) Docs and sheets API only yes
GET /v0/graph/docs, GET /v0/graph/sheets (+ /{nonce}) Public docs and sheets search only yes

Mentioned