Protokoll #24254

ID24254
Zeitstempel2025-12-27 16:03:51.363094
Clientroot
IP145.224.72.140
Modellclaude-sonnet-4-20250514
Statuscompleted
Tokens4,670 (Input: 2,201, Output: 2,469)
Dauer400 ms
Request-Zeit2025-12-27 16:03:51.363094
Response-Zeit2025-12-27 16:03:51.763409

Request

{
    "event": "PreToolUse",
    "tool_name": "mcp__mcp-docs__docs_create",
    "tool_input": {
        "title": "Docs API",
        "slug": "docs",
        "parent_id": 51,
        "description": "REST-API für Dokumentations-Management mit CRUD, Suche und RAG-Chat",
        "status": "published",
        "content": "<![CDATA[<nav class=\"breadcrumb\">\n    <a href=\"\/docs\">Dokumentation<\/a> &raquo; <a href=\"\/docs\/api\">API<\/a> &raquo; Docs API\n<\/nav>\n\n<h1>Docs API<\/h1>\n<p class=\"doc-meta\"><strong>Erstellt:<\/strong> 2025-12-27 | <strong>Aktualisiert:<\/strong> 2025-12-27<\/p>\n\n<p>REST-API für Dokumentations-Management mit CRUD-Operationen, semantischer Suche und RAG-Chat.<\/p>\n\n<table>\n    <tr><th>Controller<\/th><td>Controller\\Api\\DocsController<\/td><\/tr>\n    <tr><th>Base-URL<\/th><td>\/api\/v1\/docs<\/td><\/tr>\n    <tr><th>Datenbank<\/th><td>ki_dev.dokumentation<\/td><\/tr>\n    <tr><th>Format<\/th><td>JSON<\/td><\/tr>\n<\/table>\n\n<h2>Endpoints-Übersicht<\/h2>\n<table>\n    <tr><th>Methode<\/th><th>Pfad<\/th><th>Beschreibung<\/th><\/tr>\n    <tr><td>GET<\/td><td>\/api\/v1\/docs<\/td><td>Liste aller Dokumente<\/td><\/tr>\n    <tr><td>GET<\/td><td>\/api\/v1\/docs\/{id}<\/td><td>Dokument nach ID<\/td><\/tr>\n    <tr><td>GET<\/td><td>\/api\/v1\/docs\/path\/{path}<\/td><td>Dokument nach Pfad<\/td><\/tr>\n    <tr><td>GET<\/td><td>\/api\/v1\/docs\/search<\/td><td>Semantische Suche<\/td><\/tr>\n    <tr><td>GET<\/td><td>\/api\/v1\/docs\/hierarchy<\/td><td>Dokumentationsbaum<\/td><\/tr>\n    <tr><td>POST<\/td><td>\/api\/v1\/docs<\/td><td>Dokument erstellen<\/td><\/tr>\n    <tr><td>PUT<\/td><td>\/api\/v1\/docs\/{id}<\/td><td>Dokument aktualisieren<\/td><\/tr>\n    <tr><td>DELETE<\/td><td>\/api\/v1\/docs\/{id}<\/td><td>Dokument löschen<\/td><\/tr>\n    <tr><td>POST<\/td><td>\/api\/v1\/docs\/chat<\/td><td>RAG-Chat mit Dokumentation<\/td><\/tr>\n<\/table>\n\n<h2>Dokumente auflisten<\/h2>\n<pre><code>GET \/api\/v1\/docs?status=published&parent_id=51&search=apache&limit=50&offset=0<\/code><\/pre>\n\n<table>\n    <tr><th>Parameter<\/th><th>Typ<\/th><th>Default<\/th><th>Beschreibung<\/th><\/tr>\n    <tr><td>status<\/td><td>string<\/td><td>-<\/td><td>published, draft<\/td><\/tr>\n    <tr><td>parent_id<\/td><td>int<\/td><td>-<\/td><td>Filter nach Parent-Dokument<\/td><\/tr>\n    <tr><td>search<\/td><td>string<\/td><td>-<\/td><td>Volltextsuche in Titel\/Content<\/td><\/tr>\n    <tr><td>limit<\/td><td>int<\/td><td>50<\/td><td>Max. Ergebnisse (max 100)<\/td><\/tr>\n    <tr><td>offset<\/td><td>int<\/td><td>0<\/td><td>Pagination-Offset<\/td><\/tr>\n<\/table>\n\n<h3>Response<\/h3>\n<pre><code>{\n  \"success\": true,\n  \"data\": [\n    {\n      \"id\": 1,\n      \"parent_id\": null,\n      \"slug\": \"server\",\n      \"path\": \"\/server\",\n      \"title\": \"Server\",\n      \"description\": \"Server-Dokumentation\",\n      \"status\": \"published\",\n      \"depth\": 0,\n      \"created_at\": \"2025-12-20T10:00:00\",\n      \"updated_at\": \"2025-12-27T12:00:00\"\n    }\n  ],\n  \"meta\": {\n    \"total\": 100,\n    \"limit\": 50,\n    \"offset\": 0\n  }\n}<\/code><\/pre>\n\n<h2>Dokument nach ID<\/h2>\n<pre><code>GET \/api\/v1\/docs\/{id}?include_children=1&include_breadcrumb=1<\/code><\/pre>\n\n<table>\n    <tr><th>Parameter<\/th><th>Typ<\/th><th>Beschreibung<\/th><\/tr>\n    <tr><td>include_children<\/td><td>0|1<\/td><td>Kind-Dokumente einschließen<\/td><\/tr>\n    <tr><td>include_breadcrumb<\/td><td>0|1<\/td><td>Breadcrumb-Pfad einschließen<\/td><\/tr>\n<\/table>\n\n<h3>Response<\/h3>\n<pre><code>{\n  \"success\": true,\n  \"data\": {\n    \"id\": 51,\n    \"title\": \"API\",\n    \"path\": \"\/api\",\n    \"content\": \"...\",\n    ...\n  },\n  \"children\": [...],\n  \"breadcrumb\": [\n    {\"id\": 51, \"title\": \"API\", \"path\": \"\/api\"}\n  ]\n}<\/code><\/pre>\n\n<h2>Dokument nach Pfad<\/h2>\n<pre><code>GET \/api\/v1\/docs\/path\/api\/chat<\/code><\/pre>\n<p>Liefert Dokument mit Pfad <code>\/api\/chat<\/code>.<\/p>\n\n<h2>Semantische Suche<\/h2>\n<pre><code>GET \/api\/v1\/docs\/search?q=Apache+SSL&limit=5&category=Betrieb<\/code><\/pre>\n\n<table>\n    <tr><th>Parameter<\/th><th>Typ<\/th><th>Default<\/th><th>Beschreibung<\/th><\/tr>\n    <tr><td>q<\/td><td>string<\/td><td>required<\/td><td>Suchanfrage<\/td><\/tr>\n    <tr><td>limit<\/td><td>int<\/td><td>5<\/td><td>Max. Ergebnisse<\/td><\/tr>\n    <tr><td>category<\/td><td>string<\/td><td>-<\/td><td>Taxonomie-Kategorie-Filter<\/td><\/tr>\n<\/table>\n\n<h3>Response<\/h3>\n<pre><code>{\n  \"success\": true,\n  \"data\": [\n    {\n      \"chunk_id\": 42,\n      \"content\": \"Apache SSL Konfiguration...\",\n      \"score\": 0.92,\n      \"dokument_title\": \"Apache\",\n      \"path\": \"\/server\/apache\"\n    }\n  ],\n  \"meta\": {\n    \"query\": \"Apache SSL\",\n    \"limit\": 5,\n    \"count\": 3\n  }\n}<\/code><\/pre>\n\n<h2>Dokumentationsbaum<\/h2>\n<pre><code>GET \/api\/v1\/docs\/hierarchy<\/code><\/pre>\n<p>Liefert vollständigen Dokumentationsbaum als verschachtelte Struktur.<\/p>\n\n<h3>Response<\/h3>\n<pre><code>{\n  \"success\": true,\n  \"data\": [\n    {\n      \"id\": 1,\n      \"title\": \"Server\",\n      \"path\": \"\/server\",\n      \"children\": [\n        {\"id\": 2, \"title\": \"SSH\", \"path\": \"\/server\/ssh\", \"children\": []},\n        {\"id\": 3, \"title\": \"UFW\", \"path\": \"\/server\/ufw\", \"children\": []}\n      ]\n    }\n  ]\n}<\/code><\/pre>\n\n<h2>Dokument erstellen<\/h2>\n<pre><code>POST \/api\/v1\/docs\nContent-Type: application\/json\n\n{\n  \"title\": \"Neues Dokument\",\n  \"slug\": \"neues-dokument\",\n  \"content\": \"<h1>Inhalt<\/h1><p>Text...<\/p>\",\n  \"description\": \"Beschreibung\",\n  \"parent_id\": 51,\n  \"status\": \"draft\",\n  \"sort_order\": 10\n}<\/code><\/pre>\n\n<table>\n    <tr><th>Feld<\/th><th>Typ<\/th><th>Pflicht<\/th><th>Beschreibung<\/th><\/tr>\n    <tr><td>title<\/td><td>string<\/td><td>Ja<\/td><td>Dokumenttitel<\/td><\/tr>\n    <tr><td>slug<\/td><td>string<\/td><td>Ja<\/td><td>URL-Slug (eindeutig pro Parent)<\/td><\/tr>\n    <tr><td>content<\/td><td>string<\/td><td>Nein<\/td><td>HTML-Inhalt<\/td><\/tr>\n    <tr><td>description<\/td><td>string<\/td><td>Nein<\/td><td>Kurzbeschreibung<\/td><\/tr>\n    <tr><td>parent_id<\/td><td>int<\/td><td>Nein<\/td><td>Parent-Dokument-ID<\/td><\/tr>\n    <tr><td>status<\/td><td>string<\/td><td>Nein<\/td><td>draft (default) oder published<\/td><\/tr>\n    <tr><td>sort_order<\/td><td>int<\/td><td>Nein<\/td><td>Sortierreihenfolge<\/td><\/tr>\n<\/table>\n\n<h3>Response (201 Created)<\/h3>\n<pre><code>{\n  \"success\": true,\n  \"data\": {...},\n  \"message\": \"Dokument erstellt\"\n}<\/code><\/pre>\n\n<h2>Dokument aktualisieren<\/h2>\n<pre><code>PUT \/api\/v1\/docs\/{id}\nContent-Type: application\/json\n\n{\n  \"title\": \"Aktualisierter Titel\",\n  \"content\": \"<h1>Neuer Inhalt<\/h1>\",\n  \"description\": \"Neue Beschreibung\",\n  \"status\": \"published\"\n}<\/code><\/pre>\n<p>Alle Felder sind optional - nur übergebene Felder werden aktualisiert.<\/p>\n\n<h2>Dokument löschen<\/h2>\n<pre><code>DELETE \/api\/v1\/docs\/{id}<\/code><\/pre>\n<p><strong>Wichtig:<\/strong> Dokumente mit Unterdokumenten können nicht gelöscht werden. Lösche zuerst alle Kind-Dokumente.<\/p>\n\n<h3>Fehler-Response<\/h3>\n<pre><code>{\n  \"success\": false,\n  \"error\": \"Dokument hat Unterdokumente. Lösche diese zuerst.\"\n}<\/code><\/pre>\n\n<h2>RAG-Chat<\/h2>\n<pre><code>POST \/api\/v1\/docs\/chat\nContent-Type: application\/json\n\n{\n  \"question\": \"Wie konfiguriere ich Apache SSL?\",\n  \"model\": \"mistral\",\n  \"limit\": 5\n}<\/code><\/pre>\n\n<table>\n    <tr><th>Parameter<\/th><th>Typ<\/th><th>Default<\/th><th>Beschreibung<\/th><\/tr>\n    <tr><td>question<\/td><td>string<\/td><td>required<\/td><td>Benutzer-Frage<\/td><\/tr>\n    <tr><td>model<\/td><td>string<\/td><td>mistral<\/td><td>LLM-Modell (Ollama)<\/td><\/tr>\n    <tr><td>limit<\/td><td>int<\/td><td>5<\/td><td>Max. Kontext-Chunks<\/td><\/tr>\n<\/table>\n\n<h3>Response<\/h3>\n<pre><code>{\n  \"success\": true,\n  \"data\": {\n    \"answer\": \"Um Apache SSL zu konfigurieren...\",\n    \"sources\": [\n      {\"title\": \"Apache\", \"path\": \"\/server\/apache\", \"score\": 0.89}\n    ],\n    \"model\": \"mistral\",\n    \"tokens\": {\"input\": 1200, \"output\": 350}\n  }\n}<\/code><\/pre>\n\n<h2>Fehlerbehandlung<\/h2>\n<table>\n    <tr><th>HTTP Code<\/th><th>Bedeutung<\/th><\/tr>\n    <tr><td>400<\/td><td>Fehlende oder ungültige Parameter<\/td><\/tr>\n    <tr><td>404<\/td><td>Dokument nicht gefunden<\/td><\/tr>\n    <tr><td>500<\/td><td>Server-Fehler<\/td><\/tr>\n<\/table>\n\n<h2>Services<\/h2>\n<table>\n    <tr><th>Service<\/th><th>Beschreibung<\/th><\/tr>\n    <tr><td>DokumentationRepository<\/td><td>CRUD-Operationen für Dokumente<\/td><\/tr>\n    <tr><td>ChunkSearchService<\/td><td>Semantische Suche über Chunks<\/td><\/tr>\n    <tr><td>DocumentationChatUseCase<\/td><td>RAG-Chat mit Dokumentation<\/td><\/tr>\n<\/table>\n\n<h2>Verwandte Dokumentation<\/h2>\n<ul>\n    <li><a href=\"\/docs\/mcp\/mcp-docs\">MCP-Docs Server<\/a><\/li>\n    <li><a href=\"\/docs\/api\/explorer\">Explorer API<\/a><\/li>\n    <li><a href=\"\/docs\/api\/chat\">Chat API<\/a><\/li>\n<\/ul>]]>"
    }
}

