add files for REST API and test it