- 6 minutes to read

Export and Sharing

Every diagram in C4 Diagrams can be exported and shared in multiple formats. Because Nodinite generates every export on demand from the current relational data in the database, exports are always current: no stale screenshot diverges from the actual architecture.

Understanding Export and Sharing

flowchart LR Repo["fa:fa-database Diagram Set data"] --> Endpoint["fa:fa-plug Export endpoint"] Repo --> Viewer["fa:fa-eye Read-only viewer URL"] Endpoint --> Img["fa:fa-image PNG / SVG"] Endpoint --> Md["fa:fa-code Mermaid markup"] Endpoint --> Src["fa:fa-file-code Structurizr DSL / PlantUML"] Endpoint --> Drawio["fa:fa-pen-ruler Draw.io XML"] Img --> Docs["fa:fa-book Confluence, SharePoint, Office"] Md --> Wiki["fa:fa-code-branch GitHub, Azure DevOps"]

Every export and the read-only viewer render from the same live data in the Diagram Set, so all shared copies show the current architecture.

Export Formats

This section is the one home for the export format list; other C4 pages link here. A single diagram and a whole Diagram Set offer the same six formats.

Single Diagram

The shared Export dropdown on a diagram offers:

Format Extension Best for
SVG vector .svg Print-quality, scalable embedding
PNG image .png Word, PowerPoint, Confluence, Teams chats
Mermaid .md GitHub, Azure DevOps, Notion, Mermaid Live Editor
Structurizr DSL .dsl Interchange with Structurizr tooling
PlantUML .puml Interchange with PlantUML ecosystems
Draw.io .drawio Import into draw.io / diagrams.net for manual editing or branding

In the C4 Designer and on the diagram Detail page, the dropdown also has a Print diagram item above the six formats.

The export endpoints follow the pattern /api/repository/architecture/sets/{setId}/diagrams/{id}/export.{extension}, for example export.png. The OpenAPI documentation of your Nodinite Web API lists every export route.

Whole Diagram Set

The Export menu on the Diagram Set detail page offers the same six formats. Each one downloads a ZIP with every diagram in the set:

Format Download Notes
SVG ZIP of .svg files Opens a modal with diagram state filters first
PNG ZIP of .png files Opens a modal with diagram state filters first
Mermaid ZIP of .md files
Structurizr DSL ZIP of .dsl files Labelled DSL in the set menu
PlantUML ZIP of .puml files
Draw.io ZIP of .drawio files

Note

Export and Import support different sets of formats. Import accepts four markup formats (Mermaid, PlantUML, Structurizr DSL, and Draw.io XML); export adds SVG and PNG images.

Tip

Icons in Mermaid export: a Mermaid (.md) export follows the rules of the Mermaid language, so only nodes whose Component Type has a Font Awesome icon keep their icon. Azure architecture icons, custom uploads, and the Mermaid logo are dropped. Use Font Awesome icons for diagrams you share as Mermaid; see How Icons Render in C4 and Mermaid.

The export URLs are relative to the Nodinite Web Client (https://{host}:{port}/). All export endpoints accept a GET request with no authentication for public sharing, or pass the Nodinite session token for authenticated access, depending on your Nodinite security configuration.

Connector Message Members on Export

If a static diagram shows 2 flows or 3 flows on one visible connector, the export behaviour depends on the target format:

Format What designers should expect
PNG / SVG Exports the rendered diagram for presentations, reviews, and embedding. Great for visual communication, but not for round-tripping connector message member metadata
Mermaid .md Expands the visible connector into one relationship line per message member, preserving the individual member labels and protocols
Draw.io XML Exports separate edges for the stored members so the diagram can be refined in draw.io, but Message Type links remain Nodinite-only metadata

In other words, the canvas may collapse several flows for readability while export keeps them explicit where the target format supports it. Optional Message Type bindings are used inside Nodinite for navigation and traceability; they are not embedded into exported markup or image files.

Sharing a C4 Diagram

Read-Only Viewer URL

The URL /repository/architecture/sets/{setId}/diagrams/{id}/view is a stable, shareable link to the rendered Mermaid diagram (see Mermaid View). Paste it in:

  • Teams or Slack messages
  • Jira / ServiceNow tickets
  • Email threads
  • Architecture review documents

The viewer renders the latest diagram state every time it is opened. No diagram rebuilding or re-exporting required. Because the viewer renders Mermaid, it shows Font Awesome Component Type icons only (why).

Raw Mermaid Source

The URL /repository/architecture/sets/{setId}/diagrams/{id}/mermaid shows the raw Mermaid C4 markup with a copy-to-clipboard button. Use this to:

  • Paste into GitHub README files (```mermaid ``` block)
  • Insert into Confluence using the Mermaid macro
  • Add to Azure DevOps wiki pages (native Mermaid support)
  • Open in the Mermaid Live Editor for immediate visual editing

Set-Based Role Permissions

Shared links respect Diagram Set permissions: only users whose Roles are assigned to the set can open its diagrams, and new sets can inherit default roles through DefaultRolesInViews. There are no per-diagram sharing flags; see Role-Based Access for C4 Diagram Sets for the full model.

Embedding in External Tools

GitHub / Azure DevOps / Bitbucket

Paste the Mermaid export directly into any Markdown file:

```mermaid
C4Container
    title API-Led Architecture
    Person(user, "Web User", "Uses the portal")
    Boundary(apis, "Experience APIs") {
        Container(api, "Customer API", "ASP.NET Core", "REST API")
    }
    System_Ext(erp, "ERP", "Back-office system")
    Rel(user, api, "Calls", "HTTPS")
    Rel(api, erp, "Reads inventory", "REST")
```

GitHub, Azure DevOps wikis, and Bitbucket render Mermaid diagrams natively.

Confluence

Confluence offers two options:

  • Mermaid macro — Install the Mermaid Diagrams for Confluence app, then paste the Mermaid source into the macro
  • PNG/SVG embed — Use the export endpoint URL as an image source in a Confluence page. Because the URL always returns the current diagram, the Confluence page automatically shows the latest architecture

SharePoint / Teams Tab

Use the PNG or SVG export URL as an image source in:

  • SharePoint modern pages (Image web part)
  • Teams tabs (embed a web page pointing to the /view URL)

Automating Export

Because all export endpoints are standard GET requests, you can automate them:

# Download the latest PNG for use in documentation pipelines
$setId = "your-diagram-set-guid"
$diagramId = "your-diagram-guid"
$token = "your-nodinite-token"

Invoke-WebRequest `
    -Uri "https://{host}:{port}/api/repository/architecture/sets/$setId/diagrams/$diagramId/export.png" `
    -Headers @{ "Authorization" = "Bearer $token" } `
    -OutFile "architecture-$(Get-Date -Format 'yyyyMMdd').png"

This approach enables:

  • Nightly exports committed to a Git repository alongside the application code
  • Automated architecture documentation in CI/CD pipelines
  • Version-controlled architecture diagrams without manual screenshot management

Export from the Designer

Within the C4 Designer, the Export dropdown () in the toolbar provides one-click download of the current diagram in any of the six single-diagram formats, plus Print diagram, with no need to call the export endpoint separately.

Next Steps