def get_zones(account_number):
    """
    Retrieve authoritative zones from the PowerDNS API and return a list of zones

    :param account_number:
    :raise: Exception
    :return: list of Zone Objects
    """
    _check_conf()
    server_id = current_app.config.get("ACME_POWERDNS_SERVERID", "localhost")
    path = f"/api/v1/servers/{server_id}/zones"
    zones = []
    function = sys._getframe().f_code.co_name
    log_data = {
        "function": function
    }
    try:
        records = _get(path)
        log_data["message"] = "Retrieved Zones Successfully"
        current_app.logger.debug(log_data)

    except Exception as e:
        capture_exception()
        log_data["message"] = "Failed to Retrieve Zone Data"
        current_app.logger.debug(log_data)
        raise

    for record in records:
        zone = Zone(record)
        if zone.kind == 'Master':
            zones.append(zone.name)
    return zones

    Retrieve authoritative zones from the PowerDNS API and return a list of zones

    :param account_number:
    :raise: Exception
    :return: list of Zone Objects
    
lemur/plugins/lemur_acme/powerdns.py