Get items with same metadata namspace - possible?

I have a rule that sends me once a day a battery status report. The rule loops trough a group that contains all battery items. To apply the right check on a specific item i added to every battery item metatdata that tells me if it is just a switch or a level.

My question ist now: Is it possible to get a list of all items with a specifiy metadata namespace? With this i could throw away my battery group and use only the metatdata?

Isn’t that possible using the REST API? Under items/get you can set parameters for Tag and/or Metadata.
I don’t use Metadata, so I can’t verify.

Look at the last line of this post…


I think that is the solution