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: 

Access team folders - Old Business Team Configuration

Access team folders - Old Business Team Configuration

robobooga
Explorer | Level 4
Go to solution

I understand that with the new team spaces and namespace configurations, that we would have to use 'Dropbox-API-Path-Root' header and I've managed to get it working by setting the namespace to the root and using 'Dropbox-API-Select-Admin' to view all folders.

What I'm having trouble with at the moment is that, when I use the same code to call the API and if the particular team is using the older team spaces config, I am only getting their personal folders when I call 'list_folder' and would like to know the proper way to resolve this.

Also, would developers be able to test on business accounts with the configurations toggle-able? I only have acces to the new business team spaces config and would like to test out the older one as well.

 

Thanks!

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

Yes, on the Dropbox Business API, you can use the /2/team/features/get_values endpoint to check the 'has_team_shared_dropbox' feature to see if the team uses the team space configuration.

Or, on the Dropbox API, you can call /2/users/get_current_account and check the returned RootInfo type to see if the user is a member of a team that uses the team space configuration. Specifically, the returned 'root_info' will be a 'UserRootInfo' (with '.tag' of 'user') if the team doesn't use the team space, or a 'TeamRootInfo' (with a '.tag' of 'team') if it does.

If you're using the "team member file access" feature, and want to operate on a particular user only, you should use the "Dropbox-API-Select-User" header. (The "Dropbox-API-Select-Admin" header is for access any team owned content in general.) And for listing any/all files in a user's account, you should use /2/files/list_folder[/continue]. (The /2/sharing/list_folders[/continue] endpoints, on the other hand, only list the shared folders in particular, and not their contents.)

View solution in original post

11 Replies 11

Greg-DB
Dropbox Staff
Go to solution

We unfortunately don't have a way for developers to get test accounts like this, with this feature toggle-able, but I'll pass this along as a feature request. 

For reference, I do recommend reviewing the Namespace Guide and Content Access Guide, if you haven't already, as they are good references for this.

In accounts on teams that don't use the "team space" configuration, any team folders that an account has access to are "mounted" in the account's root. That means that using list_folder[_continue] to list the root (using the empty string "" as the path value) will list both their personal folders as well as the team folders they have. Make sure you do check the has_more value returned by list_folder though, to see if you need to call back to list_folder_continue, and so on, to get more entries.

robobooga
Explorer | Level 4
Go to solution

Thank you very much!

robobooga
Explorer | Level 4
Go to solution

Hi,

I would like to add on to this question, is there an API that we can call to determine whether a particular dropbox business team's folder has the "team space" configuration or not and thus add the 'Dropbox-API-Select-Admin' and set the namespace accordingly on the subsequent calls?

Also, by calling 'list_folders' on the accounts of those who do not have the "team space" configuration, would I be able to get all the other member's personal folders as well should I have the ''Dropbox-API-Select-Admin' header.

Basically what I want to achieve is regardless of whether a team has the "team space" configuration or not, to grab a list of all the files and folders of all users and teams. 

Greg-DB
Dropbox Staff
Go to solution

Yes, on the Dropbox Business API, you can use the /2/team/features/get_values endpoint to check the 'has_team_shared_dropbox' feature to see if the team uses the team space configuration.

Or, on the Dropbox API, you can call /2/users/get_current_account and check the returned RootInfo type to see if the user is a member of a team that uses the team space configuration. Specifically, the returned 'root_info' will be a 'UserRootInfo' (with '.tag' of 'user') if the team doesn't use the team space, or a 'TeamRootInfo' (with a '.tag' of 'team') if it does.

If you're using the "team member file access" feature, and want to operate on a particular user only, you should use the "Dropbox-API-Select-User" header. (The "Dropbox-API-Select-Admin" header is for access any team owned content in general.) And for listing any/all files in a user's account, you should use /2/files/list_folder[/continue]. (The /2/sharing/list_folders[/continue] endpoints, on the other hand, only list the shared folders in particular, and not their contents.)

robobooga
Explorer | Level 4
Go to solution

So would it be right to say that if I were to list down all the folders of the dropbox business account (the old configuration) in a way that it is displayed like the following:

  • /User1
    • User1/FolderA
    • User1/FolderB/FileZ
    • User1/FileA
  • /User2
    • User2/FileA
  • /SharedFolder1
    • /SharedFolder1/FileA
  • /SharedFolder2
    • /SharedFolder2/FileB

 

I would have to go through the member's list and do a "files/list_folder" using all the different member's ID entered in "Dropbox-API-Select-User"  and then merge it into a full list? 

I am asking this because for the new configuration, I can just do a "Dropbox-API-Path-Root" with the root namespace and do a "files/list_folder" while using "Dropbox-API-Select-Admin". 

Is there an easier way to go about doing it for the old configuration?

Greg-DB
Dropbox Staff
Go to solution

That's correct, and no, unfortunately there isn't really an easier way to do that with the old configuration. (You may want to look into using /2/team/namespaces/list[/continue] and listing by each namespace though; that may streamline it, depending on what you're looking to do exactly.)

robobooga
Explorer | Level 4
Go to solution

Ok, thank you for your time! You've been a great help.

Kris Brown
New member | Level 2
Go to solution

Is there any update to the request on how a developer can test across versions of Team Space and Team Folders. We have a client who has an older account and has no immediate desire to update. But we need to be able to support both them and any new clients who have the newer functionality.

 

Is there a way to request an 'older' account? even if it comes at a cost. Asking a large multi national for access to their account to test isn't a scalable solution moving forward.

 

How do developers without an old account currently test across the two styles of working before we publish to clients?

Greg-DB
Dropbox Staff
Go to solution

@Kris Brown You can fill out this form to request a Dropbox Business Development Account, which should use the old configuration by default.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Kris Brown New member | Level 2
  • User avatar
    robobooga Explorer | Level 4
What do Dropbox user levels mean?