Implemented API for deleting a device.