Skip to content
UPG is in early alpha. The specification is still evolving and may change between versions.
Tools/Workspace & Portfolios/delete_canonical_entity

delete_canonical_entity

Delete a canonical entity from the portfolio registry: the registry counterpart to `delete_node` (which only sees the active product). Retires an obsolete or twin canonical that would otherwise linger as a 0-instance orphan in `list_registry`. Safe by default: refuses while anything still references the canonical (instance_of edges, area/classification cross-edges, registry-internal edges) unless `cascade: true`, which deletes those references in the same atomic flush, severing the instances. When instances should SURVIVE under another canonical, use `merge_canonical_entities` instead: it repoints them. Preview the exact blast radius first with `dry_run: true`.

Workspace & Portfoliosatomic. All removals land in one portfolio flush.

Arguments

canonical_idstringrequired

The registry entity id (bare, or registry/{id}).

cascadebooleanoptional

Also delete every edge referencing the canonical (default false). Without it, a referenced canonical is refused.

dry_runbooleanoptional

Preview the canonical + every referencing edge that deletion would remove; nothing is written (default false).

Returns

Shape
{ deleted, cascaded: { instance_of, cross_edges, registry_edges }, portfolio_file }

— or { dry_run: true, would_delete, references }.

See Also