def get_base_public_api_url():
    """
    Return full public URL to the API endpoint (excluding the API version).

    :rtype: ``str``
    """
    # Note: This is here for backward compatibility reasons - if api_url is not set we fall back
    # to the old approach (using api listen host and port)
    if cfg.CONF.auth.api_url:
        api_url = get_url_without_trailing_slash(cfg.CONF.auth.api_url)
    else:
        LOG.warning('"auth.api_url" configuration option is not configured')
        api_url = "http://%s:%s" % (cfg.CONF.api.host, cfg.CONF.api.port)

    return api_url

    Return full public URL to the API endpoint (excluding the API version).

    :rtype: ``str``
    
st2common/st2common/util/api.py