Skip to content
Proud to collaborate with Microsoft for Startups

data.identity.membership.prune ​

Hard-delete soft-deleted OrganizationUser rows past retention window

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

Input: optional organization_uuid, retention_days (default 90), dry_run. Output in state_data: memberships_pruned, dry_run, pruned_at.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-identity
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidNo—Scope prune to a single organization (public UUID)
retention_daysintegerNo—Days after soft-delete before hard-delete (default 90)
dry_runbooleanNo—If True, count only — no deletes
actorstringNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
memberships_prunedintegerYes——
dry_runbooleanYes——
pruned_atstringYes——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—completePrune memberships
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.membership.prune",
  "initial_data": {
    "organization_uuid": "value",
    "retention_days": 123,
    "dry_run": true,
    "actor": "value"
  }
}