ok. found this post and now it works:
var tReg = osgi.getService('org.openhab.core.thing.ThingRegistry');
tReg.getAll().forEach(thing => console.log("Status:",thing.getLabel()));
I know how to filter if I just want to access things of a specific binding (.filter) which is a string operation. Does anybody know if I can filter directly, i.e. instead of getAll() I am thinking of specifying a bundleId. Is this possible?