cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

List all files & folders in the root namespace for a user.

Explorer | Level 4

My aim is to list all the folders/files that belong to a user's dropbox account. 

 

My test user has 2 name-spaces as shown below:

root_namespace_id=u'XXXXXXXX', home_namespace_id=u'XXXXXXXXX')

  

 

The method files_list_folder takes in a path argument in which I pass the namespace id 'nsXXXXXX'

 

For root_namespace_id, I get the below error

ApiError('', ListFolderError(u'path', Looked(u'not_found', None)))

 

For home_namespace_id, it returns the files in the home namespace, but I do not get the Team files/folders(which belong to the root namespace). Screen Shot 2018-04-04 at 3.53.49 PM.png

How can I get team files/folders?

 

Thank you

 

 

1 Accepted Solution

Accepted Solutions
Highlighted

Re: List all files & folders in the root namespace for a user.

Dropboxer
Dropboxer

In order to access the team root using the Python SDK, you'll need to use `with_path_root` like this:

dbx.with_path_root(dropbox.common.PathRoot.root("XXXXXXXXX")).files_list_folder("")

Apologies this isn't better documented yet!

View solution in original post

3 Replies 3
Highlighted

Re: List all files & folders in the root namespace for a user.

Dropboxer
Dropboxer

In order to access the team root using the Python SDK, you'll need to use `with_path_root` like this:

dbx.with_path_root(dropbox.common.PathRoot.root("XXXXXXXXX")).files_list_folder("")

Apologies this isn't better documented yet!

View solution in original post

Highlighted

Re: List all files & folders in the root namespace for a user.

Explorer | Level 4
Thank you Greg, for your reply, I will test this and let you know if this works.

Regards.
Highlighted

Re: List all files & folders in the root namespace for a user.

Explorer | Level 4

This works as expected. 

 

Thank you Greg. 

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?