Skip to content
Proud to collaborate with Microsoft for Startups

data.network.topology.prune_stale ​

Hard-delete stale soft-deleted network topology records

Hard-delete stale soft-deleted network topology records.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-network
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—UUID of the organization to prune within
retention_daysintegerNo—Days to keep soft-deleted topology records; default 30
network_account_uuiduuidNo—Optional parent NetworkAccount UUID filter
network_scope_uuiduuidNo—Optional NetworkScope UUID filter for scope-local records
max_rowsintegerNo—Optional per-entity cap on rows hard-deleted per run
dry_runbooleanNo—When true, count matching stale records without deleting them; default false
actorstringNo—Caller initiating the prune

Output Schema ​

FieldTypeRequiredDefaultDescription
accounts_prunedintegerYes—Count of NetworkAccount rows hard-deleted
scopes_prunedintegerYes—Count of NetworkScope rows hard-deleted
segments_prunedintegerYes—Count of NetworkSegment rows hard-deleted
security_boundaries_prunedintegerYes—Count of NetworkSecurityBoundary rows hard-deleted
profiles_prunedintegerYes—Count of NetworkProfile rows hard-deleted
matched_account_countintegerYes—Eligible stale NetworkAccount rows matched before dry-run/delete
matched_scope_countintegerYes—Eligible stale NetworkScope rows matched before dry-run/delete
matched_segment_countintegerYes—Stale NetworkSegment rows matched before dry-run/delete
matched_security_boundary_countintegerYes—Stale NetworkSecurityBoundary rows matched before dry-run/delete
matched_profile_countintegerYes—Stale NetworkProfile rows matched before dry-run/delete
accounts_skipped_live_childrenintegerYes—Soft-deleted accounts skipped because active children remain
scopes_skipped_live_childrenintegerYes—Soft-deleted scopes skipped because active children remain
dry_runbooleanYes—True when this run only counted matching stale topology records
retention_daysintegerYes—Retention window applied
pruned_atstringYes—ISO-8601 timestamp
failure_reasonstringNo—Engine-stamped human-readable failure reason
failed_at_statestringNo—Engine-stamped state when the workflow failed
failed_stepstringNo—Engine-stamped step name (DAG path)
failed_layerintegerNo—Engine-stamped layer index (DAG path)
errorstringNo—Engine-stamped exception message
error_typestringNo—Engine-stamped exception class name

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—completePrune stale topology
completedNoYesYes—Pruned
failedNoYesNo—Prune failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingcompletecompleted—
pendingfailfailed—

Outcomes ​

OutcomeTypeDescriptionState Data Keys
prunedSUCCESSHard-delete stale soft-deleted network topology records—
failedFAILURENetwork workflow failedfailure_reason

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "data.network.topology.prune_stale",
  "initial_data": {
    "organization_uuid": "value"
  }
}