add and test basis of rest api