HTTP API

Loopback REST and SSE endpoints used by the UI, CLI, and agents.

All endpoints are on the session base URL from diffing url (loopback). Authenticate with session cookie (browser) or x-diffing-token (CLI/MCP) on loopback binds.

Handoff

MethodPathRole
POST/api/review/sendHuman releases waiters; increments round
GET/api/review/awaitLong-poll (sinceRound, timeoutMs ≤ 50000)
GET/api/review/statusRound / waiters snapshot
GET/api/review/historyMulti-round history

send body

{ "generalComment": "Optional markdown summary" }

await response (released)

{
  "status": "released",
  "round": 4,
  "payload": {
    "commentXml": "<code-review-comments>…</code-review-comments>",
    "openCount": 2,
    "comments": []
  }
}

Comments

MethodPathRole
GET/api/commentsList threads
POST/api/commentsCreate (filePath, side, lineNumber, body, optional startLineNumber, severity)
PUT/api/comments/:idEdit body or { status }
DELETE/api/comments/:idDelete
POST/api/comments/resolve-allResolve all open
POST/api/comments/:id/repliesReply
PUT/api/comments/:id/replies/:replyIdEdit reply
DELETE/api/comments/:id/replies/:replyIdDelete reply
POST/api/comments/:id/apply-suggestionApply suggestion fence

Agent progress

MethodPath
POST/api/agent/progress
GET/api/agent/progress
{ "message": "Working…", "model": "…", "pct": 40 }

Live SSE

GET /api/live — events: heartbeat, change, comments, plans, agent-status, plan-review-status.

POST /api/search{ scope, query, limit, regex, changedPaths? }
POST /api/search/track — frecency update

Attachments

POST /api/attachments (multipart) · GET /api/attachments/:filename
Stored under per-repo attachments/.

Plans

Plan CRUD and comments live under /api/plans… (list, get, versions, submit, comments, review status). Prefer CLI/MCP for agents; use HTTP when embedding or debugging.

Other

PathRole
POST /api/open-fileLaunch editor (vscode/zed/vim/neovim/default)
Git/IDE helpersDiff options, settings persistence, etc.

Deep endpoint catalog remains in repository docs/cli.md §11 for rare routes.