A Canvas snapshot is the complete shared state of a Canvas at one version. Per-user client state, such as selection and the camera, is not part of it.
Field | Type | Description |
|---|---|---|
| list | Canvas nodes. See Node |
| list | Connections between nodes. See Edge |
An empty snapshot is { nodes: [], edges: [] }.
Snapshots are canonicalized before they are saved.
The input accepts the following fields, and canonicalization removes them:
Field on nodes | Field on edges | Reason |
|---|---|---|
| — | Client-measured geometry |
|
| Per-user selection |
| — | Transient interaction |
| — | Transient interaction |
|
| Transient interaction |
|
| Client optimistic state |
|
| Client-derived data |
viewport (the camera) is also accepted and discarded. It is per-user state, not shared Canvas state.
Field | Type | Required |
|---|---|---|
| string | Yes |
| string | Yes |
| string | No |
|
| Yes |
|
| No |
| string | No |
| boolean | No |
| node data. See Node Data Kinds | No |
| list of backing references. See Backing References | Yes |
|
| No |
Invariant. When data is present, type must equal data.kind. A node whose type and data.kind disagree is rejected.
Field | Type | Required |
|---|---|---|
| string | Yes |
| string | Yes |
| string | Yes |
| string | No |
data.kind determines the node's meaning. The available kinds are:
Literal nodes pin an immutable definition artifact. No first-class resource exists for a literal.
Kind | Payload |
|---|---|
|
|
|
|
|
|
Reference nodes point at a converted, first-class resource at a pinned version.
Kind | Payload |
|---|---|
|
|
|
|
|
|
Kind | Payload |
|---|---|
|
|
Nodes with no data — for example uploaded file nodes and extracted table nodes — carry their content solely through backingReferences and use type: "artifact".
backingReferences is a list of discriminated unions naming what a node is backed by. The available kinds are:
Kind | Fields |
|---|---|
|
|
|
|
|
|
|
|
|
|
A node may carry more than one backing reference. An uploaded file node carries the raw artifact plus the flow-package and flow-run of the ingestion run that produced it.
Snapshots are stored with media type application/vnd.ligantic.canvas-snapshot+json. Snapshots with identical canonical content are stored once per Space, so two Canvas versions with identical canonical content share one stored snapshot.