Browse the documentation

REST API

Lists

REST endpoints for the lists of a Layerz model, the registries of departments, products or tranches that list-mode lines expand over.

A list is a named registry of elements that lines expand over. See Lists.

Method and pathDoes
GET /models/:id/listsEvery list with its elements
POST /models/:id/listsCreate a list (idempotent by name)
GET /models/:id/lists/:listIdOne list
PATCH /models/:id/lists/:listIdRename it, relabel or remap elements
DELETE /models/:id/lists/:listIdDelete it; bound lines lose their list and per-element values

Create

FieldTypeRequiredDescription
display_namestring
itemsobject[]
{
  "display_name": "Departments",
  "items": [{ "label": "Sales" }, { "label": "Product" }, { "label": "G&A" }]
}

A second call with the same name returns the existing list. A list holds at most 500 elements.

Update

FieldTypeRequiredDescription
display_namestring
itemsobject[]

mapped_to on an element links it to elements of another list, read by subscripts such as Repayment[`Banks`]. Removing an element drops its series on every line bound to the list.