Create or update branch
layerz_update_branchCreates or updates a branch. With dataset_id, patches that branch's metadata (display_name, priority, source_hint, file_name, actuals_through). Without it, the branch named patch.display_name is updated when it exists and created otherwise, with no data source and no input rows (values are then written with layerz_patch { branch_id }). priority is rejected on the default branch. An explicit actuals_through pins the real/forecast cutover (actuals_through_locked: true: source syncs stop rewriting it); null resets it to auto. Returns { branch, created }. Persists one version labelled with summary. Not advertised to read-only keys.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| patch | Yes | ||
| summary | Yes | Short note (3–100 chars) describing the change, stored as the label of the resulting version. Examples: "Renamed Revenue to Net Revenue", "Imported 2024 OPEX from Excel". | |
| model_id | No | Target model UUID. Required for user-scoped API keys; validated against the bound model for model-scoped keys. | |
| dataset_id | No | Branch to update. Absent: the branch named `patch.display_name` is updated when it exists, created otherwise. |