remove reference to api_endpoint and use api_version instead