Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
What's the best/optimal way of fetching team folders without including the folders shared by individual users? I have tried the below option, but it fetches all shared folders (folders inside team folder and the ones shared by individual users)
- Call dbxTeamClient.team().namespacesList()
- Use namespace type to filter shared_folder and team_folder
- Call metadata API to get is_inside_team_folder flag for each namespace filtered above
Entire list of namespaces is fetched first, then metadata API is called to get additional details and filtered locally based on attributes. Is there another API that can give just the folders inside team folder?
For teams using the team folder configuration, you can use teamFolderList and teamFolderListContinue to list just the team folders. And you can use listFolder and listFolderContinue to list the contents of any folder.
For teams using the team space configuration, you can list the contents of the team space by setting withPathRoot and using listFolder and listFolderContinue.
Refer to the Team Files Guide for more information on the difference between the two configurations and how to use them on the API.
Thanks for the response.
I tried the option - "setting withPathRoot and using listFolder and listFolderContinue." However that fetches user's root folders as well - is there a way to filter those out in the API itself? Couldn't find any pointers in the documentation/APIs.
(I am working with Team Space configuration)
No, unfortunately there isn't an option for filtering out the member folders, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.
The closest option currently is withIncludeMountedFolders(false) (since member folders are mounted in the context of the team space), but that would also exclude other types of mounted folders. That also only excludes the contents under those folders, but would still list the entry for the folder itself.
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!