Appian Community and Appian Academy are being upgraded. From July 24–August 3, the Appian Community will be in read-only mode. During this time, the site will be read-only and user registration will be disabled. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

Get all Application objects and their respective UUID

Certified Associate Developer

Is there a way to get the list of all application objects we have in Appian via expression rule? I want the create a csv file with all objects and their corresponding UUID.


  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Associate Developer

    Thank you everyone for your insights. This is how I was able to obtain the UUIDs and respective object name:

    pip install lxml
    from lxml import objectify
    from lxml import etree
    import xml.etree.ElementTree as ET
    import pandas as pd
    
    def parse_element(element, item, uuid_map):
        # If the element has no children, store its text
        if len(list(element)) == 0:
            item[element.tag] = element.text
        else:
            # Special handling for <item> elements with <type> and <uuids>
            if element.tag == "item":
                type_value = None
                uuids = []
    
                for child in element:
                    if child.tag == "type":
                        type_value = child.text
                    elif child.tag == "uuids":
                        uuids = [uuid.text for uuid in child.findall("uuid")]
    
                if type_value and uuids:
                    uuid_map[type_value] = uuids
    
            # Continue recursion
            for child in element:
                parse_element(child, item, uuid_map)
                
    
    tree = etree.parse("xmlfilepath.xml") #Put the path of your xml path
    root = tree.getroot()
    
    item = {}
    uuid_map = {}
    
    parse_element(root, item, uuid_map)
    
    print("Flat data:", item)
    print("UUIDs by type:", uuid_map)
    
    #Create the dataframe:
    rows = []
    for key, values in uuid_map.items():
        for value in values:
            rows.append({'Key': key, 'Value': value})
    
    df = pd.DataFrame(rows)
    
    #Export the dataframe to csv:
    df.to_csv('uatUUID.csv', index = False)

Reply
  • +1
    Certified Associate Developer

    Thank you everyone for your insights. This is how I was able to obtain the UUIDs and respective object name:

    pip install lxml
    from lxml import objectify
    from lxml import etree
    import xml.etree.ElementTree as ET
    import pandas as pd
    
    def parse_element(element, item, uuid_map):
        # If the element has no children, store its text
        if len(list(element)) == 0:
            item[element.tag] = element.text
        else:
            # Special handling for <item> elements with <type> and <uuids>
            if element.tag == "item":
                type_value = None
                uuids = []
    
                for child in element:
                    if child.tag == "type":
                        type_value = child.text
                    elif child.tag == "uuids":
                        uuids = [uuid.text for uuid in child.findall("uuid")]
    
                if type_value and uuids:
                    uuid_map[type_value] = uuids
    
            # Continue recursion
            for child in element:
                parse_element(child, item, uuid_map)
                
    
    tree = etree.parse("xmlfilepath.xml") #Put the path of your xml path
    root = tree.getroot()
    
    item = {}
    uuid_map = {}
    
    parse_element(root, item, uuid_map)
    
    print("Flat data:", item)
    print("UUIDs by type:", uuid_map)
    
    #Create the dataframe:
    rows = []
    for key, values in uuid_map.items():
        for value in values:
            rows.append({'Key': key, 'Value': value})
    
    df = pd.DataFrame(rows)
    
    #Export the dataframe to csv:
    df.to_csv('uatUUID.csv', index = False)

Children
No Data