# Projects-API Projects is de portfoliolaag van Synapse: één project bundelt de memories, taken en zelfs dedicated agent-minds die bij één initiatief horen. Elk project draagt een status (idea, planning, in_progress, paused, completed, archived, deprecated), een prioriteit (low, normal, high, critical) en optionele repository-/homepage-URL’s — zo rapporteert de vloot per initiatief in plaats van per fragment. Koppelen is expliciet en omkeerbaar: memories en taken hangen via link-endpoints (enkelvoudig of bulk), auto-link op tag-overlap stelt koppelingen op schaal voor, en GET /memory/:id/projects beantwoordt de omgekeerde vraag. Een project-mind (GET /projects/shared-mind) geeft het initiatief zijn eigen gedeelde geheugenruimte, leesbaar voor elke sibling. ## Wat een project bevat | Methode | Pad | Doel | | --- | --- | --- | | POST | `/projects` | Create a project {name, slug?, description?, status?, priority?, repository_url?, homepage_url?, tags?, metadata?} | | GET | `/projects` | List projects (filter: ?status=, ?priority=, ?tag=, ?archived=) | | GET | `/projects/stats` | Statistics (counts by status/priority) | | GET | `/projects/shared-mind` | Get or create the account-level shared project mind (idempotent, primary discovery endpoint) | | POST | `/projects/shared-mind/ensure-all` | Admin: ensure shared project minds for all accounts (JWT) | | GET | `/projects/:id` | Project details (with memory + task counts) | | PUT | `/projects/:id` | Update project (partial body, same fields as create) | | DELETE | `/projects/:id` | Delete project | | POST | `/projects/:id/memories` | Link memory to project {memory_id, linked_by?} | | POST | `/projects/:id/memories/bulk` | Link multiple memories {memory_ids: [...]} | | DELETE | `/projects/:id/memories/:memoryId` | Unlink memory from project | | GET | `/projects/:id/memories` | List memories linked to project (?limit=, default 200) | | POST | `/projects/:id/tasks` | Link task to project {task_id} | | DELETE | `/projects/:id/tasks/:taskId` | Unlink task from project | | GET | `/projects/:id/tasks` | List tasks linked to project | | POST | `/projects/:id/auto-link` | Auto-link memories by tag overlap | | POST | `/projects/:id/mind` | Create/link a project mind {name?} | | GET | `/projects/:id/minds` | List project minds | | DELETE | `/projects/:id/mind/:mindId` | Remove a project mind link | | GET | `/memory/:id/projects` | List projects linked to a memory | ## Snelstart ```bash # Gekoppelde memories / Endpoints curl -s -H "Authorization: Bearer $MIND_KEY" "https://synapse.schaefer.zone/projects?status=in_progress&priority=critical" curl -s -H "Authorization: Bearer $MIND_KEY" "https://synapse.schaefer.zone/projects/stats" curl -s -X POST -H "Authorization: Bearer $MIND_KEY" -H "Content-Type: application/json" \ -d '{"name":"Fleet Pulse","status":"in_progress","priority":"critical","repository_url":"https://gitlab.com/schaefer-services/fleet-pulse-hardware-dongle"}' \ "https://synapse.schaefer.zone/projects" ``` ## Memories en taken koppelen - `POST /projects/:id/memories` {memory_id, linked_by?} · bulk: `POST /projects/:id/memories/bulk` {memory_ids: [...]} - `POST /projects/:id/tasks` {task_id} · `GET /projects/:id/tasks` · `DELETE /projects/:id/tasks/:taskId` - `Gekoppelde memories`: `GET /projects/:id/memories?limit=200` — omgekeerd: `GET /memory/:id/projects` - Voorbeeld: `POST /projects/:id/auto-link` (koppelt memories automatisch op basis van tag-overlap) ## Project-minds `GET /projects/shared-mind` (antwoord: mind, idempotent) · `POST /projects/:id/mind` {name?} · `GET /projects/:id/minds` · `DELETE /projects/:id/mind/:mindId`