def get_all_tags(image_name, branch=None):
    """
    GET /v1/repositories/<namespace>/<repository_name>/tags

    :param image_name: The docker image name
    :param branch: The branch to filter by
    :return: A list of Version instances, latest first
    """
    try:
        return get_all_tags_no_auth(image_name, branch)
    except AuthException:
        return get_all_tags_with_auth(image_name, branch)