Forum Discussion

qpy's avatar
qpy
New member | Level 2
3 years ago

using api to access file/folders in Backups

Using python dropbox.Dropbox (dbx instance), and after connecting using oauth2 generated token;

am unable to access, so far, the Backups tree. Using the relative-path from "rootdir", cant seem

to get to the Backups area (as part of the backups feature).

 

Python

dbx = dropbox.Dropbox(DROPBOX_ACCESS_TOKEN)
files = dbx.files_list_folder(path, recursive=True, include_media_info=True)

where when path is "/xxxx" and "xxxx" is a folder under "home", then the above works fine.

But, the Backups area (you know, the pc backup-with-sync feature) is an area I  cant get to, so far.
Have tried path: "/backups/xxxx"   ("xxxx is known top of backup tree)  and variations.

So... via the Dropbox api, is it possible to access(read) the "Backups" tree(s).

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

    To access content in your Dropbox, such as your backup data, you'll need to specify the path relative to the root. Do not add additional components not seen when browsing your Dropbox, such as "backups". The folder for backed up data is the name of the backup. For instance, if I have a backup named "Mac", containing a backed up "Desktop" folder, I would list that Desktop backup with the path "/Mac/Desktop".

     

    You can also start with a path of the empty string "" to list the root itself.

    • hello_box11's avatar
      hello_box11
      Explorer | Level 4
      Depending on the backup type, it might because the backup is under its own namespace instead of root namespace. What you can do is to list all the namespace and concatenation the ns with the path.
      • qpy's avatar
        qpy
        New member | Level 2
        yes.. ns based path sounds right; the “root” relative path has been dead end.

        Example for ns based arg?
        And. how to discover what ns should be?

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,950 PostsLatest Activity: 2 years ago
352 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!