[api] remove some "similiar" code