0

I have created a bucket like following (Python):

payload = {'bucketKey' : bucketname,'policyKey' : 'transient'}

resp = requests.post(Forge_BASE_URL+'/oss/v2/buckets', headers={'Authorization': config.token,'Content-Type':'application/json'},json=payload)

And then uploaded a file to the bucket created:

url = 'https://developer.api.autodesk.com/oss/v2/buckets/'+bucketname+'/objects/'+encodedfilename

resp = requests.put(url, headers={'Authorization': config.token,'Content-Type' : 'application/octet-stream','Content-Length' : str(filesize)},data= open(modelfilePath + filename, 'rb'))

How can I download the object from the bucket to the local path of the Revit Design Automation engine? The local path of the Revit Design Automation engine looks like T:\Aces\Jobs\job_id that is used in C# codes.

Either curl command or Python codes are appreciated.

1 Answers1

0

It is actually the responsibility of the Design Automation service to download all the inputs from provided (readable) URLs, run your activity in a secured, sandboxed environment, and then upload all the outputs to provided (writable) URLs.

If your input file is in a Forge Data Management bucket, you could get a temporary signed URL for it, and use that as the URL for the activity input. You can also create writable signed URLs that the Design Automation activity can then upload the results to. See this blog post for more details.

Petr Broz
  • 8,891
  • 2
  • 15
  • 24