Add REST API

It lays down the base for the REST API. For now, it is only bound to models. No validation is made. More work will be needed on that.