Update Hierarchy

LLM-friendly URL
POST
https://api.luzmo.com/0.1.0/hierarchy
API call form
Examples

Hierarchy is a service to update:

  1. Languages (translations) for your column values.

  2. A specific data-driven color for a value.

  3. The hierarchy tree structure of your column values.

1. Column value translations

To be able to set column value translations, it is not required to turn on a specific property on the column first like it is for setting colors or builing a hierarchy structure.

2. Data driven colors

Below is an example of a hierarchy that has custom colors and how it is used in the dashboard. If you want to set data driven colors for values, make sure the column has colors_enabled set to true as shown here . Hierarchy Colors

3. Hierarchy tree structure

If you want to make a tree structure, make sure you set hierarchy_enabled to true on the column as shown here and add the hierarchy levels first using the HierarchyLevel endpoint. This gives you the possibility to drag different levels onto your visualization data slots. The below screenshot shows a hierarchy in the editor and two bar charts that aggregate on different hierarchy levels of the same column. Hierarchy editor

Required role and possible actions

Only dataset modifiers can update the hierarchy of columns of a dataset.

Hierarchy elements are created on update if they do not exist (there is no separate create call). The update action is used both for creating new elements as for updating existing ones. Note that the second argument in the update statement is the column id since updates are done in bulk for a column. hierarchy element ids are places in the objects in the updates array.

The current structure of the hierarchy can be retrieved as a tree via the get call.

Hierarchies are not associated, they are directly targeted towards a specific column upon update or delete.

Virtual vs value elements

There are two types of hierarchy elements:

  • Values: elements that have an 'id' that matches with an existing 'data' value or that will match with a future data value in the column, these are used to override translations/colors/ordering of existing elements or to place the existing value somewhere in the tree structure.

  • Virtuals: elements that are not occurring in the dataset ('virtual elements'), these are categories which are used to build the structure of a tree (value elements can only be placed under virtuals, not under other value elements). The IDs of these virtual elements are UUIDs. Using 'virtuals' as leaf nodes in a tree structure will not have any effect. Upon creation of virtual values ensure to create a new UUID.

Note that a value node can not be a child of another value node, they can only be leaf nodes. That means that the rest of the structure of the tree has to be build using virtuals.

Virtual nodes

Parameters
Expand all Reset
id *UUIDrequired

The unique identifier of the entity

properties *OBJECTrequired
updates ARRAY[OBJECT]
Can be executed by:
Entity Owner
Can be associated to:
Did this page help you?
Yes No
Language
Shell
Node
Java
.NET
Python
PHP
Install
npm install @luzmo/nodejs-sdk
Example Response
200
400
500
{
  "code": 200
}