First version design for rest api