获取集成模型的构件层次结构_文档_BIMFACE_BIM应用二次开发平台

API:获取集成模型的构件层次结构

GET https://api.bimface.com/data/integration/tree

模型集成以后,可以获取两种构件的层次结构:1)按专业视图;2)按楼层视图


请求(Request)

Header
key value 示例
Authorization bearer {accessToken} bearer xxxx-xxxx-xxxx-xxxx
Content-Type application/json
Url Parameter
字段 类型 必填 描述 示例
integrateId Number Y 集成ID
treeType Number Y 树类型:1(按专业视图)2(按楼层视图) 1, 2
Request Body

curl -X GET 
-H "Content-Type: application/json" 
-H "Authorization: bearer <your accessToken>" 
"https://api.bimface.com/data/integration/tree?integrateId=<your integrateId>&treeType=<your treeType>"

响应(Response)

HTTP STATUS

200

成功返回
treeType = 1
{
    "code":"success",
    "message":null,
    "data":{
        "treeType":1,
        "tree":[
            {
                "specialty":"建筑",
                "floors":[
                    {
                        "floor":"B02",
                        "categories":[
                            {
                                "categoryId":"-2000032",
                                "categoryName":"柱子",
                                "families":[
                                    {
                                        "family":"矩形",
                                        "familyTypes":[
                                            "400x400"
                                        ]
                                    }
                                ]
                            }
                        ]
                    }
                ]
            }
        ]
    }
}

treeType = 2
{
    "code":"success",
    "message":null,
    "data":{
        "treeType":2,
        "tree":[
            {
                "floor":"B02",
                "specialties":[
                    {
                        "specialty":"建筑",
                        "categories":[
                            {
                                "categoryId":"-2000032",
                                "categoryName":"柱子",
                                "families":[
                                    {
                                        "family":"矩形",
                                        "familyTypes":[
                                            "400x400"
                                        ]
                                    }
                                ]
                            }
                        ]
                    }
                ]
            }
        ]
    }
}
字段 类型 描述 示例
treeType Number 树类型:1(按专业视图)2(按楼层视图) 1, 2
tree Tree
tree.specialty String 专业名称
tree.floors Floor[] 楼层列表
tree.floor String 楼层名称
tree.specialties Specialty[] 专业列表
{x}.categories Category[] 构件分类列表
{x}.categories.categoryId String 构件分类ID -2000032
{x}.categories.categoryName String 构件分类名称 柱子
{x}.categories.families Family[] 当前构件分类下所有的族
{x}.categories.families.family String 构件对应族的族名称 矩形
{x}.categories.families.familyTypes String[] 当前族下的所有族类型
失败返回
{
    "code": "authentication.failed",
    "message": "Token was not recognized."
}
错误码
code 说明
system.error BIMFACE系统异常
authentication.failed API访问合法性校验失败
data.not.found 找不到数据