create api route for restful