Read model snapshot
layerz_readRead model snapshot (items + optional computed values). Filter by UIDs or roles. Pass with_values=true to compute. If the response leads with computable: false, the DAG is broken (see errors[], e.g. CIRCULAR_DEPENDENCY): every series is a degenerate zero-fill — fix the model before reasoning on values.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uids | No | Filter by item UIDs | |
| roles | No | Filter by role | |
| health | No | Also return the `health` block: non-blocking business-monitor violations. Monitors are evaluated at the finest active grain. `with_values: true` already includes `health` when the model has monitors; set this to get `health` without the full value series. | |
| periods | No | Period labels to scope values to | |
| model_id | No | Target model UUID. Required for user-scoped API keys; ignored (or validated against scope) for model-scoped keys. | |
| variance | No | Also return the variance series `vv` (stacked-all view − base baseline), aligned with `v`. Requires with_values. | |
| branch_id | No | Compute values under a single branch's `[base, branch]` checkout instead of the stacked-all view — lets you audit base-vs-overlay (e.g. confirm the budget on the base, or what one branch changed). Pass `default` for the base plan alone. Requires with_values. | |
| granularity | No | Grain for `v`/`p` when no explicit `periods` are given. 'native' = finest active dated grain (monthly>quarterly>yearly). Default: 'yearly'. Ignored when `periods` are provided (each label resolves its own grain). | |
| per_element | No | Also return `ve`: per-element series for list-mode items, keyed `ve[itemUid][elementLabel]` and aligned with `p` (e.g. payroll split by Business Unit). Without it, `v` only carries the aggregate. Requires with_values. | |
| with_values | No | Compute and return values for matched items | |
| include_lists | No | Which named lists to embed in `model.lists`: 'referenced' (default — only lists used by the returned items via liste_ref), 'all', or 'none'. | |
| include_children | No | Include descendants of filtered containers |