Skip to content
Proud to collaborate with Microsoft for Startups

data.identity.organization.prune ​

Hard-delete Organization rows soft-deleted beyond retention window

Hard-delete Organization rows soft-deleted beyond the retention window.

Guards: skip orgs with active OrganizationUser or CloudConnection rows. dry_run=True counts candidates without deleting.

Input: retention_days (default 90), dry_run (default False), actor. Output: organizations_pruned, skipped, dry_run, pruned_at.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-identity
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
retention_daysintegerNo—Days after soft-delete before hard-delete (default 90)
dry_runbooleanNo—If True, count candidates without deleting
actorstringNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
organizations_prunedintegerYes——
skippedintegerYes——
dry_runbooleanYes——
pruned_atstringYes——
retention_daysintegerNo——
actorstringNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—completePrune organizations
completedNoYesYes—Pruned
failedNoYesNo—Prune failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingcompletecompleted—
pendingfailfailed—

API Usage ​

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

{
  "workflow_type": "data.identity.organization.prune",
  "initial_data": {
    "retention_days": 123,
    "dry_run": true,
    "actor": "value"
  }
}