Skip to content
Proud to collaborate with Microsoft for Startups

data.identity.user.prune ​

Hard-delete expired soft-deleted Users and their API tokens / notification prefs

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

Input: retention_days (default 90), optional dry_run, organization_uuid, actorll optional). Output in state_data: users_pruned, tokens_pruned, prefs_pruned, dry_run, pruned_at.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-identity
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
retention_daysintegerNo——
organization_uuiduuidNo——
dry_runbooleanNo——
actorstringNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
users_prunedintegerYes——
tokens_prunedintegerYes——
prefs_prunedintegerYes——
dry_runbooleanYes——
pruned_atstringYes——
retention_daysintegerNo——
organization_uuiduuidNo——
actorstringNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—completePrune expired users
completedNoYesYes—Prune complete
failedNoYesNo—Prune failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingcompletecompleted—
pendingfailfailed—

API Usage ​

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

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