Example Query: Doors in Each Zone
The Insights™ Query Builder is an interactive tool set for creating and executing textual queries that helps you become familiar with the syntax of the Quantum API.
What is the list of doors in each zone?
You can query for a list of doors in your building. For brevity, this procedure assumes you are familiar with the features shown in a previous sample query, using the example site named My First Project which you may have by default in some new accounts.
To query the list of doors in My First Project:
-
In the Query Builder, create this query:
Use the following actions to do so. Make sure to scroll through the whole table:From domain Drag To this tray Site Site object To Building Building object From Site Site object > Name attribute Where
From
select Equal.
Type My First Project.
Click chain
to add a query chain
Building Floor object To Building Floor object > Name attribute Where
From
select Equal.
Type Floor 0.Click chain to add a query chain.
Building Zone object To Building Zone object > Name attribute Where
Click chain to add a query chain.
Building Surface object To Building Surface object > Surface Type attribute Where
Fromselect Equal.
From list select Door. - Click Run Query
to see the list of doors grouped by zone in My First Project.
Query Builder generates the text of the query string for you. You can copy or edit it in the first field of the GraphiQL Query panel, and it is saved in your query History.
query{
sites(where:{name:{isEqualTo:"My First Project"}},){
name
buildings{
ID
floors(where:{name:{isEqualTo:"Floor 0"}},){
ID
name
zones{
ID
name
surfaces(where:{surfaceType:{isEqualTo:"Door"}},){
ID
name
description
locked
isVoid
}
}
}
}
}
}The query results look similar to this example:
More Query Builder examples