wip: Add rest api

Close #29
Implements #30 
This could use a comment.. took me a bit to realize this was collecting the body to turn it into an error message.