Skip to content
Proud to collaborate with Microsoft for Startups

subscription.retention.apply ​

Apply configured org retention to workflow/audit storage with dry-run support

Apply per-organization retention policy to workflow and audit storage.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-subscription
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Organization UUID
subscription_uuiduuidNo—Subscription UUID for policy attribution
dry_runbooleanNo—Plan only; defaults true
batch_sizeintegerNo—Maximum rows/workflows per category
include_workflow_statesbooleanNo—Apply workflow state retention
include_workflow_eventsbooleanNo—Apply workflow event retention
include_scheduled_transitionsbooleanNo—Apply completed scheduled transition retention
include_audit_logsbooleanNo—Apply audit log retention
include_usage_snapshotsbooleanNo—Apply usage snapshot retention

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidNo——
subscription_uuiduuidNo——
dry_runbooleanNo——
policyjsonNo——
cutoffsjsonNo——
plannedjsonNo——
deletedjsonNo——
storage_enforcementjsonNo——
warningslistNo——
completed_atstringNo——
failed_atstringNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
pendingfailfailed—

API Usage ​

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

{
  "workflow_type": "subscription.retention.apply",
  "initial_data": {
    "organization_uuid": "value"
  }
}