Forum Discussion

FinervaStu's avatar
FinervaStu
Explorer | Level 4
3 years ago
Solved

Nested sharing of team folders

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?

 

 

  • Greg-DB's avatar
    Greg-DB
    3 years ago

    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 .

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    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's avatar
      FinervaStu
      Explorer | Level 4

      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's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff

        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 .