First version for rest api design pattern