Completed API implementation of delete action