autodesk-forge

How to get the same folder via Data Management API like visible in ACC Docs browser?


I would like to display the folders and files found in a given ACC project in my own application. Compared with ACC docs browser, I only see only "Project Files" at the root.

When I execute the request

https://developer.api.autodesk.com/data/v1/projects/:project_id/folders/:folder_id/contents

I get the expected folder, but I get also much more than I want. There are folders named Photos, Plans, ProjectTb, checklist_, correspondence-project-, issues- and more.

What is the criteria either in the request or in one of the properties in the response to filter for the visible folder "Project Files" like in ACC Docs browser.


Solution

  • Are you talking about the topFolders? such kind of folders should not appear in the endpoint you pointing out.

    https://developer.api.autodesk.com/project/v1/hubs/:hub_id/projects/:project_id/topFolders
    

    But anyway, we can get the folder Project Files only by adding an extra query string parameter filter[extension.data.folderType]=normal.

    curl --location 'https://developer.api.autodesk.com/project/v1/hubs/:projectId/topFolders?filter[extension.data.folderType]=normal' \
    --header 'Authorization: Bearer ...' \
    --header 'Content-Type: application/vnd.api+json'