data.network.topology.prune_stale ​
Hard-delete stale soft-deleted network topology records
Hard-delete stale soft-deleted network topology records.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-network |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | UUID of the organization to prune within |
retention_days | integer | No | — | Days to keep soft-deleted topology records; default 30 |
network_account_uuid | uuid | No | — | Optional parent NetworkAccount UUID filter |
network_scope_uuid | uuid | No | — | Optional NetworkScope UUID filter for scope-local records |
max_rows | integer | No | — | Optional per-entity cap on rows hard-deleted per run |
dry_run | boolean | No | — | When true, count matching stale records without deleting them; default false |
actor | string | No | — | Caller initiating the prune |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
accounts_pruned | integer | Yes | — | Count of NetworkAccount rows hard-deleted |
scopes_pruned | integer | Yes | — | Count of NetworkScope rows hard-deleted |
segments_pruned | integer | Yes | — | Count of NetworkSegment rows hard-deleted |
security_boundaries_pruned | integer | Yes | — | Count of NetworkSecurityBoundary rows hard-deleted |
profiles_pruned | integer | Yes | — | Count of NetworkProfile rows hard-deleted |
matched_account_count | integer | Yes | — | Eligible stale NetworkAccount rows matched before dry-run/delete |
matched_scope_count | integer | Yes | — | Eligible stale NetworkScope rows matched before dry-run/delete |
matched_segment_count | integer | Yes | — | Stale NetworkSegment rows matched before dry-run/delete |
matched_security_boundary_count | integer | Yes | — | Stale NetworkSecurityBoundary rows matched before dry-run/delete |
matched_profile_count | integer | Yes | — | Stale NetworkProfile rows matched before dry-run/delete |
accounts_skipped_live_children | integer | Yes | — | Soft-deleted accounts skipped because active children remain |
scopes_skipped_live_children | integer | Yes | — | Soft-deleted scopes skipped because active children remain |
dry_run | boolean | Yes | — | True when this run only counted matching stale topology records |
retention_days | integer | Yes | — | Retention window applied |
pruned_at | string | Yes | — | ISO-8601 timestamp |
failure_reason | string | No | — | Engine-stamped human-readable failure reason |
failed_at_state | string | No | — | Engine-stamped state when the workflow failed |
failed_step | string | No | — | Engine-stamped step name (DAG path) |
failed_layer | integer | No | — | Engine-stamped layer index (DAG path) |
error | string | No | — | Engine-stamped exception message |
error_type | string | No | — | Engine-stamped exception class name |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | complete | Prune stale topology |
completed | No | Yes | Yes | — | Pruned |
failed | No | Yes | No | — | Prune failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | complete | completed | — |
pending | fail | failed | — |
Outcomes ​
| Outcome | Type | Description | State Data Keys |
|---|---|---|---|
pruned | SUCCESS | Hard-delete stale soft-deleted network topology records | — |
failed | FAILURE | Network workflow failed | failure_reason |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "data.network.topology.prune_stale",
"initial_data": {
"organization_uuid": "value"
}
}