added data delete function to rest api.