Get CompoundStructure with Autodesk Forge

I want to obtain the material applied to one face of a wall type in Revit using Autodesk Forge or APS. By downloading the viewer database, I get the materials, but their relation to the wall type is unclear. I have used the AEC Data Model API, but I still haven’t found that relationship. I execute the following query, knowing the name of the applied material:

query GetTipoMuros ($elementGroupId: ID!, $propertyFilter: String!) {
    elementsByElementGroup(
        elementGroupId: $elementGroupId
        filter: { query: $propertyFilter }        
    ) {
        pagination {
            cursor
        }
        results {
            id
            name
            properties {
                results {
                name
                value
                }
            }
            referencedBy(name: "Type") {
                pagination {
                    cursor
                }
                results {
                    id
                    name
                    alternativeIdentifiers {
                        externalElementId
                    }
                    properties {
                        results {
                            name
                            value
                        }
                    }
                }
            }
          
        }
    }
}
{
    "elementGroupId": "URN",
    "propertyFilter": "'property.name.Element Name'=contains="NameMATERIAL""
}

Read more here: Source link