def api_endpoint_to_host(api_endpoint):
    """
    Returns a likely workable host from just the endpoint.

    This would most likely come up if building from a host directly, without
    any API nodes.

    Input should look like http://foo.bar or https://foo.bar. We just return
    foo.bar.
    """
    return api_endpoint.split('/')[2]
