# 更新组件数据
PATCH https://api.bimface.com/module/v1/module-data/{moduleDataId}
# 说明
更新组件数据接口可以配合图模联动前端组件一起使用,通过组件可以获取最新的配置信息,参考编辑图模联动 (opens new window)。
# 参数
# Header
Authorization * | Bearer {accessToken} | string |
# Path
moduleDataId | 组件数据ID | integer (int64) |
# Body
moduleType * | 组件类型 | string |
name * | 数据名称 | string |
sources * | 文件列表 | < ModuleDataSourceItem >array |
data * | 组件数据,内容由组件类型确定 | object |
# 响应
HTTP代码 | 说明 | 类型 |
---|---|---|
200 | OK | GeneralResponseV1«ModuleDataResponse» |
204 | No Content | - |
401 | Unauthorized | - |
403 | Forbidden | - |
# 200响应参数
GeneralResponseV1«ModuleDataResponse»
名称 | 说明 | 类型 |
---|---|---|
code | 样例: "success" | string |
data | 返回数据 | ModuleDataResponse |
message | 提示消息 | string |
# 消耗
application/json
# 生成
*/*
application/json
# HTTP请求示例
# 请求 path
https://api.bimface.com/module/v1/module-data/2502450510451488
# 请求 header
"Authorization: Bearer cn-e9725999-0b36-4c0e-bdca-38ea88888888"
# 请求 body
{
"moduleType": "Linkage2D3D",
"name": "图模联动示例",
"sources": [
{
"id": "10000026920081",
"type": "singleModel"
},
{
"id": 10000017500444,
"type": "singleModel"
}
],
"data": {
"version": "1.0",
"model": {
"id": "10000026920081",
"type": "singleModel"
},
"setting": {
"viewType": "2D",
"fileListType": [
"dwg"
]
},
"drawings": [
{
"fileType": "dwg",
"list": [
{
"fileId": 10000017500444,
"fileName": "380321-2D.dwg",
"drawingType": "Plan",
"transformation": [
0.0010000000098127502,
4.004075332842061e-11,
0,
0,
-4.004075332842061e-11,
0.0010000000098127502,
0,
0,
0,
0,
1,
0,
0.000017156508237192725,
-0.00001559684034013742,
0,
1
],
"viewId": 0,
"elevation": {
"type": "Level",
"value": 3500
},
"alignPoint": {
"drawing": [
{
"x": -9326.216864591755,
"y": -6694.28413875471
},
{
"x": 8283.783135408243,
"y": 6195.71537296404
}
],
"model": [
{
"x": -9.326199531555174,
"y": -6.694300174713137,
"z": 4.7
},
{
"x": 8.283800125122069,
"y": 6.19570016860962,
"z": 4.7
}
]
},
"section": {
"isEnabled": true,
"offset": 1200
},
"order": 0
}
],
"unlinkedList": [],
"displayMode": {
"toolbar": {
"drawingToolbars": [
"MainToolbar",
"DrawingList",
"SearchToolbar"
],
"modelToolbars": [
"MainToolbar",
"ModelTree",
"ViewHouse"
]
}
}
}
]
}
}
# HTTP响应示例
# 响应 200
{
"code": "bimfaceservice-0000",
"message": null,
"data": {
"createTime": "2022-11-30T11:28:44.000Z",
"moduleDataId": 2502450510451488,
"moduleType": "Linkage2D3D",
"name": "图模联动示例",
"reason": null,
"status": "success",
"updateTime": "2022-11-14T11:29:08.000Z"
}
}