update the api method.