server api cleanup