cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We are making some updates so the Community might be down for a few hours on Monday the 11th of November. Apologies for the inconvenience and thank you for your patience. You can find out more 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: Nested sharing of team folders

Nested sharing of team folders

FinervaStu
Explorer | Level 4
Go to solution

I have a requirement where I created nested team folders and control the permissions for each of them through the DB API.

Through the UI, I can easily create a folder hierarchy /AAA/BBB/CCC/DDD and they appear in the UI all as "Team Folders" and control the permissions through the "Manage" feature. But through the API /team_folder/list I can only see information on the AAA folder, despite the sub folders being classed in the UI as "Team Folders".

 

Also, I cannot see in the API how I can create a Team Folder within another Team Folder - the /team_folder/create API doesn't seem to accept and parent_folder type of parameter.

 

I can see what I want to do is absolutely possible in Dropbox (Business), but cannot figure out how it can be performed through the APIs.

 

Are nested Team Folders not supported through the API?

 

 

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

In that case, at that point in time, the "BBB" folder is no longer mounted anywhere in the user's account, though they still have permission to access it. If an app is connected to the account via the API, it can remount the folder using /2/sharing/mount_folder. Alternatively, the user can do so manually via https://www.dropbox.com/share/folders .

View solution in original post

4 Replies 4

Greg-DB
Dropbox Staff
Go to solution

You can do this via the API. You should use /2/sharing/share_folder to share the nested team folder, if it hasn't already been shared, and the use the resulting shared folder ID for that nested folder with the other sharing endpoints, e.g., /2/sharing/add_folder_member, etc., to manage the sharing as desired.

FinervaStu
Explorer | Level 4
Go to solution

Thanks Greg, that's clearer now - think I was getting mixed up between the /team/team_folder/create and /files/create_folder_v2 endpoints. 

 

I have encountered another behaviour that I think *maybe* a bug somewhere...

 

I have the folder hierarchy:

 

/TeamFolder/AAA/BBB

 

I add a user as an Editor to folder BBB - this then appears in their Dropbox.

I then add the same user as a Viewer to AAA - this then appears in their Dropbox, and BBB disappears as it's now inside AAA.

 

So far so good, and exactly what I was expecting

 

I then remove the user from AAA.

AAA then is removed from their Dropbox as expected.

The Editor permission remains on the BBB folder (visible in the Admin console and via API call to /sharing/list_folder_members) but BBB never re-appears in their Dropbox - not in the Mac/iPhone clients or through the web client.

 

I then have to either remove & add the user to BBB in the admin console, or call /sharing/add_folder_member again - even though the permission is still on the BBB folder.

 

I've tried the above sequence through the admin console AND via the API, but the result is the same.

 

Any ideas?

 

Cheers,

 

Stu.

 

 

Greg-DB
Dropbox Staff
Go to solution

In that case, at that point in time, the "BBB" folder is no longer mounted anywhere in the user's account, though they still have permission to access it. If an app is connected to the account via the API, it can remount the folder using /2/sharing/mount_folder. Alternatively, the user can do so manually via https://www.dropbox.com/share/folders .

FinervaStu
Explorer | Level 4
Go to solution

Thanks for the clarification Greg.

 

Inside my "revoke folder access" routine I'm now scanning sub-folders and for any shared folders.  For any I find, I'm re-adding the members that are already there (from /sharing/list_folder_members) which causes the folders get re-mounted as I was expecting. This seems to work well (once I wait for async jobs to complete) and the various DB clients show exactly what I am expecting.

 

Thanks again for your help.

Need more support?