0

I'm new to using the data management API to gain access to BIM360Docs, I've successfully downloaded a file from any folder and I can upload to the project files folder, however the issue lies with uploading to the plans folder, all the API calls seem happy and appears to work, but when I check the actual BIM360Docs website it's not there, when I use the API call to display a folders contents it is there, so it appears to be uploading correctly yet isn't visible for some reason?

Here it is being uploaded successfully:

Here it is being uploaded successfully

Here it is being visible using the get folder contents API call but not in docs:

Here it is being visible using the get folder contents API call but not in docs

So it is there and I can download it and everything is hunky dory I just can't see it on the website.

PS I'm using the step by step guide on the forge site (I'm unable to link as I don't have enough rep).

halfer
  • 19,824
  • 17
  • 99
  • 186

1 Answers1

0

Can you tell me to what folder location are you uploading? I'm thinking maybe you are not posting the file to the right location, and that is why you can download it only. In that sense you are correctly creating the storage location, the problem is you are probably uploading your file to the wrong folder. Something I can suggest is the following, get a list of all the available folder within the root folder.

// Get Folder

curl -X GET -H "Authorization: Bearer YOURTOKEN" "https://developer.api.autodesk.com/data/v1/projects/BIM360ACCOUNTID/folders/urn%3Aadsk.wipprod%3Afs.folder%3AYOURROOTFOLDER/contents" 

This will give you back a response JSON of all the folder within your Doc Project. Find the ID of the Plans Folder and continue with the following steps using that folder identifier.

//Step 3: Create a storage location

//Step 4: Upload a file to the storage location

//Step 5: Create the first version of the uploaded file

If everything goes correctly you should be able to see your plans in that location now. Please let me know how everything goes with this. Also check that you have the right Scopes setup in your token that the following ones are included scope= account:read account:write

Also that you have the right permissions within your Docs project to upload.

halfer
  • 19,824
  • 17
  • 99
  • 186
Jaime Rosales
  • 1,106
  • 1
  • 6
  • 8
  • Definitely uploading to the correct folder as when I get contents from the folder I can see all the other plans that I have in there which I can see on the docs site, I'm able to upload to the project files folder successfully and any subfolders I have in side of it, so I definitely have the correct scopes/permissions, I'm not sure why It's having trouble with the plans folder, its a basic 5 page PDF nothing extreme. Thank you – Bob Scooter May 09 '17 at 07:40
  • Hi, is there a way for me to get a similar file to the one you are trying to upload, it might be a specific file problem since you are doing everything else correct. I'm able to upload to the plans folder so I will need this from you to test it on my side and if there is something specific with the file and i'm able to reproduce I could let our engineering team know about it. – Jaime Rosales May 11 '17 at 22:37
  • https://drive.google.com/file/d/0B7To3agE612uQnlhMGs5SjI3N0E/view?usp=sharing Here's the workflow I was using, I've copied the request and response into text files, sorry I don't know how to better share it, the pdf is also located there, this is only a dev project for testing so I'm fine with sharing the id's and bits and pieces, if you need anything more from me please let me know, thank you! – Bob Scooter May 12 '17 at 11:51
  • This is perfect, thanks for sharing, I will start investigating and get back to you as soon as I can. Cheers – Jaime Rosales May 12 '17 at 19:13
  • Hi Bob, Thank you for your patience, I have tested your workflow and I have found that unfortunately you can't do this with the API. I have noticed that dwfx files are automatically processed and do not require the titleblock information to be updated in the processing step, but that does not help with PDFs at the moment. I will submit an enhancement request to the team in order to replicate the steps to make pdf upload to Plans available from the DM API. – Jaime Rosales Jun 08 '17 at 16:36