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 ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-identity |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | No | — | Scope prune to a single organization (public UUID) |
retention_days | integer | No | — | Days after soft-delete before hard-delete (default 90) |
dry_run | boolean | No | — | If True, count only — no deletes |
actor | string | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
memberships_pruned | integer | Yes | — | — |
dry_run | boolean | Yes | — | — |
pruned_at | string | Yes | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | complete | Prune memberships |
completed | No | Yes | Yes | — | Pruned |
failed | No | Yes | No | — | Prune failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | complete | completed | — |
pending | fail | failed | — |
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"
}
}