update the api