appdata.retract-as-app ​
Retract records an organization published into an app-owned appdata table
Retract organization-published records from an app-owned table.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-appdata |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | Authenticated organization UUID |
identity_app_uuid | uuid | Yes | — | Identity app to retract from; must be owned by the authenticated organization |
database_slug | string | Yes | — | Virtual database slug |
table_slug | string | Yes | — | Virtual table slug; the table must declare ownership kind 'app' |
record_uuids | list | Yes | — | Record UUIDs to retract (max 500) — the ones publish-as-app returned. Explicit by design: there is no filter form, so a retraction can never sweep more than it names |
reason | string | Yes | — | Why this is being retracted; recorded on the audit row and required, not optional |
request_id | string | No | — | Caller request id for audit correlation |
actor | string | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | — |
identity_app_uuid | uuid | Yes | — | — |
database_slug | string | Yes | — | — |
table_slug | string | Yes | — | — |
retracted | boolean | No | — | — |
retracted_count | integer | No | — | — |
record_uuids | list | No | — | Record UUIDs actually retracted |
retracted_at | string | No | — | — |
retracted_by_workflow_uuid | string | No | — | Workflow run that retracted — the provenance stamp |
reason | string | No | — | — |
failure_reason | string | No | — | Engine-stamped failure reason |
failed_at_state | string | No | — | State when the workflow failed |
failed_step | string | No | — | Failed DAG step name |
failed_layer | integer | No | — | Failed DAG layer index |
error | string | No | — | Engine-stamped exception message |
error_type | string | No | — | Engine-stamped exception class name |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | complete | Retract records |
completed | No | Yes | Yes | — | Retracted |
failed | No | Yes | No | — | Retraction failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | complete | completed | — |
pending | fail | failed | — |
Outcomes ​
| Outcome | Type | Description | State Data Keys |
|---|---|---|---|
retracted | SUCCESS | Retract records an organization published into an app-owned appdata table | record_uuids |
failed | FAILURE | Appdata workflow failed | failure_reason |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "appdata.retract-as-app",
"initial_data": {
"organization_uuid": "value",
"identity_app_uuid": "value",
"database_slug": "value",
"table_slug": "value"
}
}