Create Signed URL for Object in BIM360 OSS

北城以北 提交于 2020-07-08 03:21:14

问题


I'm trying to set up an Signed URL for an Design Automation Workflow which is triggered by an Webhook inside of the BIM360 OSS. If a file is added the webhooks triggers an endpoint to start a Design Automation. The webhook is working. And the Design Automation is working too. The Problem occurs if i try to wire both up. I#m trying to create a Signed URL of the File like suggested in this post from Petr Broz link stackoverflow.

To use this API it is requierd to use an Token which is obatined by 2-Legged-Auth which is working with all necessary Scopes. In the response of the Webhook is an ID for the Folder and Version. The API is recognizing the ID. The problem occurs in the response of this endpoint to create the signed url: https://developer.api.autodesk.com/oss/v2/buckets/:bucketKey/objects/:objectKey/signed

I'm using the wip.dm.emea as bucket because the file is stored in the EU BIM360 OSS.

The response is a 403 Forbidden:

{
    "reason": "Only the bucket creator is allowed to access this api."
}

Is it even possible to get the File ID like in this example Forge how to Download File ? Because this Solution requires a 3-Legged-Auth Flow which is not possible for a complete Automation.

The thing which makes me question is, that you can achieve this Workflow in plane Forge. But not in BIM360 where i have no control over the Buckets that are created by the System!?

I think this is an architectural missmatch between the Forge API and the BIM360 implementation!? Will there be a solution for this in the future?

Best regards Jan


回答1:


Unfortunately, I can confirm that it's not possible to create a signed URL for your BIM360 storage currently, as the error message mentioned, the endpoint requires the bucket owner to do this operation, this is what it is now. But I agree with you that this should be an architecture mismatch between Forge OSS and BIM360 implementation, and it's already been requested in our system, please keep "CPOSS-1066" to check with us about the progress.

As for the current way, you can keep the 3 legged token and using that for the output Url and also in the onComplete() callback, I have the blog post https://forge.autodesk.com/blog/upload-your-design-automation-output-file-bim360-docs which details the way to work, hope it helps at this moment.



来源:https://stackoverflow.com/questions/59544843/create-signed-url-for-object-in-bim360-oss

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!