如何通过bim360 api或sdk下载计划pdf文件?

时间:2019-03-25 12:25:31

标签: autodesk-forge autodesk-bim360

根据文档(https://forge.autodesk.com/en/docs/data/v2/tutorials/download-file/) 我应该从included.relationships.storage.data.id获取存储对象ID。 我可以对上传到bim360的所有文件(计划pdf文件除外)执行此操作。 整个响应都与“存储”无关。

我的回复中“包含”:

''' “包含”:[         {             “ type”:“版本”,             “ id”:“ XXX”,             “属性”:{                 “ name”:“ 1ST平面图”,                 “ displayName”:“一楼平面图”,                 “ createTime”:“ 2019-01-10T09:19:16Z”,                 “ createUserId”:“ 3MYGKJ73V3SD”,                 “ createUserName”:“ XXX”,                 “ lastModifiedTime”:“ 2019-01-10T09:19:19Z”,                 “ lastModifiedUserId”:“ XXX”,                 “ lastModifiedUserName”:“ XXX”,                 “ versionNumber”:1                 “延期”: {                     “ type”:“版本:autodesk.bim360:Document”,                     “ version”:“ 1.0”,                     “模式”:{                         “ href”:“ https://developer.api.autodesk.com/schema/v1/versions/versions:autodesk.bim360:Document-1.0”                     },                     “数据”:{                         “ processState”:“ PROCESSING_COMPLETE”,                         “ viewableId”:“ 1”,                         “ viewableGuid”:“ XXX”,                         “ viewableName”:“(1)”,                         “ viewableOrder”:1                         “ sourceFileName”:“ A1-1 DIMS第一层尺寸计划_V1_2019-01-10_09-54-54am.pdf”                     }                 }             },             “链接”:{                 “自我”:{                     “ href”:“ XXX”                 }             },             “关系”:{                 “项目”:{                     “数据”:{                         “ type”:“ items”,                         “ id”:“ XXX”                     },                     “链接”:{                         “相关”:{                             “ href”:“ XXX”                         }                     }                 },                 “参考”:{                     “链接”:{                         “自我”:{                             “ href”:“ XXX”                         },                         “相关”:{                             “ href”:“ XXX”                         }                     }                 },                 “链接”:{                     “链接”:{                         “自我”:{                             “ href”:“ XXX”                         }                     }                 },                 “ downloadFormats”:{                     “链接”:{                         “相关”:{                             “ href”:“ XXX”                         }                     }                 }             }         }     ] '''

我该如何处理?

1 个答案:

答案 0 :(得分:0)

是的,请改为致电GET versions/:version_id/relationships/refs。由于“计划”文件夹中列出的项目是items:autodesk.bim360:Document的类型,因此该类型的项目不会直接在其GET versions/:version_idGET items/:item_id的响应中显示存储属性。另请参见此处:Download a Document with Autodesk API