Restructured REST api