cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: Getting team folders (not ones shared by Users)

Getting team folders (not ones shared by Users)

jerry14
Explorer | Level 4

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?

3 Replies 3

Greg-DB
Dropbox Staff

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.

jerry14
Explorer | Level 4

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)

 

Greg-DB
Dropbox Staff

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.

Need more support?