Buildings
Buildings and spaces
Retrieve all buildings in your organization.
Authorization
ApiKeyAuth Bearer token with your API key. Example: Bearer sk_live_xxx
In: header
Response Body
application/json
curl -X GET "https://example.com/buildings"{
"recType": "building-collection",
"items": [
{
"id": "bld_xyz",
"recType": "building",
"name": "Kirurgavd.",
"address": "Storgatan 1",
"country": "SE",
"type": "healthcare",
"floors": 3,
"createdAt": "2024-01-15T08:00:00.000Z"
}
],
"totalItems": 1
}Retrieve a single building by ID, including its spaces.
Authorization
ApiKeyAuth Bearer token with your API key. Example: Bearer sk_live_xxx
In: header
Path Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/buildings/string"{
"id": "string",
"recType": "building",
"name": "string",
"address": "string",
"country": "string",
"type": "string",
"floors": 0,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"spaces": [
{
"id": "string",
"recType": "space",
"name": "string",
"floor": 0,
"buildingId": "string"
}
]
}{
"success": false,
"message": "Invalid or inactive API key"
}Retrieve observations for all assets in a building. Results are grouped by assetId and sorted by assetId. No cross-asset aggregation is applied.
Authorization
ApiKeyAuth Bearer token with your API key. Example: Bearer sk_live_xxx
In: header
Path Parameters
Query Parameters
ISO date (YYYY-MM-DD). Default: 30 days ago
ISO date. Default: today
hourly supports max 30 days range
Max number of assets returned
Same as nextCursor from the previous response: raw asset document ID, pass verbatim.
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/buildings/string/observations"{
"recType": "building-observation-collection",
"buildingId": "bld_xyz",
"resolution": "daily",
"items": [
{
"recType": "observation-collection",
"assetId": "asset-1AbcDeF2GhiJkL",
"resolution": "daily",
"items": [
{
"timestamp": "2024-05-20T00:00:00.000Z",
"waterTempMin": 52.1,
"waterTempMax": 61.3,
"waterTempAvg": 56.8,
"flushCount": 3
}
],
"totalItems": 1
}
],
"totalItems": 1,
"nextCursor": "asset-1AbcDeF2GhiJkL"
}{
"success": false,
"message": "Invalid or inactive API key"
}{
"success": false,
"message": "Invalid or inactive API key"
}Var den här guiden bra?