modify api.html and implement the create view