MCPcopy Create free account
hub / github.com/StackStorm/st2 / get_base_public_api_url

Function get_base_public_api_url

st2common/st2common/util/api.py:31–45  ·  view source on GitHub ↗

Return full public URL to the API endpoint (excluding the API version). :rtype: ``str``

()

Source from the content-addressed store, hash-verified

29
30
31def get_base_public_api_url():
32 """
33 Return full public URL to the API endpoint (excluding the API version).
34
35 :rtype: ``str``
36 """
37 # Note: This is here for backward compatibility reasons - if api_url is not set we fall back
38 # to the old approach (using api listen host and port)
39 if cfg.CONF.auth.api_url:
40 api_url = get_url_without_trailing_slash(cfg.CONF.auth.api_url)
41 else:
42 LOG.warning('"auth.api_url" configuration option is not configured')
43 api_url = "http://%s:%s" % (cfg.CONF.api.host, cfg.CONF.api.port)
44
45 return api_url
46
47
48def get_full_public_api_url(api_version=DEFAULT_API_VERSION):

Callers 2

get_full_public_api_urlFunction · 0.85

Calls 1

Tested by 1