appdata.publish-as-app ​
Publish an organization-side record into an app-owned appdata table, visible to every end-user of the app
Publish one organization-side record into 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 publish into; 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' |
payload | dict | No | — | Declared field payload to publish (single record). Mutually exclusive with 'payloads' |
payloads | list | No | — | Declared field payloads to publish as one atomic batch (max 500). Mutually exclusive with 'payload'. All rows commit together or none does |
source | string | No | — | Free-text provenance label recorded on the audit row (e.g. 'car.reconcile-window') |
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 | — | — |
record_uuid | uuid | No | — | Published record UUID (single-payload calls; the first row of a batch) |
record_uuids | list | No | — | Every published record UUID, in input order — keep these; they are what retract-as-app takes |
published_count | integer | No | — | Number of records inserted by this call |
published | boolean | No | — | True when a record was inserted |
published_at | string | No | — | ISO-8601 publication timestamp |
published_by_workflow_uuid | string | No | — | Workflow run that published the record — the provenance stamp |
source | 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 | Publish record |
completed | No | Yes | Yes | — | Published |
failed | No | Yes | No | — | Publish failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | complete | completed | — |
pending | fail | failed | — |
Outcomes ​
| Outcome | Type | Description | State Data Keys |
|---|---|---|---|
published | SUCCESS | Publish an organization-side record into an app-owned appdata table, visible to every end-user of the app | record_uuid |
failed | FAILURE | Appdata workflow failed | failure_reason |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "appdata.publish-as-app",
"initial_data": {
"organization_uuid": "value",
"identity_app_uuid": "value",
"database_slug": "value",
"table_slug": "value"
}
}