Response

{
    "tool_response": [
        {
            "type": "text",
            "text": "{\n  \"success\": true,\n  \"doc\": {\n    \"id\": 152,\n    \"parent_id\": 51,\n    \"slug\": \"docs\",\n    \"path\": \"\/api\/docs\",\n    \"title\": \"Docs API\",\n    \"description\": \"REST-API für Dokumentations-Management mit CRUD, Suche und RAG-Chat\",\n    \"content\": \"<![CDATA[<nav class=\\\"breadcrumb\\\">\\n    <a href=\\\"\/docs\\\">Dokumentation<\/a> &raquo; <a href=\\\"\/docs\/api\\\">API<\/a> &raquo; Docs API\\n<\/nav>\\n\\n<h1>Docs API<\/h1>\\n<p class=\\\"doc-meta\\\"><strong>Erstellt:<\/strong> 2025-12-27 | <strong>Aktualisiert:<\/strong> 2025-12-27<\/p>\\n\\n<p>REST-API für Dokumentations-Management mit CRUD-Operationen, semantischer Suche und RAG-Chat.<\/p>\\n\\n<table>\\n    <tr><th>Controller<\/th><td>Controller\\\\Api\\\\DocsController<\/td><\/tr>\\n    <tr><th>Base-URL<\/th><td>\/api\/v1\/docs<\/td><\/tr>\\n    <tr><th>Datenbank<\/th><td>ki_dev.dokumentation<\/td><\/tr>\\n    <tr><th>Format<\/th><td>JSON<\/td><\/tr>\\n<\/table>\\n\\n<h2>Endpoints-Übersicht<\/h2>\\n<table>\\n    <tr><th>Methode<\/th><th>Pfad<\/th><th>Beschreibung<\/th><\/tr>\\n    <tr><td>GET<\/td><td>\/api\/v1\/docs<\/td><td>Liste aller Dokumente<\/td><\/tr>\\n    <tr><td>GET<\/td><td>\/api\/v1\/docs\/{id}<\/td><td>Dokument nach ID<\/td><\/tr>\\n    <tr><td>GET<\/td><td>\/api\/v1\/docs\/path\/{path}<\/td><td>Dokument nach Pfad<\/td><\/tr>\\n    <tr><td>GET<\/td><td>\/api\/v1\/docs\/search<\/td><td>Semantische Suche<\/td><\/tr>\\n    <tr><td>GET<\/td><td>\/api\/v1\/docs\/hierarchy<\/td><td>Dokumentationsbaum<\/td><\/tr>\\n    <tr><td>POST<\/td><td>\/api\/v1\/docs<\/td><td>Dokument erstellen<\/td><\/tr>\\n    <tr><td>PUT<\/td><td>\/api\/v1\/docs\/{id}<\/td><td>Dokument aktualisieren<\/td><\/tr>\\n    <tr><td>DELETE<\/td><td>\/api\/v1\/docs\/{id}<\/td><td>Dokument löschen<\/td><\/tr>\\n    <tr><td>POST<\/td><td>\/api\/v1\/docs\/chat<\/td><td>RAG-Chat mit Dokumentation<\/td><\/tr>\\n<\/table>\\n\\n<h2>Dokumente auflisten<\/h2>\\n<pre><code>GET \/api\/v1\/docs?status=published&parent_id=51&search=apache&limit=50&offset=0<\/code><\/pre>\\n\\n<table>\\n    <tr><th>Parameter<\/th><th>Typ<\/th><th>Default<\/th><th>Beschreibung<\/th><\/tr>\\n    <tr><td>status<\/td><td>string<\/td><td>-<\/td><td>published, draft<\/td><\/tr>\\n    <tr><td>parent_id<\/td><td>int<\/td><td>-<\/td><td>Filter nach Parent-Dokument<\/td><\/tr>\\n    <tr><td>search<\/td><td>string<\/td><td>-<\/td><td>Volltextsuche in Titel\/Content<\/td><\/tr>\\n    <tr><td>limit<\/td><td>int<\/td><td>50<\/td><td>Max. Ergebnisse (max 100)<\/td><\/tr>\\n    <tr><td>offset<\/td><td>int<\/td><td>0<\/td><td>Pagination-Offset<\/td><\/tr>\\n<\/table>\\n\\n<h3>Response<\/h3>\\n<pre><code>{\\n  \\\"success\\\": true,\\n  \\\"data\\\": [\\n    {\\n      \\\"id\\\": 1,\\n      \\\"parent_id\\\": null,\\n      \\\"slug\\\": \\\"server\\\",\\n      \\\"path\\\": \\\"\/server\\\",\\n      \\\"title\\\": \\\"Server\\\",\\n      \\\"description\\\": \\\"Server-Dokumentation\\\",\\n      \\\"status\\\": \\\"published\\\",\\n      \\\"depth\\\": 0,\\n      \\\"created_at\\\": \\\"2025-12-20T10:00:00\\\",\\n      \\\"updated_at\\\": \\\"2025-12-27T12:00:00\\\"\\n    }\\n  ],\\n  \\\"meta\\\": {\\n    \\\"total\\\": 100,\\n    \\\"limit\\\": 50,\\n    \\\"offset\\\": 0\\n  }\\n}<\/code><\/pre>\\n\\n<h2>Dokument nach ID<\/h2>\\n<pre><code>GET \/api\/v1\/docs\/{id}?include_children=1&include_breadcrumb=1<\/code><\/pre>\\n\\n<table>\\n    <tr><th>Parameter<\/th><th>Typ<\/th><th>Beschreibung<\/th><\/tr>\\n    <tr><td>include_children<\/td><td>0|1<\/td><td>Kind-Dokumente einschließen<\/td><\/tr>\\n    <tr><td>include_breadcrumb<\/td><td>0|1<\/td><td>Breadcrumb-Pfad einschließen<\/td><\/tr>\\n<\/table>\\n\\n<h3>Response<\/h3>\\n<pre><code>{\\n  \\\"success\\\": true,\\n  \\\"data\\\": {\\n    \\\"id\\\": 51,\\n    \\\"title\\\": \\\"API\\\",\\n    \\\"path\\\": \\\"\/api\\\",\\n    \\\"content\\\": \\\"...\\\",\\n    ...\\n  },\\n  \\\"children\\\": [...],\\n  \\\"breadcrumb\\\": [\\n    {\\\"id\\\": 51, \\\"title\\\": \\\"API\\\", \\\"path\\\": \\\"\/api\\\"}\\n  ]\\n}<\/code><\/pre>\\n\\n<h2>Dokument nach Pfad<\/h2>\\n<pre><code>GET \/api\/v1\/docs\/path\/api\/chat<\/code><\/pre>\\n<p>Liefert Dokument mit Pfad <code>\/api\/chat<\/code>.<\/p>\\n\\n<h2>Semantische Suche<\/h2>\\n<pre><code>GET \/api\/v1\/docs\/search?q=Apache+SSL&limit=5&category=Betrieb<\/code><\/pre>\\n\\n<table>\\n    <tr><th>Parameter<\/th><th>Typ<\/th><th>Default<\/th><th>Beschreibung<\/th><\/tr>\\n    <tr><td>q<\/td><td>string<\/td><td>required<\/td><td>Suchanfrage<\/td><\/tr>\\n    <tr><td>limit<\/td><td>int<\/td><td>5<\/td><td>Max. Ergebnisse<\/td><\/tr>\\n    <tr><td>category<\/td><td>string<\/td><td>-<\/td><td>Taxonomie-Kategorie-Filter<\/td><\/tr>\\n<\/table>\\n\\n<h3>Response<\/h3>\\n<pre><code>{\\n  \\\"success\\\": true,\\n  \\\"data\\\": [\\n    {\\n      \\\"chunk_id\\\": 42,\\n      \\\"content\\\": \\\"Apache SSL Konfiguration...\\\",\\n      \\\"score\\\": 0.92,\\n      \\\"dokument_title\\\": \\\"Apache\\\",\\n      \\\"path\\\": \\\"\/server\/apache\\\"\\n    }\\n  ],\\n  \\\"meta\\\": {\\n    \\\"query\\\": \\\"Apache SSL\\\",\\n    \\\"limit\\\": 5,\\n    \\\"count\\\": 3\\n  }\\n}<\/code><\/pre>\\n\\n<h2>Dokumentationsbaum<\/h2>\\n<pre><code>GET \/api\/v1\/docs\/hierarchy<\/code><\/pre>\\n<p>Liefert vollständigen Dokumentationsbaum als verschachtelte Struktur.<\/p>\\n\\n<h3>Response<\/h3>\\n<pre><code>{\\n  \\\"success\\\": true,\\n  \\\"data\\\": [\\n    {\\n      \\\"id\\\": 1,\\n      \\\"title\\\": \\\"Server\\\",\\n      \\\"path\\\": \\\"\/server\\\",\\n      \\\"children\\\": [\\n        {\\\"id\\\": 2, \\\"title\\\": \\\"SSH\\\", \\\"path\\\": \\\"\/server\/ssh\\\", \\\"children\\\": []},\\n        {\\\"id\\\": 3, \\\"title\\\": \\\"UFW\\\", \\\"path\\\": \\\"\/server\/ufw\\\", \\\"children\\\": []}\\n      ]\\n    }\\n  ]\\n}<\/code><\/pre>\\n\\n<h2>Dokument erstellen<\/h2>\\n<pre><code>POST \/api\/v1\/docs\\nContent-Type: application\/json\\n\\n{\\n  \\\"title\\\": \\\"Neues Dokument\\\",\\n  \\\"slug\\\": \\\"neues-dokument\\\",\\n  \\\"content\\\": \\\"<h1>Inhalt<\/h1><p>Text...<\/p>\\\",\\n  \\\"description\\\": \\\"Beschreibung\\\",\\n  \\\"parent_id\\\": 51,\\n  \\\"status\\\": \\\"draft\\\",\\n  \\\"sort_order\\\": 10\\n}<\/code><\/pre>\\n\\n<table>\\n    <tr><th>Feld<\/th><th>Typ<\/th><th>Pflicht<\/th><th>Beschreibung<\/th><\/tr>\\n    <tr><td>title<\/td><td>string<\/td><td>Ja<\/td><td>Dokumenttitel<\/td><\/tr>\\n    <tr><td>slug<\/td><td>string<\/td><td>Ja<\/td><td>URL-Slug (eindeutig pro Parent)<\/td><\/tr>\\n    <tr><td>content<\/td><td>string<\/td><td>Nein<\/td><td>HTML-Inhalt<\/td><\/tr>\\n    <tr><td>description<\/td><td>string<\/td><td>Nein<\/td><td>Kurzbeschreibung<\/td><\/tr>\\n    <tr><td>parent_id<\/td><td>int<\/td><td>Nein<\/td><td>Parent-Dokument-ID<\/td><\/tr>\\n    <tr><td>status<\/td><td>string<\/td><td>Nein<\/td><td>draft (default) oder published<\/td><\/tr>\\n    <tr><td>sort_order<\/td><td>int<\/td><td>Nein<\/td><td>Sortierreihenfolge<\/td><\/tr>\\n<\/table>\\n\\n<h3>Response (201 Created)<\/h3>\\n<pre><code>{\\n  \\\"success\\\": true,\\n  \\\"data\\\": {...},\\n  \\\"message\\\": \\\"Dokument erstellt\\\"\\n}<\/code><\/pre>\\n\\n<h2>Dokument aktualisieren<\/h2>\\n<pre><code>PUT \/api\/v1\/docs\/{id}\\nContent-Type: application\/json\\n\\n{\\n  \\\"title\\\": \\\"Aktualisierter Titel\\\",\\n  \\\"content\\\": \\\"<h1>Neuer Inhalt<\/h1>\\\",\\n  \\\"description\\\": \\\"Neue Beschreibung\\\",\\n  \\\"status\\\": \\\"published\\\"\\n}<\/code><\/pre>\\n<p>Alle Felder sind optional - nur übergebene Felder werden aktualisiert.<\/p>\\n\\n<h2>Dokument löschen<\/h2>\\n<pre><code>DELETE \/api\/v1\/docs\/{id}<\/code><\/pre>\\n<p><strong>Wichtig:<\/strong> Dokumente mit Unterdokumenten können nicht gelöscht werden. Lösche zuerst alle Kind-Dokumente.<\/p>\\n\\n<h3>Fehler-Response<\/h3>\\n<pre><code>{\\n  \\\"success\\\": false,\\n  \\\"error\\\": \\\"Dokument hat Unterdokumente. Lösche diese zuerst.\\\"\\n}<\/code><\/pre>\\n\\n<h2>RAG-Chat<\/h2>\\n<pre><code>POST \/api\/v1\/docs\/chat\\nContent-Type: application\/json\\n\\n{\\n  \\\"question\\\": \\\"Wie konfiguriere ich Apache SSL?\\\",\\n  \\\"model\\\": \\\"mistral\\\",\\n  \\\"limit\\\": 5\\n}<\/code><\/pre>\\n\\n<table>\\n    <tr><th>Parameter<\/th><th>Typ<\/th><th>Default<\/th><th>Beschreibung<\/th><\/tr>\\n    <tr><td>question<\/td><td>string<\/td><td>required<\/td><td>Benutzer-Frage<\/td><\/tr>\\n    <tr><td>model<\/td><td>string<\/td><td>mistral<\/td><td>LLM-Modell (Ollama)<\/td><\/tr>\\n    <tr><td>limit<\/td><td>int<\/td><td>5<\/td><td>Max. Kontext-Chunks<\/td><\/tr>\\n<\/table>\\n\\n<h3>Response<\/h3>\\n<pre><code>{\\n  \\\"success\\\": true,\\n  \\\"data\\\": {\\n    \\\"answer\\\": \\\"Um Apache SSL zu konfigurieren...\\\",\\n    \\\"sources\\\": [\\n      {\\\"title\\\": \\\"Apache\\\", \\\"path\\\": \\\"\/server\/apache\\\", \\\"score\\\": 0.89}\\n    ],\\n    \\\"model\\\": \\\"mistral\\\",\\n    \\\"tokens\\\": {\\\"input\\\": 1200, \\\"output\\\": 350}\\n  }\\n}<\/code><\/pre>\\n\\n<h2>Fehlerbehandlung<\/h2>\\n<table>\\n    <tr><th>HTTP Code<\/th><th>Bedeutung<\/th><\/tr>\\n    <tr><td>400<\/td><td>Fehlende oder ungültige Parameter<\/td><\/tr>\\n    <tr><td>404<\/td><td>Dokument nicht gefunden<\/td><\/tr>\\n    <tr><td>500<\/td><td>Server-Fehler<\/td><\/tr>\\n<\/table>\\n\\n<h2>Services<\/h2>\\n<table>\\n    <tr><th>Service<\/th><th>Beschreibung<\/th><\/tr>\\n    <tr><td>DokumentationRepository<\/td><td>CRUD-Operationen für Dokumente<\/td><\/tr>\\n    <tr><td>ChunkSearchService<\/td><td>Semantische Suche über Chunks<\/td><\/tr>\\n    <tr><td>DocumentationChatUseCase<\/td><td>RAG-Chat mit Dokumentation<\/td><\/tr>\\n<\/table>\\n\\n<h2>Verwandte Dokumentation<\/h2>\\n<ul>\\n    <li><a href=\\\"\/docs\/mcp\/mcp-docs\\\">MCP-Docs Server<\/a><\/li>\\n    <li><a href=\\\"\/docs\/api\/explorer\\\">Explorer API<\/a><\/li>\\n    <li><a href=\\\"\/docs\/api\/chat\\\">Chat API<\/a><\/li>\\n<\/ul>]]>\",\n    \"status\": \"published\",\n    \"sort_order\": 0,\n    \"depth\": 1,\n    \"created_at\": \"2025-12-27T16:03:51\",\n    \"updated_at\": \"2025-12-27T16:03:51\"\n  },\n  \"message\": \"Document 'Docs API' created with ID 152\"\n}"
        }
    ]
}
← Vorheriger Zur Liste Nächster →