Corrected REST api based on Django Rest Framework