English
English
简体中文
Contact Us
Register
Log In

Query Subspaces by Level

Last Updated on : 2022-09-22 09:32:47download

Query subspaces by level.

API address

GET: /v1.0/iot-02/community/space-tree

Request parameter

Parameter nameTypeINRequiredDescription
block_idStringquerytrueThe ID of a community.
meta_codeStringquerytrueThe space type.
  • area: the area.
  • building: the building.
  • unit: the unit.
  • floor: the floor.
  • house: the house.

Return parameter

Parameter nameTypeDescription
resultListThe list of subspaces.

Description of result

Parameter nameTypeDescription
tree_idStringThe ID of a specified space node.
parent_tree_idStringThe ID of a specified parent node.
full_valueStringThe full name.
valueStringThe value.
meta_codeStringThe space type.
childrenListThe list of spaces.

Request example

GET: /v1.0/iot-02/community/space-tree?block_id=137209008403933xxxx

Return example

{
    "fullValue": "Building 1",
    "metaCode": "building",
    "treeId": "136767399153950xxxx",
    "children": [
        {
            "fullValue": "0",
            "metaCode": "unit",
            "treeId": "136711399153950xxxx",
            "parentTreeId": "136767399153950xxxx",
            "value": "Unit 1"
        }
    ],
    "parentTreeId": "136767399153910xxxx",
    "value": "Building 1"
}

Error code

For more information, see error code.