wip: Add rest api

Close #29
Implements #30 
It's the `if (callback && rsp)` at the end of the function that I had to stare long and hard at.