Restore Entity
restore_entityRestore a soft-deleted entity—asset, attacker, component, trust boundary, or assumption—in a threat model to reverse a prior removal and create a new version.
Instructions
Un-soft-delete a single entity of any core type, reversing a prior
remove_entity. Mutating: creates a new model version. Only affects
an entity that is currently soft-deleted.
Dispatches on entity_type. Per-type effect:
asset— revives the asset's tombstoned (asset × attacker) COs with their original IDs, un-orphaning any linked controls.attacker— reinstates the attacker under its original ID, revives the COs tombstoned when it was removed, and un-orphans any controls that were anchored to it.component— reinstates the component under its original ID, restoring its trust-boundary contribution to asset reachability.trust_boundary— reinstates the boundary: the reachability it filtered re-narrows and itssealed/isolation claim is restored, so CO reachability verdicts past it can flip back toward unreachable.assumption— returns the assumption to active status; controls whoseassumption_groupsreferenced it keep their group structure intact. Its CO links are not restored (set them again withedit_assumption), and re-attestation is required before it counts anywhere it is linked or grouped.
Returns the entity-change result: {"model": <ThreatModel>, "controls_carried", "controls_orphaned", "orphaned_control_ids", ...}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model_id | Yes | ID of the threat model. | |
| entity_id | Yes | ID of the entity to restore. | |
| entity_type | Yes | Which entity to restore — one of ``asset``, ``attacker``, ``component``, ``trust_boundary``, ``assumption``. | |
| server_version | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||