You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

terezakloboucek's avatar
terezakloboucek
Helpful | Level 5
6 years ago

Parent folders/spaces

Hello everybody,

I am using your API. While setting up the connection to the API, the team environment is always choosen.

When using the method /2/files/search_v2, when I only set up the name which the file should contain without the path, all files from every "parent" folder is gotten. But when I use method 2/files/list_folder I don't see all "parent" folders, only the "subfolders" of the first folder (Tereza Tester) as you can see on the printscreen below.

After looking for a solution I found out, I need to turn the "parent" folders into spaces to have them returned by the 2/files/list_folder method, is that correct?

Also, when I use other methods like 2/files/download and set up the full path of the file, it is unable to get the file. I can only get the file which is in the first folder (Tereza Tester) and the path to the file can only start with the "subfolders". While with the method /2/files/search_v2, when I want to look for a file in a specified folder, the full path has to be set up otherwise it returns nothing (parent_folder/subfolder/file).

May you help me please?

Thank you in advance.

Tereza

  • From your screenshot, I see you're using a team with the "team space" configuration.

    When listing or downloading files in an account with the team space configuration using /2/files/list_folder[/continue] or /2/files/download, the call will operate in the team member folder by default, and not in the team space.

    If you want to access the team space, you'll need to set the "root" for those calls to be the team space. You can find more information on how this works and how to configure those API calls accordingly in the Namespace Guide.

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

    From your screenshot, I see you're using a team with the "team space" configuration.

    When listing or downloading files in an account with the team space configuration using /2/files/list_folder[/continue] or /2/files/download, the call will operate in the team member folder by default, and not in the team space.

    If you want to access the team space, you'll need to set the "root" for those calls to be the team space. You can find more information on how this works and how to configure those API calls accordingly in the Namespace Guide.

    • terezakloboucek's avatar
      terezakloboucek
      Helpful | Level 5

      Thank you for your reply! It helped me a lot.

      One more question, my collegue got DEV account to work with so he can set up the API calls. His environment looks like below. And when he makes the 2/files/list_folder call, all folders (team folders and everything else) are retrieved. Why does that happen? Thank you!

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

        In this screenshot, I see that your colleague is not using the "team space" configuration, so their team folders are mounted insider their member folder. That means that for them, they will be listed and accessible by default, without configuring the root for the API calls.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,915 PostsLatest Activity: 2 days ago
333 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!