Store an entity from YAML
PUT /Platform/entities/{entity_type}/{entity_id}
Store an entity from YAML.
Two modes, selected by validate:
validate=False(default): a shallow store viacls.store_from_yaml()— reconstruct from YAML (no DB read),_shallow_store_entityon that single entity, no graph traversal. The minimal possible write: exactly the fields in the YAML are written as a new commit on the branch.validate=True: an authoritative store — reconstruct WITH validation (cls.from_yaml_content(validate=True)), store fully, and returncanonical_yamlfor the caller.
If expected_commit_id is supplied, the server performs an
optimistic-concurrency check: the write proceeds only if the
current commit on the branch matches. On mismatch a conflict
error is returned (the entity is NOT overwritten).
Path parameters
entity_type: str. Entity class name.entity_id: str. Entity ID (must match the id field in the YAML).
Body parameters
yaml_content: str. Full YAML content of the entity file.branch: optional str. Hilus branch (defaultmain).expected_commit_id: optional str. If set, reject the write when the server's current commit differs (optimistic lock).validate: optional bool. When True, validate + authoritative store and return canonical YAML; else shallow store.
Returns
EntityPutResponse
entity_id: optional str or null. Id of the stored entity (the minted slug for slug-backed types).slug: optional str or null. Public slug, for slug-backed types.commit_id: optional str or null. The new commit.canonical_yaml: optional str or null. The YAML as stored, when returned.access: optional EntityAccess or null. Access after the write.ignored_changes: optional List[dict]. Requested fields that were not stored (create): path, reason.
Example request
curl -X PUT "https://api.hilus.ai/Platform/entities/{entity_type}/{entity_id}" \
-H "Authorization: Bearer $HILUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'