Builder APIGuides
Rooms and their temperatures
List the rooms of a building and the latest reading of each room's temperature sensor.
Two calls give you every room in a building with its current temperature.
buildingId comes from buildings.list. Check the type keys
with resourceTypes.list first: they differ per tenant (see Resources and points).
1. The rooms of the building
const { related: rooms } = await relynk('/resources.related/v1', {
fromIds: [buildingId],
relationship: 'brick_Has_Part',
maxDepth: 2,
targetTypeKeys: ['rec_Room']
});brick_Has_Part with maxDepth: 2 walks building → levels → rooms, and targetTypeKeys keeps
only the rooms. See Relationships.
2. Their temperature sensors
const { points } = await relynk('/points.list/v1', {
resourceIds: rooms.map((room) => room.id),
typeKeys: ['brick_Temperature_Sensor']
});What you get back
points[i].resourceIdsnames the room the sensor belongs to.points[i].latest.valueis the newest reading.latestisnullwhen the sensor has no reading yet: show it as missing, never as 0.
Passing the rooms' ids as resourceIds matters: a type key with only a buildingId would also
match temperature sensors on air handling units and outdoors.