data.network.scope.prune_stale ​
Hard-delete soft-deleted NetworkScope rows past retention
Hard-delete soft-deleted NetworkScope rows past the retention window.
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 scopes; default 30 |
network_account_uuid | uuid | No | — | Optional parent NetworkAccount UUID filter |
network_scope_uuid | uuid | No | — | Optional exact NetworkScope UUID filter |
provider_scope_ref | string | No | — | Optional exact provider-side scope reference filter |
max_rows | integer | No | — | Optional cap on rows hard-deleted per run |
dry_run | boolean | No | — | When true, count matching stale scopes without deleting them; default false |
actor | string | No | — | Caller initiating the prune |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
scopes_pruned | integer | Yes | — | Count of NetworkScope rows hard-deleted |
matched_scope_count | integer | Yes | — | Count of stale NetworkScope rows matched before dry-run/delete |
dry_run | boolean | Yes | — | True when this run only counted matching stale scopes |
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 scopes |
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 soft-deleted NetworkScope rows past retention | — |
failed | FAILURE | Network workflow failed | failure_reason |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "data.network.scope.prune_stale",
"initial_data": {
"organization_uuid": "value"
}
}