Get S3 URL for APS

40 views Asked by At

I'm following the steps from this tutorial to download a file from BIM360 using the Data Management API. I'm able to get up to step 5 without any issues. I can access the BIM360 file manually. In step 6 of the tutorial it the url has two parameters: bucket and object. I'm able to obtain the object from step 5. Where can I obtain the bucket parameter?

Here is the documentation for the get signeds3download api.

2

There are 2 answers

0
AlexAR On

At the end of the step 5 response, you should get the storage part:

"storage": {
   "data": {
      "type": "objects",
      "id": "urn:adsk.objects:os.object:wip.dm.prod/977d69b1-43e7-40fa-8ece-6ec4602892f3.rvt"
    },
   "meta": {
      "link": {
         "href": "https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/977d69b1-43e7-40fa-8ece-6ec4602892f3.rvt"
         }
      }
   }

Either from storage.data.id or storage.meta.link.href, you can see that the bucket used by BIM360 is wip.dm.prod.

This is the bucket used in the step 6 of the Download a file tutorial.

1
Xiaodong Liang On

AlexR is correct. you could find the bucket key and object key by that attribute of the document. This blog also describes about it https://aps.autodesk.com/blog/best-practice-uploading-and-downloading-files-bim360-docs (note: this blog was written a few years ago, it directs to the old tutorial, but the way to extract bucket key and object key of BIM360 (or ACC) is still same as now)