View a site detail


GET /v4/sites/{siteId}
Parameters
siteId
uuid required
-
Request #1
Headers
Content-Type application/json
Accept application/json
Authorization Bearer `Your Access Token`

Response 201

Headers
Content-Type application/json
{
    "id": "eb36320d-7573-4e1f-a0ed-cf8a3e07f1bc",
    "name": "Test site",
    "rooms": [
        {
            "id": "1762a6d8-e4d7-4433-ba79-94d7d451e374",
            "name": "Bathroom",
            "spaceId": "8ed8a0ab-7d7c-4a39-9ab0-3b27d33a9a31"
        },
        {
            "id": "463827e8-1986-4ca4-a389-2d461044af42",
            "name": "Bedroom",
            "spaceId": "8ed8a0ab-7d7c-4a39-9ab0-3b27d33a9a31"
        }
    ],
    "floors": [
        {
            "id": "aa6c8ed9-4dcd-4e68-bc19-c7c2ebcd3352",
            "name": "1"
        }
    ],
    "scenes": [
        {
            "id": "1ba69c99-e549-4fa6-aa21-b614d020e8ff",
            "name": "Scene #1",
            "spaceId": "8ed8a0ab-7d7c-4a39-9ab0-3b27d33a9a31",
            "applyList": [
                {
                    "state": {
                        "on": true,
                        "bri": 255
                    },
                    "objectId": "1cb81bea-e85c-4e96-aea4-ede36b09243d"
                },
                {
                    "state": {
                        "on": true,
                        "bri": 255
                    },
                    "objectId": "220cf5fa-8081-4679-9d26-7fdfdea0e511"
                },
                {
                    "state": {
                        "on": true,
                        "bri": 255
                    },
                    "objectId": "69283ac1-27e8-4c28-ab63-9f5ea0221604"
                },
                {
                    "state": {
                        "on": true,
                        "bri": 255
                    },
                    "objectId": "993c6440-a73d-4845-8f6e-4fcda0284c28"
                }
            ]
        }
    ],
    "spaces": [
        {
            "id": "0da81127-2b2d-49c1-877e-124e7c7c68b4",
            "name": "102",
            "floorId": "aa6c8ed9-4dcd-4e68-bc19-c7c2ebcd3352"
        },
        {
            "id": "8ed8a0ab-7d7c-4a39-9ab0-3b27d33a9a31",
            "name": "101",
            "floorId": "aa6c8ed9-4dcd-4e68-bc19-c7c2ebcd3352",
            "template": "ABC"
        }
    ],
    "objects": [
        {
            "id": "1cb81bea-e85c-4e96-aea4-ede36b09243d",
            "name": "Mirror lights",
            "type": "light",
            "roomId": "1762a6d8-e4d7-4433-ba79-94d7d451e374",
            "capabilities": [],
            "attachedResources": [
                "84121591-94fd-5a8b-bbb2-bad9be5d7dc9"
            ]
        },
        {
            "id": "220cf5fa-8081-4679-9d26-7fdfdea0e511",
            "name": "Reading lights",
            "type": "light",
            "roomId": "463827e8-1986-4ca4-a389-2d461044af42",
            "capabilities": [],
            "attachedResources": []
        },
        {
            "id": "69283ac1-27e8-4c28-ab63-9f5ea0221604",
            "name": "Downlights",
            "type": "light",
            "roomId": "463827e8-1986-4ca4-a389-2d461044af42",
            "capabilities": [],
            "attachedResources": []
        },
        {
            "id": "993c6440-a73d-4845-8f6e-4fcda0284c28",
            "name": "Downlights",
            "type": "light",
            "roomId": "1762a6d8-e4d7-4433-ba79-94d7d451e374",
            "capabilities": [],
            "attachedResources": []
        }
    ],
    "gateways": [
        {
            "id": "a14544a0-b019-41f8-b566-ab69df447399",
            "name": "",
            "balenaDeviceUuid": "00000000000000000000000000000000"
        }
    ],
    "revision": 26,
    "resources": [
        {
            "id": "4b76e2e3-a317-54ce-b6cd-f00fc34c598f",
            "type": "motionSensor",
            "address": "03043783",
            "network": "05a719",
            "protocol": "wirepas",
            "firmwareVersion": "0.0.1",
            "bleReceiverEnabled": false
        },
        {
            "id": "5a7e8026-e98b-5d5f-8ea6-c4701dc556cc",
            "type": "actuator",
            "address": "03043785",
            "network": "05a719",
            "protocol": "wirepas",
            "capabilities": [
                "dimmable"
            ],
            "firmwareVersion": "1.1",
            "bleReceiverEnabled": false
        },
        {
            "id": "84121591-94fd-5a8b-bbb2-bad9be5d7dc9",
            "type": "actuator",
            "address": "03043786",
            "network": "05a719",
            "protocol": "wirepas",
            "capabilities": [
                "dimmable"
            ],
            "firmwareVersion": "1.00.05",
            "attachedObjectId": "1cb81bea-e85c-4e96-aea4-ede36b09243d",
            "bleReceiverEnabled": false
        },
        {
            "id": "9daf4f0c-a350-5691-bb06-13b318a111c5",
            "type": "actuator",
            "address": "03043783",
            "network": "05a719",
            "protocol": "wirepas",
            "capabilities": [
                "dimmable"
            ],
            "firmwareVersion": "1.0.0",
            "bleReceiverEnabled": false
        },
        {
            "id": "dfe63963-fe18-5f1a-b98b-141d3aded88e",
            "type": "actuator",
            "address": "03043784",
            "network": "05a719",
            "protocol": "wirepas",
            "capabilities": [
                "dimmable"
            ],
            "firmwareVersion": "1.10.0",
            "bleReceiverEnabled": false
        }
    ]
}
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "revision": {
      "type": "number"
    },
    "rooms": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "spaceId": {
                "type": "string"
              },
              "linkedRoomId": {
                "type": "string"
              }
            }
          }
        ]
      }
    },
    "floors": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          }
        ]
      }
    },
    "scenes": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "spaceId": {
                "type": "string"
              },
              "applyList": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "objectId": {
                          "type": "string"
                        },
                        "state": {
                          "type": "object",
                          "properties": {
                            "on": {
                              "type": "boolean"
                            },
                            "bri": {
                              "type": "number"
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        ]
      }
    },
    "spaces": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "floorId": {
                "type": "string"
              }
            },
            "allOf": [
              {
                "oneOf": [
                  {
                    "properties": {
                      "template": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "properties": {
                      "linkedSpaceId": {
                        "type": "string"
                      }
                    }
                  }
                ]
              }
            ]
          }
        ]
      }
    },
    "objects": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "type": {
                "enum": [
                  "light",
                  "switch",
                  "motionSensor",
                  "doorSensor"
                ]
              },
              "roomId": {
                "type": "string"
              },
              "materials": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "amount": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                }
              },
              "bleScanner": {
                "type": "boolean"
              },
              "attachedResources": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    }
                  ]
                }
              }
            }
          }
        ]
      }
    },
    "gateways": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "balenaDeviceUuid": {
                "type": "string"
              }
            }
          }
        ]
      }
    },
    "resources": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "type": {
                "enum": [
                  "actuator",
                  "motionSensor",
                  "switch"
                ]
              },
              "address": {
                "type": "string"
              },
              "network": {
                "type": "string"
              },
              "protocol": {
                "enum": [
                  "wirepas",
                  "ble"
                ]
              },
              "firmwareVersion": {
                "type": "string"
              },
              "bleReceiverEnabled": {
                "type": "boolean"
              },
              "capabilities": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    }
                  ]
                }
              },
              "attachedObjectId": {
                "type": "string"
              }
            }
          }
        ]
      }
    }
  }
}