added deleteapi and tests