SVF POST 作业文件转换失败

SVF POST job file conversion failure

我和一个朋友正在这里学习 Autodesk Viewer 教程: https://developer.autodesk.com/en/docs/viewer/v2/tutorials/basic-viewer/

我们都完成了前面的所有步骤,除了最后一个使用 APIs POST job 端点将 base64 编码 urn 发送到模型导数 API 用于转换为 SVF 文件,以便 Autodesk 的查看器可以使用它。

这是我用来发送 POST job 请求的内容:

curl -X 'POST' -H 'Authorization: Bearer cywr9WWu8kml3rQIVnPDohFDsoRl' -H 
'Content-Type: application/json' -v 'https://developer.api.autodesk.com/modelderivative/v2/designdata/job'
-d '{"input": {"urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bXl0ZXN0YnVja2V0dGVzdDIvZ2lyaV9zaXJfY29weTEucnZ0"},
"output": {"formats": [{"type": "svf","views": ["2d","3d"]}]}}'

这是 API 的回复:

{"type":"manifest","hasThumbnail":"false","status":"failed","progress":"complete",
"region":"US","urn":"dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bXl0ZXN0YnVja2V0dGVzdDIvZ2lyaV9zaXJfY29weTEucnZ0",
"derivatives":[{"name":"giri_sir_copy1.rvt","hasThumbnail":"false","status":"failed",
"progress":"complete","messages":[{"type":"error","code":"Revit-InternalError",
"message":"<message>We have encountered some issues while preparing the file for viewing.
Please contact support for assistance.</message>"},{"type":"error",
"message":"Unrecoverable exit code from extractor: -1073741831",
"code":"TranslationWorker-InternalFailure"}],"outputType":"svf"}]}

非常感谢任何见解。

总结问题的评论:这里是 link 到 sample running and source code (postJob function)。

请注意,此示例将文件直接存储在开发者帐户 (OSS) 下,而不是用户帐户 (Data Management) 下,这是一个重要的区别!第一个使用 2-legged token, the second uses 3-legged token。数据管理包含一些 abstractions/metadata 来组织文件,如中心、项目和文件夹,但最终存储在 OSS 上。根据它的存储方式,你需要不同的 tokens/permissions 到 read/write 它。