Link or refresh external reference
layerz_external_refLink this model to an item of ANOTHER Layerz model (external ref, like an Excel linked workbook) by op. link: create (or retarget with uid) a non-list assumption whose values hold a materialized snapshot of the source item's computed series, projected to this model's grain (periods outside the source's coverage stay null); requires read access to the source model; the line is then referenceable in formulas like any assumption. refresh: re-read every linked source (or just uids) and rewrite the snapshots — the ONLY way values update; never automatic; per-link failures (source deleted/inaccessible or item gone) are reported without touching the stored values. Read links with layerz_external_ref_status; detach one with layerz_unlink_external_ref. Not available for read-only API keys.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | link (create/retarget a ref) | refresh (re-sync snapshot values). | |
| uid | No | `link` only: retarget this existing non-list assumption instead of creating one. | |
| name | No | `link` only: display name (defaults to the source item's name). | |
| uids | No | `refresh` only: restrict to these linked items (default: all). | |
| parent | No | `link` create only: parent container uid (section/formula/balance/dashboard). | |
| summary | Yes | Required: short human-readable note (3–100 chars) summarising what this change does. Shown as the label in the model version history. Be specific (e.g. "Renamed Revenue to Net Revenue", "Imported 2024 OPEX from Excel"). | |
| model_id | No | Target model UUID. Required for user-scoped API keys; ignored (or validated against scope) for model-scoped keys. | |
| source_uid | No | `link` only: uid of the source item in that model. | |
| timeline_ref | No | `link` only: grain of the linked line (default: the source's grain when active here, else the finest active grain). | |
| source_model_id | No | `link` only: the model to read from (id from layerz_list_models). |