Implement the rest end points