initial REST api with unit tests