combined searchByID and seachByName functionality in api