I am using the AEC Data Model Explorer and I am able to retrieve Elements by a Category (Rooms) and return most of the parameter results, but I am unable to get the Phase even when not determining any specific properties.
Here is the code that I am using.
query GetElementsFromCategory {
elements(
designId: "WORKING DESIGN ID"
filter: {query: "property.name.category=='Rooms' and 'property.name.Element Context'==Instance"}
) {
pagination {
cursor
}
results {
properties{
results{
name
}
}
}
}
}
Results are returned similar to below, but there isn't a Phase property.
{
"data": {
"elements": {
"pagination": {
"cursor": null
},
"results": [
{
"properties": {
"results": [
{
"name": "Comments"
},
{
"name": "Edited by"
},
{
"name": "Workset"
},
{
"name": "External ID"
},
{
"name": "Export to IFC"
},
{
"name": "Export to IFC As"
},
{
"name": "IFC Predefined Type"
},
{
"name": "IfcGUID"
},
{
"name": "Family Name"
},
{
"name": "Element Name"
},
{
"name": "Element Context"
},
{
"name": "Revit Element ID"
},
{
"name": "Area"
},
{
"name": "Computation Height"
},
{
"name": "Department"
},
{
"name": "Base Finish"
},
{
"name": "Ceiling Finish"
},
{
"name": "Floor Finish"
},
{
"name": "Wall Finish"
},
{
"name": "Unbounded Height"
},
{
"name": "Base Offset"
},
{
"name": "Name"
},
{
"name": "Number"
},
{
"name": "Occupancy"
},
{
"name": "Perimeter"
},
{
"name": "Limit Offset"
},
{
"name": "Volume"
}
]
}
}
]
}
}
}
Is there a way to get to this information or another reference by call that I can make to get it?
EDIT for results after the answer provided below.
"references": {
"results": [
{
"name": "Upper Limit",
"displayValue": "LEVEL 1",
"value": {
"id": "this item id"
}
},
{
"name": "Level",
"displayValue": "LEVEL 1",
"value": {
"id": "this item id"
}
},
{
"name": "Phase",
"displayValue": "New Construction",
"value": {
"id": "this item id"
}
}
]
}
Phase being a reference property, can be retrieved using 'reference' as seen below:
query GetElementsFromCategory {
elements(
designId: "WORKING DESIGN ID"
filter: {query: "property.name.category=='Rooms' and 'property.name.Element Context'==Instance"}
) {
pagination {
cursor
}
results {
properties{
results{
name
value
}
}
references{
results{
name
displayValue
value{
id
}
}
}
}
}
}