Limit/hide shapes for diagram editor

Hello
I wanted to know if there is a method to hide several shapes or I had to do something like:
$(’[dhx_id=“database”]’).hide()
to each shape

Unfortunately there is no API to hide the shapes in the diagram editor.