Added functions to api controllers for get by id and put data.