data.appdata.record.write
Create an owner-scoped appdata record from a declared virtual table (routes to the app's storage plane: the shared appdata store, or the app's own Postgres instance when it has one)
Create an owner-scoped appdata record.
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 | No | — | (server-resolved principal from the end-user token; input ignored unless it agrees) |
database_slug | string | No | — | Virtual database slug. Optional when the authenticated app has exactly one serving database; required when the app has zero or many. |
table_slug | string | Yes | — | Virtual table slug |
end_user_uuid | uuid | No | — | (server-resolved principal from the end-user token; input ignored unless it agrees) |
app_organization_uuid | uuid | No | — | (server-resolved active workspace for organization-mode tables; input rejected if it disagrees) |
resource_ref | string | No | — | Optional resource identifier for fine-grained workspace capability checks (ns:verb:resource_ref) |
request_id | string | No | — | Caller request id for audit correlation |
actor | string | No | — | Workflow caller or agent identifier |
payload | dict | Yes | — | User-declared field payload |
idempotency_key | string | No | — | Optional caller idempotency key |
Output Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | Organization UUID echoed from input |
identity_app_uuid | uuid | Yes | — | Identity app UUID echoed from input |
database_slug | string | Yes | — | Virtual database slug |
table_slug | string | Yes | — | Virtual table slug |
record_uuid | uuid | Yes | — | Created record UUID |
owner_end_user_uuid | uuid | Yes | — | Owner forced from end_user_uuid |
created | boolean | Yes | — | True when a new record was inserted |
written_at | string | Yes | — | ISO-8601 write timestamp |
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 | Write record |
completed | No | Yes | Yes | — | Written |
failed | No | Yes | No | — | Write failed |
State Diagram
Transitions
| From | Action | To | Description |
|---|---|---|---|
pending | complete | completed | — |
pending | fail | failed | — |
Outcomes
| Outcome | Type | Description | State Data Keys |
|---|---|---|---|
written | SUCCESS | Create an owner-scoped appdata record from a declared virtual table (routes to the app's storage plane: the shared appdata store, or the app's own Postgres instance when it has one) | record_uuid |
failed | FAILURE | Appdata workflow failed | failure_reason |
API Usage
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "data.appdata.record.write",
"initial_data": {
"organization_uuid": "value",
"table_slug": "value",
"payload": "value"
}
}