Query Space Hierarchy

Query Request

Using a valid authorization token run the below query to get the Space Hierachy information: From your app or API client use the below URL.  URL: https://api.abound.carrier.io/prod-ahs-api/graphql/

Argument: The argument for getNodeByType is Type and can either be Site or Building

Query Response

As building is the specified type in the query, the response retrieves information about the assigned building(s), including details such as the building ID and address. The hasPart segment of the query is used to gather information about the spaces associated with the building(s).

QUERY
                    
                      {
getNodeByType(type: Building) {
id
name
address {
street
city
state
}
hasPart {
space {
id
name
brickClass
hasPart {
space {
id
name
}
}
}
}
}
}
RESPONSE
                    
                      {
"data": {
"getNodeByType": [
{
"id": "d3f2a1b6",
"name": "Building A",
"address": {
"street": "123 Main St",
"city": "Springfield",
"state": "IL"
},
"space": {
"id": "e4d3c2b1",
"name": "Second Floor",
"brickClass": "Floor",
"hasPart": [
{
"space": {
"id": "c3d2a1b4",
"name": "Office 201"
}
},
{
"space": {
"id": "d4c3b2a1",
"name": "Break Room 202"
}
}
]
}
}
]
}
}