API pipeline: Collect cards in workspaces

Index: API pipelines — index

Goal: collect cards of any type in workspaces: create one, add, remove and reorder cards, find which of your workspaces hold a card.

Steps

  1. Create.
POST /v0/my/workspaces
Idempotency-Key: ws-trip-1
{"title": "Trip ideas", "language": "en"}
→ {"nonce": "470000000000000051", "card_type": "workspace", "visibility": "Private", …}

Optional: content, handle, visibility + permissions + publicity, rubrics, location, workspaces (place it inside other workspaces you can write). Without them it starts Private.

  1. Add a card.
POST /v0/my/workspaces/470000000000000051/470000000000000001
{}
→ 204

The card must be one you can read; it goes to the end, or to position {"seqnum": 0}. Adding the same card again changes nothing.

  1. Reorder: PATCH /v0/my/workspaces/{ws}/{card} {"seqnum": 2} → 204.

  2. Remove: DELETE /v0/my/workspaces/{ws}/{card} → 204.

  3. Read it.

GET /v0/graph/workspaces/470000000000000051?contained_limit=50&contained_offset=0
→ {"nonce": "…", "i18n": […], "contained": [{tile}, …], "contained_next_offset": 50, …}

Page with contained_next_offset until it is absent (contained_limit 1–200). GET /v0/my/workspaces/{nonce} returns the same for your own workspaces.

  1. Find workspaces: GET /v0/my/workspaces?q=trip&limit=20 (title match); containing=<card nonce>[,<nonce>…] puts your workspaces that already hold those cards first; scope=owned|granted|all.

  2. Edit or delete the workspace: PATCH /v0/my/workspaces/{nonce} (title, content, handle, visibility…), DELETE /v0/my/workspaces/{nonce}. Deleting a workspace does not delete the cards in it.

Behind

Rules

API surface

Endpoint Purpose FE AI / oracle
POST /v0/my/workspaces Create yes yes
GET /v0/my/workspaces Your workspaces (q, containing, scope) yes yes
GET /v0/graph/workspaces/{nonce} Read with contents, paged yes yes
PATCH / DELETE /v0/my/workspaces/{nonce} Edit / delete yes yes
POST / PATCH / DELETE /v0/my/workspaces/{nonce}/{card} Add / reorder / remove a card yes yes

Mentioned