Creating a class-based REST interface