Api method for deleting devices