Appearance
Filtering
Many resources can be filtered. Filters can be combined and nested.
graphql
query LargeFloors {
getFloors(where: { area: { gte: 3000 } }) {
floors {
id
name
area
}
}
}Building filter
Properties a building can be filtered by:
ts
{
id: Number
name: StringComparator
createdAt: DateComparator
updatedAt: DateComparator
floors: FloorFilter
}Floor filter
Properties a floor can be filtered by:
ts
{
id: Number
area: NumberComparator
name: StringComparator
level: StringComparator
customId: StringComparator
createdAt: DateComparator
updatedAt: DateComparator
spaces: SpaceFilter
elements: ElementFilter
customAttribute: CustomAttributeFilter
label: LabelFilter
isPrivate: Boolean
seatCapacity: SeatCapacityFilter
or: [FloorFilter]
and: [FloorFilter]
}To include archived floors in getFloors results use the top-level archived argument rather than a filter:
graphql
query {
getFloors(archived: true) {
floors {
id
name
isArchived
}
}
}Space filter
Properties a space can be filtered by:
ts
{
id: Number
area: NumberComparator
name: StringComparator
category: StringComparator
subCategory: StringComparator
customId: StringComparator
seatCapacity: NumberComparator
isExternal: Boolean
elements: ElementFilter
customAttribute: CustomAttributeFilter
dimensions: DimensionFilter
boundingBox: BoundingBoxFilter
labelPoint: LabelPointFilter
contour: ContourFilter
count: NumberComparator
or: [SpaceFilter]
and: [SpaceFilter]
}Custom attribute filter
Custom attributes can be filtered by:
ts
{
key: StringComparator
value: StringComparator
title: StringComparator
}Example
graphql
query Floors {
getFloors(where: { customAttribute: { key: { eq: "tenant-id" }, value: { eq: "MKP-01" } } }) {
floors {
id
name
customAttributes {
key
value
title
}
}
}
}space.category and space.subCategory follow Space Taxonomy
Adjacent space grouping filter
Properties a space grouping can be identified by:
ts
{
area: NumberComparator
name: StringComparator
category: StringComparator
subCategory: StringComparator
seatCapacity: NumberComparator
elements: ElementFilter
customAttribute: CustomAttributeFilter
count: Int!
connectivity: Int
adjacentSpaces: AdjacentSpaceFilter
}category and subCategory follow Space Taxonomycount represents a desired number of adjacent spacesconnectivity represents the <= amount of doors between adjacent spacesadjacentSpaces represents related adjacent spaces following Adjacent Space Filter
Example:
"Find a meeting room next to 2 adjacent private offices which are connected through the same corridor (2 doors)."
graphql
query Floors {
getFloors {
floors {
id
name
adjacentSpaces(
where: {
adjacentSpaces: {
count: 1
subCategory: { eq: "meetingRoom" }
adjacentSpaces: { count: 2, connectivity: 2, subCategory: { eq: "privateOffice" } }
}
}
) {
id
name
subCategory
}
}
}
}Adjacent space filter
Properties an adjacent space can be filtered by:
ts
{
area: NumberComparator
name: StringComparator
category: StringComparator
subCategory: StringComparator
seatCapacity: NumberComparator
elements: ElementFilter
customAttribute: CustomAttributeFilter
dimensions: DimensionFilter
boundingBox: BoundingBoxFilter
labelPoint: LabelPointFilter
contour: ContourFilter
count: Int!
connectivity: Int
}category and subCategory follow Space Taxonomycount represents a desired number of adjacent spacesconnectivity represents the <= amount of openings (doors) between adjacent spaces
Element filter
Properties of an element can be filtered by:
ts
{
type: StringComparator
customId: StringComparator
count: NumberComparator
product: ProductFilter
dimensions: DimensionFilter
boundingBox: BoundingBoxFilter
labelPoint: LabelPointFilter
contour: ContourFilter
customAttribute: CustomAttributeFilter
isExternal: Boolean
}Product filter
Properties of a product can be filtered by:
ts
{
name: StringComparator
type: StringComparator
category: StringComparator
subCategory: StringComparator
customAttribute: CustomAttributeFilter
}product.type matches the product type, such as product:static or product:component, and can be combined with the other product filters. For example, filter elements by their product type to return only components:
graphql
query Components {
getFloors {
floors {
elements(where: { product: { type: { eq: "product:component" } } }) {
id
product {
type
category
subCategory
}
}
}
}
}DimensionFilter
ts
{
length: NumberComparator
width: NumberComparator
height: NumberComparator
}Geometry filters
Spaces and elements can be filtered by their geometry. A filter matches against exactly the values the field returns: meters, in floor coordinates, rounded to 0.1 mm.
BoundingBoxFilter compares the corners of the bounding box per axis:
ts
{
min: { x: NumberComparator, y: NumberComparator, z: NumberComparator }
max: { x: NumberComparator, y: NumberComparator, z: NumberComparator }
}LabelPointFilter compares the label point per axis:
ts
{
x: NumberComparator
z: NumberComparator
}ContourFilter tells nodes with a contour from nodes without one:
ts
{
null: Boolean // true keeps what has no contour, false what has one
}Examples
Spaces at least 5 meters long and 4 meters wide:
graphql
query {
getFloors {
floors {
spaces(where: { dimensions: { length: { gte: 5 }, width: { gte: 4 } } }) {
id
name
dimensions {
length
width
}
}
}
}
}Assets inside a rectangle of the floor plan, here x from 10 to 20 and z from -8 to 0:
graphql
query {
getFloors {
floors {
elements(
where: {
type: { eq: "element:asset" }
boundingBox: {
min: { x: { gte: 10 }, z: { gte: -8 } }
max: { x: { lte: 20 }, z: { lte: 0 } }
}
}
) {
id
boundingBox {
min
max
}
}
}
}
}Spaces whose label sits in the left half of the plan, and that have a contour to draw:
graphql
query {
getFloors {
floors {
spaces(where: { labelPoint: { x: { lte: 0 } }, contour: { null: false } }) {
id
labelPoint
contour
}
}
}
}Seat capacity filter
Seat capacity can be filtered by:
ts
{
area: NumberComparator
name: StringComparator
category: StringComparator
subCategory: StringComparator
seatCapacity: NumberComparator
elements: ElementFilter
customAttribute: CustomAttributeFilter
or: [SpaceFilter]
and: [SpaceFilter]
capacity: NumberComparator
}product.category and product.subCategory follows Product Taxonomy
Comparators
You can use the following comparators on string, numeric, and date fields:
String comparator
| Comparator | description |
|---|---|
| eq | Equals the given value |
| neq | Not equal to the given value |
| in | Value is in the given collection of values |
| nin | Value is not in the given collection of values |
| contains | Contains the given value |
Number comparator
| Comparator | description |
|---|---|
| eq | Equals the given value |
| neq | Not equal to the given value |
| lte | Less than or equal to the given value |
| gte | Greater than or equal to the given value |
Date comparator
| Comparator | description |
|---|---|
| eq | Equals the given value |
| neq | Not equal to the given value |
| lte | Less than or equal to the given value |
| gte | Greater than or equal to the given value |
Optional values additionally support the null comparator, which can be used to return entities depending on whether the field has a value or not. The following query will return all floors that don't have a label:
graphql
query FloorsWithNoLabels {
getFloors(filter: { labels: { null: true } }) {
floors {
id
labels {
title
}
}
}
}Filtering by relationship
You can for instance filter for spaces within the floor filter.
"Show me all floors with two meeting rooms"
graphql
query FloorsWithTwoMeetingRooms {
getFloors(where: { spaces: { category: { eq: "meet" }, count: 2 } }) {
floors {
id
name
area
spaces(where: { category: { eq: "meet" } }) {
id
name
category
}
}
}
}You can query for relations of relations
graphql
query FloorsWith {
getFloors(
where: {
spaces: {
category: { eq: "meet" }
elements: {
type: { eq: "element:asset" }
count: 5
product: { category: { eq: "seating" } }
}
}
}
) {
floors {
id
name
area
}
}
}
