finished rudimentary implementation of REST API...

... but not yet working.
still needs some refurbishing.