import requests


def get_stream_UUIDs_and_metadata(smap_root, stream):
    """
        Returns a map of uuid to some metadata (currently just path and timezone)
    """
    query = "select uuid, Properties/Timezone where Path = '{s}'".format(s = stream)
    url = smap_root + "/backend/api/query?"
    
    response = requests.post(url, data = query, verify = False)
    response = response.json()
    uuids_to_metadata = {}
    for stream_data in response:
        uuids_to_metadata[stream_data["uuid"]] = stream_data
        
    return uuids_to_metadata