initial version of rest api