Get an entity as YAML
GET /Platform/entities/{entity_type}/{entity_id}
Get an entity as YAML.
Nested entities are always returned as {entity_type, id} stubs —
the YAML format is designed for editing top-level fields only.
Fast path: if _cached_yaml is populated on the row, return it
directly (no entity load, no to_yaml_string()). Falls back to
full load + serialize when the cache column is NULL, and backfills
the row so subsequent reads are fast.
Partial read: pass paths (one path or a JSON list) to return ONLY
those field(s) instead of the whole entity. paths uses the SAME path
selector search reports and edit/patch accept — a JSONPath
($.a.b) or a bare field (a.b / arr). Each path is resolved to
its line span (nearest-ancestor fallback for list-index paths) and only
that slice is returned in yaml_content. Several paths return ALL
the requested slices, concatenated in request order (an unresolvable
one is noted inline as # (no field at <path>)); a single path is
additionally numbered from its full-view line so the numbers match
search/edit coordinates exactly.
Reading a LARGE TEXT FIELD in full (e.g. a long prose or lines-typed
field): a single-field paths read returns the whole field as clean
line-numbered text in one call; search returns only matching
lines, never the full field. Rendering an entity to a media format
(pdf/docx/html) is done by running the type's export tool via
execute_tool.
Response shape note: get returns the entity object at the TOP
LEVEL; list wraps entities in {"items": [...], "total": n}.
Path parameters
entity_type: str. Entity class name.entity_id: str. Entity ID.
Query parameters
branch: optional str. Hilus branch (defaultmain).shallow: optional bool. If true, skip recursive graph traversal (faster).commit_id: optional str. Return a specific historical commit.paths: optional str. If set, project just these field(s) (partial read).values: optional bool. If true, also return the fields as JSON invalues(the whole entity, unabbreviated; withpaths, only the top-level fields they name), for clients without a YAML parser.
Returns
EntityResponse
entity_type: optional str or null. Entity class name.entity_id: optional str or null. Entity id.commit_id: optional str or null. Commit the YAML was read at.yaml_content: optional str or null. The entity as YAML (only the requested fields on a paths read).access: optional EntityAccess or null. Who may read and write the entity; never part of the YAML.computed: optional dict or null. Read-only derived values (live URLs, state), computed per read and never written back.branch: optional str or null. Branch the read was served from.read_branch: optional str or null. The experiment branch whose version handled the live contact that wrote this record: the branch for the experiment group, main for the control group; null when no experiment was involved.view_offset: optional int or null. Line number of the first YAML line in the full view, on a single-path read.values: optional dict or null. The entity's fields as JSON (dtypes as their YAML form), on a values=true read.
Example request
curl -X GET "https://api.hilus.ai/Platform/entities/{entity_type}/{entity_id}" \
-H "Authorization: Bearer $HILUS_API_KEY"