initial version of the rest api