We need a way to mimic the BIM 360 Docs file manager in our custom integration and using Forge APIs for that do not do the trick. We are trying to retrieve a list of subfolders of a given folder using a single API call.
The way we are trying to do it right now is using this endpoint, with filters
/data/v1/projects/{{ProjectId}}/folders/{{FolderId}}/contents?filter[extension.type]=folders:autodesk.bim360:Folder
There is a problems with this approach though. Long story short, it's very ineffective. Since filters are applied after pagination (why?) one has to iterate over all pages in the resultset in order to find all subfolders in a given folder. This can take very long time and usually requires many of roundtrips to the server when querying folders with many items in them. Each call to this endpoint averages at 700ms, which is too long if we are to call this endpoint multiple times.
On the other hand, BIM 360 Docs web app internal API uses an endpoint which does just that in a single call and usually under 300ms.
Two questions:
- Can BIM 360 Docs undocumented APIs from the https://docs.b360.autodesk.com/api/v1/ domain can be used in 3rd party integrations? Is there a documentation for these?
- If #1 is not an option, what is the best way to achieve what we need using current Forge/BIM360 public APIs?