REST API
All API routes require Authorization: Bearer <api-key>.
What this page covers
Section titled “What this page covers”Core endpoint groups for entities, search, tasks, sync, graph, and queue status.
Reference
Section titled “Reference”Entity endpoints
Section titled “Entity endpoints”POST /api/entitiesGET /api/entities/:idPATCH /api/entities/:idDELETE /api/entities/:idGET /api/entities
Search
Section titled “Search”POST /api/search
POST /api/tasksGET /api/tasksPATCH /api/tasks/:idPOST /api/tasks/:id/complete
Document sync
Section titled “Document sync”POST /api/sync/diffPOST /api/sync/uploadPOST /api/sync/finalizePOST /api/syncGET /api/sync/status/:repo
Knowledge graph
Section titled “Knowledge graph”POST /api/edgesDELETE /api/edges/:idGET /api/entities/:id/edgesGET /api/entities/:id/graph
Queue / enrichment
Section titled “Queue / enrichment”GET /api/queue(optional?include_failures=true)
REST returns full JSON payloads. Token-optimized compact formats are handled in MCP/CLI layers.
Create example:
curl -X POST http://127.0.0.1:3100/api/entities \ -H "Authorization: Bearer $PGM_API_KEY" \ -H "Content-Type: application/json" \ -d '{"type":"memory","content":"project context","tags":["notes"]}'