def get_api_fqdn(gitlab_repo):
    """
    Determine if the provided GitLab repo object refers to a hosted
    GitLab instance or to publically hosted gitlab.com, and
    indicate what base FQDN to use for API requests.
    """
    if gitlab_repo.fqdn[-10:] == "gitlab.com":
        return False, "api.gitlab.com"
    return True, gitlab_repo.fqdn