Implemented REST api