import_data_model
Imports a data model from a universal format and turns it into OrgGen entities. Supported parsers: 'dbml', 'sql-postgres', 'json-schema'. Mode 'replace' (default) replaces all existing ERD entities — suited when the user wants to bootstrap the project from a source file. Mode 'merge' adds to the existing entities without touching the old ones — useful to merge a sub-domain. Blocks of the org-chart kind (groups, subsidiaries) are never touched. Returns warnings for unrecognized types (mapped to 'string' by default) and orphan FKs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | 'replace' (default) replaces all existing ERD entities with the imported model. 'merge' adds to the existing entities while avoiding duplicates by name — relations between new and old entities are kept if the names match. | |
| format | Yes | Format of the input payload. Supported parsers: 'dbml', 'sql-postgres', 'json-schema'. | |
| origin | No | Top-left corner of the grid layout (default x=200, y=200). | |
| payload | Yes | Text content of the model to import (the complete source file). | |
| expectedProjectId | No | UUID of the project targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted. |