wip: Add rest api

Close #29
Implements #30 
There is no comparison, how can it be a switch?