REST-API-Referenz

HTTP-Endpunkte für den programmatischen Zugriff auf Metapad-Modelle und -Daten.

ℹ️
This is the HTTP REST API for direct programmatic access. For AI-native access via Claude Desktop or Claude Code, see the MCP API Reference.
POST
/api/v1/models/{model_id}/nodes/batchPro+

Knoten stapelweise abrufen

Mehrere Knoten per ID in einer einzigen Anfrage abrufen. Effizienter als mehrere Einzelknoten-Aufrufe. Akzeptiert UUIDs und Auto-IDs (z. B. REQ-42).

DELETE
/api/v1/models/{model_id}/assets/{asset_id}/filePro+

Delete Asset File

Detach the file from an asset. The asset element itself stays in the model — only the attached binary is removed from object storage and the file metadata cleared. Use this to replace a file (delete, then upload).

GET
/api/v1/models/{model_id}/assets/{asset_id}/downloadPro+

Download Asset

Download the file attached to an asset. Returns a 302 redirect to a short-lived presigned S3 URL — clients must follow redirects to fetch the binary. Returns 404 with code 'no_file' if the asset has no file attached.

GET
/api/v1/models/{model_id}/exportPro+

Modell exportieren

Das vollständige Modell als herunterladbare JSON-Datei exportieren. Identische Daten wie bei „Modell abrufen", aber mit Content-Disposition: attachment für direkten Download.

GET
/api/v1/models/{model_id}/assets/{asset_id}Pro+

Get Asset Metadata

Fetch metadata for a single asset (label, description, filename, content type, size, tags, timestamps). Does not return the file binary — use Download Asset for that.

GET
/api/v1/models/{model_id}/metadataPro+

Metadaten abrufen

Leichtgewichtige Modell-Metadaten: Name, Beschreibung, Sprachliste, Knoten-/Beziehungsanzahlen und Zeitstempel der letzten Aktualisierung. Gibt keine Modellinhalte zurück.

GET
/api/v1/models/{model_id}Pro+

Modell abrufen

Gibt die vollständigen Modelldaten einschließlich Metamodell (M2-Typen) und aller Knoten-/Beziehungsinstanzen zurück. Entspricht einem vollständigen JSON-Export.

GET
/api/v1/models/{model_id}/nodes/{node_id}Pro+

Knoten abrufen

Vollständige Details für einen einzelnen Knoten einschließlich aller Eigenschaften und optional seiner ein- und ausgehenden Beziehungen. Akzeptiert UUID oder Auto-ID (z. B. REQ-42).

GET
/api/v1/models/{model_id}/schemaPro+

Schema abrufen

Gibt das Metamodell (M2-Schema) zurück: alle Knotentypen, Beziehungstypen, deren Eigenschaften und erlaubte Verbindungsmuster. Entspricht dem MCP-Tool get_metamodel.

GET
/api/v1/models/{model_id}/assetsPro+

List Assets

List all assets (file attachments) in a model. Returns metadata only — file binaries are fetched separately via Download Asset. Useful for browsing what's attached to a model.

GET
/api/v1/models/{model_id}/foldersPro+

Ordner auflisten

Gibt die vollständige Ordnerhierarchie für das Modell zurück. Ordner sind optionale Organisationscontainer für Knoten.

GET
/api/v1/models/{model_id}/nodesPro+

Knoten auflisten

Paginierte Liste von Knoteninstanzen mit Filterung nach Typ, Ordner und Volltextsuche. Gibt eine Seite mit Knotenzusammenfassungen plus x-total-count-Header für die Paginierung zurück.

GET
/api/v1/models/{model_id}/relationshipsPro+

Beziehungen auflisten

Paginierte Liste von Beziehungen mit Filterung nach Typ, Quell- oder Zielknoten. Gibt x-total-count-Header für die Paginierung zurück.

POST
/mcp/{model_id}Pro+

MCP Tool Call

The MCP HTTP transport. A single JSON-RPC 2.0 endpoint that dispatches to all of Metapad's MCP tools (get_metamodel, search_nodes, create_nodes, etc.) — set 'method' to the JSON-RPC method ('tools/call', 'tools/list', 'initialize', 'ping') and put the tool name + arguments in 'params'. This is the same endpoint that Claude Desktop, Claude Code, and other MCP clients connect to — use it directly from scripts and CI when no interactive OAuth login is possible. Distinct from the REST API v1 endpoints under /api/v1/..., which expose individual resources as conventional REST.

POST
/api/v1/models/{model_id}/assetsPro+

Upload Asset

Create a new asset in a model and attach a file in a single multipart upload. Broadcasts AssetAdded + AssetFileAttached collaboration operations — browser users see the new asset in real-time. 100 MB max.