1 Apr 2025

AEC Data Model API: 2 new queries including elementGroupExtractionStatusAtTip and propertyDefinitionsByElementGroup

Default blog image

elementGroupExtractionStatusAtTip

 

We are pleased to inform you about 2 new AEC Data Model queries including elementGroupExtractionStatusAtTip and propertyDefinitionsByElementGroup. Here are some details.

elementGroupExtractionStatusAtTip

This query can be used to retrieve the extraction status of the given elementGroup for the latest version. This query will unblock Power BI and Power Automate workflow to fetch the extraction status and element group from a file urn + project id, there is no need to provide the version as required by query elementGroupExtractionStatus.

Here is a sample query:

query ExtractionStatusAtTip($fileUrn:ID!, $accProjectId:ID! ){
  elementGroupExtractionStatusAtTip(fileUrn:$fileUrn, accProjectId:$accProjectId) {
    status
    details
    elementGroup{
      id
      name
      alternativeIdentifiers{
        fileUrn
        fileVersionUrn
      }
    }
  }
}
{
  "fileUrn":"urn:adsk.wipprod:dm.lineage:nQZrKPDQRUKEE9kfYcGWEA",
  "accProjectId": "b.ddcecd34-68b7-41af-ad65-2ce571186c6c"
}

propertyDefinitionsByElementGroup

Currently, we can only get property Definitions from the object ElementGroup, but this is not easy to discover. Per the request, AEC Data Model provides the top-level query propertyDefinitionsByElementGroup which will help easily get all the property definitions from an ElementGroup.       

ElementGroup

 This query should be easy to use, here is one example:

query PropertyDefinitionsSample($elementGroupId: ID!){
  propertyDefinitionsByElementGroup( elementGroupId: $elementGroupId){
    pagination{
      pageSize
      cursor
    }
    results{
      name
      specification
      id
      description
      units{
        id
        name
      }
      isHidden
      isArchived
      isReadOnly
      shouldCopy
    }
  }
}
{
  "elementGroupId": "YWVjZH42SUpGQXdONExWTG5JZXZiQk5GNU1IX0wyQ35Qc3N0dWhWR1RnYXRFTnAweGF2aUJn" 
}

 

Related Article