EA Automation API and External Generators
EA Automation API and External Generators
Availability
EA's Automation Interface can be used to build custom integrations that create, read, update, validate, and export model data. This is not a prebuilt C4 tool, but it is the main extension route for generating C4 views from EA or synchronizing EA with external C4 tools.
Link
- EA Automation Interface documentation: https://sparxsystems.com/resources/uml_tool_guide/automation/
Instructions
- Choose an integration language and EA automation access method supported by your deployment.
- Select a source of truth: EA, Structurizr, PlantUML, source code, CMDB, or service catalog.
- Define stable IDs and a mapping table for C4 element types.
- Read EA packages, elements, connectors, stereotypes, tagged values, and notes.
- Create or update C4 elements and relationships in the target format.
- Generate diagrams or update native EA diagrams.
- Produce an exceptions report for missing descriptions, unsupported types, duplicate IDs, and unmapped relationships.
- Run the integration in a controlled pipeline and back up the repository before bulk updates.
- Test against EA upgrades and changes to the external source schema.
Example mapping
EA element stereotype C4 output
c4-person Person
c4-system Software System
c4-container Container
c4-component Component
c4-code Code
Advantages
- Flexible integration with almost any C4 tool or enterprise source.
- Supports repeatable synchronization and publishing.
- Can preserve EA governance while generating developer-friendly C4 views.
Disadvantages
- Requires software development, deployment, monitoring, and support.
- Poorly designed synchronization can overwrite human-authored architecture.
- API compatibility and permissions need to be managed.
- Generated diagrams may need layout and editorial review.
Recommended safeguards
- Use dry-run mode before updates.
- Log every created, changed, and deleted object.
- Never use names alone as identity keys.
- Separate generated fields from manually maintained fields.
- Require review for relationship deletion and boundary changes.
- Keep source and target versions traceable.