I don't think that swaggerized API description is a playbed.
If you want to do REST, you have to design a URL patern, so you can reliably parse them and split "floor / room \ subroom / item" when parsing the URL.
I think the code to work with mail inside of webcit is sophisticated enough to void the aproach of rewriting that in _javascript_.
But if you want to render mails via _javascript_, we have a json template, which you could use to easily get mails in a way the browser js can learn about it.
