Autodesk Construction Cloud API unavailable endpoints

121 Views Asked by At

Our team is working with Autodesk Construction Cloud and it's Docs module quite heavily. Because of that we're trying to develop some internal tools which would automate some work that they do, mostly around copying files.

In ACC Docs you can easily copy files from one folder to another. From our investigation it looks like the ACC internally uses an endpoint like this to copy the files:

https://developer.api.autodesk.com/dm/v3/projects/{{projectId}}/documents:copy?targetFolder={{targetFolder}}

By using the authentication token from ACC requests (obtained from the browser), we can easily use this call from Postman or even an AWS Lambda function. But when we're using the auth tokens obtained from 3-legged auth process as described in the documentation, the same API call fails.

Is it even possible right now to obtain an auth token which works with that endpoint for copying ACC Docs files? Or is this not available right now as this API is still not really "public"?

1

There are 1 best solutions below

1
On BEST ANSWER

Happy New Year!

Those APIs are internal APIs. Please do not try to use them. even if it may work, you would use it on your own risk..

Regarding with copy files files from one folder to the other, you can use the public API. After you get the version urn of the original file, call the endpoint below with the parameter

POST https://developer.api.autodesk.com/data/v1/projects/{PROJECT_ID}/items?copyFrom=urn%3Aadsk.wipprod%3Afs.file%3Avf.rH_L4XJsTmeiYA4ixCVNAA%3Fversion%3D1

with the payload, in which specify the target folder.

{
"jsonapi": {
 "version": "1.0"
},
"data": {
 "type": "items",
 "relationships": {
  "tip":{
        "data":{
           "type":"versions",
           "id":"1"
        }
     },
     "parent": {
         "data": {
             "type": "folders",
             "id": "urn:adsk.wipprod:fs.folder:co.0xaYa2rVTJuFiz7rxLCOQQ"  
//!<<< The folder we want to put this file
         }
     }
 }
 },
"included":[
  {
     "type":"versions",
        "id":"1",
        "attributes":{
           "name":"rac_basic_sample_project.rvt"   //!<<< Version name
        }
  }
  ]
}