cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We just wanted to say thank you! Check out our customer appreciation video 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: Started to get PathRootErrorException

Started to get PathRootErrorException

EvgeniyCatito
Explorer | Level 4

Hey,

I work with Dropbox Java SDK latest, and have a running app. Since recently I started to get PathRootErrorException

 

 

sdkClient.asAdmin().withPathRoot(PathRoot.root(teamNamespace))
                            .files()
                            .listFolderGetLatestCursorBuilder("")
                            .withRecursive(true)
                            .start().getCursor();

 

 

When trying to call this method. listFolderGetLatestCursorBuilder
Exception looks like:
pathrooterrorException.png

5 Replies 5

Greg-DB
Dropbox Staff

This should indicate that the value you're sending in withPathRoot, in this case the teamNamespace variable value, is incorrect for the connected account.

 

Note that the root for an account can change, e.g., due to team changes, so the app will need to be able to catch and handle this error. The error contains the current correct values for reference, or you can retrieve them the same way you would have originally.

 

Please refer to the following resources for more information:

EvgeniyCatito
Explorer | Level 4

Thank you!
Do I understand right, that starting this change : https://dropbox.tech/developers/api-updates-to-better-support-team-spaces 
there is no one root for all teams, but each team has their own root? Is there a way to get a cursor for the whole org?
Regards,

Evgeniy

iNeil
Dropbox Engineer

Hi @EvgeniyCatito,

 

On teams with the updated team space, there is not a single shared root; each team member has their own root, and so there is not a way to get a single cursor for the entire team.

 

 

EvgeniyCatito
Explorer | Level 4

Hey @iNeil , 

thank you for the answer,

how about assorted folder? or other folder that can be accessed by the whole account? 
It might be accessed from any team and it will be a part of cursor for every team of the account? 
thank you!

Greg-DB
Dropbox Staff

@EvgeniyCatito When connected to a user account (whether or not it is a member of a team), an app can list anything in that account, including shared folders mounted in that account, using the same listFolder functionality. When using the recursive mode, the resulting listFolder cursor(s) would cover everything under that root.

 

You may want to check out the File Access Guide for more information on interacting with files/folders.

 

If you're interested in listing everything a team has access to, this post/sample may be helpful.

Need more support?