获取对比结果_文档_BIMFACE_BIM应用二次开发平台

API:获取模型对比结果

GET https://api.bimface.com/data/compare

根据模型对比ID,获取模型对比结果


请求(Request)

Header
key value 示例
Authorization bearer {accessToken} bearer xxxx-xxxx-xxxx-xxxx
Content-Type application/json
Url Parameter
字段 类型 必填 描述 示例
compareId Number Y 模型对比Id
Request Body

curl -X GET
-H "Authorization: bearer <your accessToken>"
-H "Content-Type: application/json"
"https://api.bimface.com/data/compare?compareId=<your compareId>"

响应(Response)

HTTP STATUS

200

成功返回
{
    "code": "success",
    "message": null,
    "data": [{
        "specialtyId": "",
        "specialtyName": "",
        "itemCount": 1,
        "categories": [{
            "categoryId": "",
            "categoryName": "",
            "itemCount": 1,
            "elements": [{
                "diffType": "NEW|DELETE|CHANGE",
                "name": "柱1",
                "previousFileId": 8761243914,
                "previousElementId": "918347",
                "followingFileId": 876149317,
                "followingElementId": "1348010"
            }]
        }]
    }]
 }
字段 类型 描述 示例
compareId Number 对比ID 85929027838566
sepecialtyId String 对比差异构件所属专业ID
specialtyName String 对比差异构件所属专业名称
itemCount String 所包含差异构件的数量
categories.categoryId String 对比差异构件所属类别ID 2015-08-08 12:23:11
categories.categoryName String 对比差异构件所属类别名称
categories.elements.differType String 对比差异构件差异类型 NEW、DELETE、CHANGE
categories.elements.name String 对比差异构件名称
categories.elements.previousFileId Number 对比差异构件来源文件ID
categories.elements.previousElementId String 对比差异构件来源构件ID
categories.elements.followingFileId Number 对比差异构件变更文件ID
categories.elements.followingElementId String 对比差异构件互为变更构件ID
失败返回
{
    "code": "authentication.failed",
    "message": "Token was not recognized."
}
错误码
code 说明
system.error BIMFACE系统异常
authentication.failed API访问合法性校验失败
compare.failed 对比失败