平台提供空间数据的标准 API,应用可以直接调用获取空间数据,包括从平台获取项目下的建筑列表信息、建筑的楼层信息、建筑的三维模型数据。
从平台获取项目建筑列表
建筑列表接口调用示例:
curl --location 'http://api.dtwin.tencent.com/proxy/f6337246-5d05-42cc-9847-c86a891d7d8f/trpc.bim.bim_data_bus.TBimOpenapiService/getBuildingList' \\--header 'Dtgw-Token: jdRHiDocYZ5mlC7oRHIcvbBln8WdKgEI' \\--header 'Content-Type: application/json' \\--header 'Cookie: x-client-ssid=7410630a:018a406978c2:0f3e1e; x_host_key_access=be18141f50b8f36e3a350aa177b96b6959e157fc_s' \\--data '{"projectId":"1133"}'
接口返回示例:
{"code": 0,"message": "","result": {"buildingProfileList": [{"buildingId": "a12b9a4d-31ff-49d6-b440-9893daabd306","buildingName": "建筑(1)(1)(1)","spaceCode": "000032","longitude": 0.0,"latitude": 0.0,"address": ""},{"buildingId": "df4c4fd9-39f0-4785-a207-d7030cf2c5af","buildingName": "TXDS","spaceCode": "000031","longitude": 113.93478,"latitude": 22.52251,"address": "广东省,深圳市,南山区TXDS"}]},"seq": "a67f83b61c12f97b"}
从平台获取建筑楼层信息
获取构件树接口调用示例:
curl --location 'http://api.dtwin.tencent.com/proxy/cc91abe6-1327-448b-89c9-b6366a650a21/trpc.bim.bim_data_bus.TBimOpenapiService/getElemProfileTree' \\--header 'Dtgw-Token: jdRHiDocYZ5mlC7oRHIcvbBln8WdKgEI' \\--header 'Content-Type: application/json' \\--header 'Cookie: x-client-ssid=7410630a:018a406978c2:0f3e1e; x_host_key_access=be18141f50b8f36e3a350aa177b96b6959e157fc_s' \\--data '{"buildingId":"df4c4fd9-39f0-4785-a207-d7030cf2c5af","elemId":"3ea23f98-aba7-4fb8-9daf-12042f228493","level":"7","spaceTypeCode":"000031034","workspaceId":"1133"}'
获取建筑三维模型
获取建筑三维模型接口参数:
curl --location 'http://api.dtwin.tencent.com/proxy/8a6f13e4-8cfd-434d-861e-dd4e664df926/trpc.bim.bim_data_bus.TBimOpenapiService/getBuildingModel' \\--header 'Dtgw-Token: jdRHiDocYZ5mlC7oRHIcvbBln8WdKgEI' \\--header 'Content-Type: application/json' \\--header 'Cookie: x-client-ssid=7410630a:018a406978c2:0f3e1e; x_host_key_access=be18141f50b8f36e3a350aa177b96b6959e157fc_s' \\--data '{"buildingId":"df4c4fd9-39f0-4785-a207-d7030cf2c5af","workspaceId":"1133"}'