Skip to content
Proud to collaborate with Microsoft for Startups

data.network.scope.prune_stale ​

Hard-delete soft-deleted NetworkScope rows past retention

Hard-delete soft-deleted NetworkScope rows past the retention window.

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 scopes; default 30
network_account_uuiduuidNo—Optional parent NetworkAccount UUID filter
network_scope_uuiduuidNo—Optional exact NetworkScope UUID filter
provider_scope_refstringNo—Optional exact provider-side scope reference filter
max_rowsintegerNo—Optional cap on rows hard-deleted per run
dry_runbooleanNo—When true, count matching stale scopes without deleting them; default false
actorstringNo—Caller initiating the prune

Output Schema ​

FieldTypeRequiredDefaultDescription
scopes_prunedintegerYes—Count of NetworkScope rows hard-deleted
matched_scope_countintegerYes—Count of stale NetworkScope rows matched before dry-run/delete
dry_runbooleanYes—True when this run only counted matching stale scopes
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 scopes
completedNoYesYes—Pruned
failedNoYesNo—Prune failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingcompletecompleted—
pendingfailfailed—

Outcomes ​

OutcomeTypeDescriptionState Data Keys
prunedSUCCESSHard-delete soft-deleted NetworkScope rows past retention—
failedFAILURENetwork workflow failedfailure_reason

API Usage ​

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

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