export_bpmn
Export BPMN diagrams to XML, SVG, PNG, animated GIF/APNG/MP4/WebP, or interactive HTML, with optional lint validation and file output.
Instructions
Export a BPMN diagram as XML, SVG, PNG, an animated GIF/APNG/MP4/WebP, or a standalone interactive HTML embed, and write it to a file. By default, runs bpmnlint and blocks export if there are error-level lint issues. Set skipLint to true to bypass validation. Optionally scope to a subprocess or participant via elementId (xml/svg/both only). Use format 'both' to get XML and SVG in a single call. PNG/animated/HTML formats always write to filePath (required for those formats) rather than inlining. Animated formats render token-simulation driven by an optional TOML scenario (see the executable-Camunda-7 guide resource); omit scenario to use the diagram's own default. gif/apng/mp4/webp/html require optional dependencies (gifenc or ffmpeg for encoding, smol-toml for scenario parsing) — errors name the missing one. The exported text content is also returned in the response, unless it is large — beyond a size threshold, xml/svg/both return a bpmn://diagram/{id}/xml or /svg resource_link plus a short summary instead of the full text; pass inline: true to force full text regardless of size. Binary/HTML formats return a confirmation only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fps | No | gif/apng/mp4/webp only: rendered animation frame rate. | |
| scale | No | png/animated formats: pixel density multiplier. Default: 2 for png, 1 for animations. | |
| format | Yes | The export format: 'xml' for BPMN XML, 'svg' for SVG image, 'both' for XML and SVG in one call, 'png' for a static image, 'gif'/'apng'/'mp4'/'webp' for an animated token-simulation, 'html' for a standalone interactive embed. | |
| inline | No | xml/svg/both only: force full text inline even for a large diagram that would otherwise be summarized as a bpmn://diagram/{id}/xml or /svg resource_link. Default: false. | |
| encoder | No | gif format only: 'auto' (default) prefers ffmpeg when on PATH for better quality, else the bundled gifenc. | |
| filePath | Yes | File path to write the exported content to. For 'both' format, writes the XML portion. Required for png/gif/apng/mp4/webp/html. Directories are created automatically. | |
| scenario | No | gif/apng/mp4/webp only: TOML scenario steering token-simulation (which gateway branches/events fire, and when). Omit to render the diagram's own default scenario. | |
| skipLint | No | Skip lint validation before export. Default: false (lint errors block export). | |
| diagramId | Yes | The diagram ID | |
| elementId | No | Optional ID of a SubProcess or Participant to export as a standalone diagram (xml/svg/both only). When provided, lint gating is skipped. | |
| background | No | png/animated/html formats: background color (CSS color string, e.g. "white"). Default: transparent. | |
| lintMinSeverity | No | Minimum lint severity that blocks export. 'error' (default) blocks only on errors. 'warning' blocks on warnings too. Useful for strict CI pipelines. |