prep for api