Changing label root entity, creates a new entity

Which tool versions are you using?

SDK: v14.22
Platform: v24.x.x
Python: v3.13
Isolation mode: venv/docker

Current Behavior

If i change the label of the root entity (which should be only textual) it will create a new entity, which can be used and is visible in the app.
However i cannot delete this entity in the UI or rename it. So i have to manually make an API request or ask Viktor to delete it from the database.

The reason that a new entity is created is due to the create initial entity which had the name equal to the label. So if the label changes, a new entity is created.

Expected Behavior

So basically the behavior is more or less correct. However I cannot:

  • Rename a root entity
  • Delete a root entity.

So the question:
How to rename/delete a root entity through the UI?

Context (optional, but preferred)

Hi Johan,

Thanks for reporting this. It is indeed not possible to change the label of a root entity. So we added this to our internal bug tracker.

I have not come across a lot of cases where this was needed.

A workaround can be to change it via the API.

from viktor.api_v1 import API
api = API(environment=<environment>, token=<PAT>)
api.rename_entity(root_entity_id, new_name, workspace_id=<ws_id>)

Hope this helps. Maarten

Thanks for the reply. I tried to delete the entity using the API however:
{"detail":"Delete not allowed for top level Entity"}

How can I delete this top level entity?

Hi Johan,

Deleting root entities is only done by hand by the backend team, because the potential of losing data or bricking the app is very big. Does the entity has any child entity?

Can you share the following:

  • Environment: bam?
  • workspace id:
  • entity id:

Then i can put in a request to delete the entity.