API pipeline: Browse Cabi.Chat and open any card

Index: API pipelines — index

Goal: browse Cabi.Chat without an account, open any card you may see (project, article, post, workspace…) together with the cards around it, and get its public link.

No token needed: anonymous calls return what is public to everyone. With a token the same calls also return what is visible to signed-in people and what was shared with you.

Steps

  1. Landing feed.
GET /v0/graph/public/landing?page=1
→ {"root": {"nonce": "…", "title": "IAB Taxonomies"},
   "rows": [{"rubric": {"nonce": "…", "title": "Education"},
             "items": [{"card_type": "project", "nonce": "470000000000000001", "title": "…", "snippet": "…", …}],
             "total": 4}, …],
   "page": 1, "total_pages": 2}

Rows are industries with their projects: up to 8 rows per page, 12 tiles per row; total = projects in the row. root=<rubric nonce> starts from another rubric.

  1. List one type. GET /v0/graph/{projects|articles|posts|workspaces|docs|sheets|boards|rubrics}?limit=20&offset=0 → {"projects": [tiles], "total": 42} (the key is the type, plural).

A tile: card_type, nonce, handle, title, snippet, visibility, publicity, project, rubrics, location, media, created_at, updated_at.

  1. Resolve a reference. GET /v0/graph/resolve/{nonce | @handle | handle} → {"card_type": "article", "nonce": "…", "handle": "…", "title": "…", "kind": null}. A renamed handle still resolves.

  2. Open the card. GET /v0/graph/{type}s/{nonce | @handle} for projects, articles, posts, workspaces, docs, sheets, boards, rubrics and telegram_groups; GET /v0/graph/oracles/{nonce}; GET /v0/graph/agendas/{nonce | @handle}.

GET /v0/graph/articles/470000000000000002
→ {"nonce": "470000000000000002", "card_type": "article", "canonical_lang": "en",
   "i18n": [{"lang": "en", "title": "…", "content": "…"}, {"lang": "ru", …}],
   "visibility": "Public", "publicity": "Everyone", "project": "470000000000000001",
   "rubrics": [{"nonce": "…", "title": "…"}], "location": {…},
   "mentioned": [{tile}, …], "tagged": [{tile}, …],
   "like_count": 0, "fav_count": 1, "writable": false, "created_at": "…", "updated_at": "…"}
  1. Public link. https://cabi.chat/@<handle> when the card has a handle, else https://cabi.chat/<card_type>/<nonce>, e.g. https://cabi.chat/article/470000000000000002.

Behind

Rules

API surface

Endpoint Purpose FE AI / oracle
GET /v0/graph/public/landing Landing rows by industry yes yes, to sample the graph
GET /v0/graph/{type}s Visible cards of one type yes yes
GET /v0/graph/resolve/{ident} Card type and nonce for a handle or nonce yes yes
GET /v0/graph/{type}s/{ident} Card page with the cards around it yes yes
GET /v0/graph/oracles/{nonce}, /v0/graph/agendas/{ident} Oracle and agenda pages yes yes

Mentioned