Browse the documentation

REST API

External references

Link a line of one Layerz model to a line of another, the way linked Excel workbooks work, then refresh, inspect or unlink it over the REST API.

An external reference makes an assumption mirror a line of another Layerz model: a group model reading each entity's plan, a fund model reading its portfolio. The linked line holds a snapshot of the source series, refreshed on demand.

Method and pathDoes
GET /models/:id/external-refsEvery link with its status (ok, model_missing, item_missing) and whether it is stale
POST /models/:id/external-refsCreate a link, or up to 200 in one call
POST /models/:id/external-refs/refreshRefresh snapshots: all, some uids, or those of one source model
DELETE /models/:id/external-refs/:uidUnlink: the line keeps its values and becomes an ordinary assumption

Form 1

FieldTypeRequiredDescription
source_model_idstringyes
source_uidstringyes
uidstring
parentstring
namestring
timeline_ref"constant" | "monthly" | "yearly" | "quarterly"

Form 2

FieldTypeRequiredDescription
linksobject[]yes

You must be able to read the source model. A refresh that changes values saves a version first, so it can be undone.

Refresh

FieldTypeRequiredDescription
uidsstring[]
source_model_idstring