Local HTTP

HTTP endpoints for the local viewer.

serve.py exposes Link locally while the web viewer is running. It is a loopback-only API for personal tooling, not a hosted service.

Boundary

serve.py binds to 127.0.0.1, rejects unsafe host/bind flags and unexpected Host headers, and has no authentication. Do not expose it to the internet without adding auth.

Write actions require X-Link-Local-Action: true. Responses include X-Link-API-Version.

Read Endpoints

GET /api/status?validate=true
GET /api/prompts?project=slug
GET /api/ingest-status
GET /api/page-list?limit=100&offset=0
GET /api/pages
GET /api/memory-dashboard?project=slug
GET /api/memory-brief?q=task&project=slug
GET /api/memory-audit?project=slug
GET /api/memory-profile?project=slug
GET /api/memory-inbox?project=slug
GET /api/capture-inbox?project=slug
GET /api/explain-memory?memory=name
GET /api/query-link?q=query&budget=small|medium|large
GET /api/validate?strict=true
GET /api/proposal-sources
GET /api/proposal-source?path=raw/file.md
GET /api/search?q=query
GET /api/context?topic=topic
GET /api/graph-summary?topic=topic&limit=40&depth=1
GET /api/graph
GET /api/page-links?page=name&limit=100&offset=0

Write Endpoints

POST /api/raw-source
POST /api/propose-memories
POST /api/remember-memory
POST /api/update-memory
POST /api/review-memory
POST /api/archive-memory
POST /api/restore-memory
POST /api/rebuild-backlinks
POST /api/rebuild-index

Web memory approval APIs intentionally do not honor duplicate/conflict override flags. If Link reports a duplicate or conflict, review the existing memory and use the CLI or MCP tool explicitly after deciding what should coexist.

Large Wiki Endpoints

Agents and integrations should prefer bounded endpoints over full dumps:

  • /api/query-link for answer-ready context.
  • /api/page-list instead of /api/pages when paging matters.
  • /api/graph-summary instead of /api/graph for agent context.
  • /api/page-links for paginated inbound and forward links.