wip: Add rest api

Close #29
Implements #30 
There's a fair number that are done like this, more than on the top, I'd rather not mess with this.