Each NAO Cloud site has 1 or more buildings. Each building has 1 or more floors.
The metadata of each site, building and floor can be retrieved via the REST API.
To get information of all the buildings of the site, use the following API:
GET /api/v2/sites/{siteID}/buildings
Ex:
Request:
curl -X GET --header 'Accept: application/json' --header 'Authorization: zq8aTQt9dxNVeggqq2shB4Wbydabc' 'https://www.nao-cloud.com/api/v2/sites/12095/buildings'
Response:
{ "data": [ { "id": "20538", "type": "building", "attributes": { "id": 20538, "name": "My Building" }, "relationships": { "floors": { "data": [ { "id": "65070", "type": "floor" }, { "id": "65071", "type": "floor" } ] } } } ], "meta": { "pagination": { "current": 1, "records": 1 }, "resource_count": 1 }, "links": { "self": "https://www.nao-cloud.com/api/v2/sites/12095/buildings", "current": "https://www.nao-cloud.com/api/v2/sites/12095/buildings?page[number]=1" } }
To get information of all the buildings of the site, use the following API:
GET /api/v2/sites/{siteID}/buildings/{buildingID}/floors
Ex:
Request:
curl -X GET --header 'Accept: application/json' --header 'Authorization: zq8aTQt9dxNVeggqq2shB4Wbydabc' 'https://www.nao-cloud.com/api/v2/sites/12095/buildings/20538/floors'
Response:
{ "data": [ { "id": "65070", "type": "floor", "attributes": { "id": 65070, "name": "First floor", "level_number": 1, "blueprint_url": "https://s3.amazonaws.com/ncpblps/12095/17600/20538/3d7290cc066c22bda8402fe3eac7b68a/1.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJA4KDXDPQGPIVEUQ%2F20240327%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240327T152253Z&X-Amz-Expires=21600&X-Amz-SignedHeaders=host&X-Amz-Signature=9f28c240c2dfbce7e091ef139c36e26c9d97cc1b97eb744fe911313c07e4c23e", "blueprint_json_url": null, "blueprint_latlonbox": { "north": 43.564392055793, "south": 43.564157999296, "east": 1.387570379, "west": 1.386958959643, "rotation": -18 }, "blueprint_write_url": { "key": "12095/17600/20538/3d7290cc066c22bda8402fe3eac7b68a/1.png", "presigned_url": "https://s3.amazonaws.com/ncpblps/12095/17600/20538/3d7290cc066c22bda8402fe3eac7b68a/1.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJA4KDXDPQGPIVEUQ%2F20240327%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240327T152253Z&X-Amz-Expires=21600&X-Amz-SignedHeaders=host&X-Amz-Signature=70e773e45a0c0f99e6d94f79b94683c7100753261a617f06d3118e9ab031f79f", "expires_in": 21600 }, "relative_altitude": 5, "absolute_altitude": 5, "georeference_info": { "offset_lat": 43.56445502299798, "offset_lon": 1.3870236545857832, "y_lat": -2.3706172167642386e-7, "x_lat": -7.68400169523279e-8, "y_lon": -1.0592636137464154e-7, "x_lon": 3.252205613313173e-7, "lon_x": 2781215.595622457, "lat_x": -1242731.4125593482, "lon_y": -901489.5024149398, "lat_y": -3815497.882978988, "offset_x": 50281304.90847723, "offset_y": 167470473.17759243, "resolution_ppm": 36.19654200836127 } } }, { "id": "65071", "type": "floor", "attributes": { "id": 65071, "name": "Second floor", "level_number": 2, "blueprint_url": "https://s3.amazonaws.com/ncpblps/12095/17600/20538/140f78d1f73b5f81a7d752985ce8ffbf/2.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJA4KDXDPQGPIVEUQ%2F20240327%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240327T152253Z&X-Amz-Expires=21600&X-Amz-SignedHeaders=host&X-Amz-Signature=4b651b1b3a926537b08f4bf2cf1532875f9dce47afedfdeae2755c635e0df0eb", "blueprint_json_url": null, "blueprint_latlonbox": { "north": 43.564389481033, "south": 43.564158751572, "east": 1.38756405714, "west": 1.386961328916, "rotation": -18 }, "blueprint_write_url": { "key": "12095/17600/20538/140f78d1f73b5f81a7d752985ce8ffbf/2.png", "presigned_url": "https://s3.amazonaws.com/ncpblps/12095/17600/20538/140f78d1f73b5f81a7d752985ce8ffbf/2.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJA4KDXDPQGPIVEUQ%2F20240327%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240327T152253Z&X-Amz-Expires=21600&X-Amz-SignedHeaders=host&X-Amz-Signature=5adb510e10e7ea4c2c7466e92796cbe8075887905e157e6da59b5ec712e3db5d", "expires_in": 21600 }, "relative_altitude": 10, "absolute_altitude": 10, "georeference_info": { "offset_lat": 43.56445155318001, "offset_lon": 1.3870251042402562, "y_lat": -2.3369196739085127e-7, "x_lat": -7.57477615406831e-8, "y_lon": -1.0442065145036769e-7, "x_lon": 3.2059765379504636e-7, "lon_x": 2821319.764768581, "lat_x": -1260651.1514972453, "lon_y": -914488.67138115, "lat_y": -3870515.9928650996, "offset_x": 51006334.6740391, "offset_y": 169885325.20172903, "resolution_ppm": 36.718482089538334 } } } ], "links": { "self": "https://www.nao-cloud.com/api/v2/sites/12095/buildings/20538/floors", "current": "https://www.nao-cloud.com/api/v2/sites/12095/buildings/20538/floors?page[number]=1" } }