Preview a new entity with its defaults filled in
POST /Platform/entities/scaffold/{entity_type}
Preview a new entity with its defaults filled in. Instantiates entity_type with the given field values, fills defaults, and returns the full YAML WITHOUT persisting and WITHOUT running any allocate side effects.
Uses the bare constructor cls(**field_values) — NOT
cls.allocate(...). allocate performs side-effecting creation
(external provisioning) and stores the entity; a preview must not
trigger those side effects. The preview only needs field defaults,
which the constructor provides. Real creation goes through create
(which routes allocate-requiring types through their provision+store
funnel) or the allocate operation.
The returned YAML is correctly serialized/quoted and serves as a
starting template for subsequent editing and create. Hand-edited
prose fields must stay validly quoted: any scalar containing a colon,
a leading #/-/?, or a line wrap needs single quotes
(doubling inner single quotes), since an unquoted multi-line value
ending a continuation line in : fails the YAML parser on
create. validate checks candidate YAML without writing.
Path parameters
entity_type: str. Entity class name to scaffold.
Body parameters
field_values: optional dict. Optional field values to seed the instance with; the rest are filled from defaults. Returns YAML only (no persist).
Returns
ScaffoldEntityResponse
yaml_content: optional str or null. The entity as YAML, ready to edit and create.
Example request
curl -X POST "https://api.hilus.ai/Platform/entities/scaffold/{entity_type}" \
-H "Authorization: Bearer $HILUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'