Something like this should work now. Still internal api!
import ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.server.ServerConfig;
import ch.ivyteam.di.restricted.DiCore;
ServerConfig config = DiCore.getGlobalInject.getInstance(ServerConfig);DiCore.getGlobalInjector().getInstance(ServerConfig);
String url = config.getServerUrl(); // returns bundled- or external server url.