Skip to content
Proud to collaborate with Microsoft for Startups

data.appdata.structure.apply ​

Apply a validated VirtualDataStructure into appdata catalog metadata and serving-Postgres DDL

Apply a validated VirtualDataStructure into catalog metadata and serving DDL.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-appdata
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Authenticated organization UUID
identity_app_uuiduuidYes—Identity app UUID owning the data
structuredictYes—Serialized VirtualDataStructure declaration
apply_plandictNo—Precompiled appdata metadata apply plan
dry_runbooleanNo—Validate and plan without writing metadata. DEFAULTS TO TRUE: a call that omits this field only simulates and writes nothing. Pass false to apply, and check applied=true in the result.
request_idstringNo—Caller request id for audit correlation
actorstringNo—Workflow caller or agent identifier

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Organization UUID echoed from input
identity_app_uuiduuidYes—Identity app UUID echoed from input
data_structure_namestringYes—Applied data structure name
database_countintegerYes—Number of logical databases planned/applied
table_countintegerYes—Number of logical tables planned/applied
field_countintegerYes—Number of logical fields planned/applied
policy_countintegerYes—Number of policies planned/applied
schema_versionintegerYes—Resulting schema version
appliedbooleanYes—False for dry-run plans
warningslistYes—Non-blocking validation or migration warnings
plan_hashstringYes—Deterministic apply plan hash
plandictYes—Compiled appdata metadata apply plan
applied_atstringNo—ISO-8601 apply timestamp
serving_schemastringNo—Serving Postgres schema name (app_<identity_app_uuid hex>)
serving_sqllistNo—Serving DDL statements compiled for this apply (dry-run and live)
serving_statement_countintegerNo—Number of serving DDL statements
serving_appliedbooleanNo—True when serving DDL was executed on the serving database
failure_reasonstringNo—Engine-stamped failure reason
failed_at_statestringNo—State when the workflow failed
failed_stepstringNo—Failed DAG step name
failed_layerintegerNo—Failed DAG layer index
errorstringNo—Engine-stamped exception message
error_typestringNo—Engine-stamped exception class name

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—completeApply data structure
completedNoYesYes—Applied
failedNoYesNo—Apply failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingcompletecompleted—
pendingfailfailed—

Outcomes ​

OutcomeTypeDescriptionState Data Keys
appliedSUCCESSApply a validated VirtualDataStructure into appdata catalog metadata and serving-Postgres DDLdata_structure_name, schema_version
failedFAILUREAppdata workflow failedfailure_reason

API Usage ​

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

{
  "workflow_type": "data.appdata.structure.apply",
  "initial_data": {
    "organization_uuid": "value",
    "identity_app_uuid": "value",
    "structure": "value"
  }
}