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: 

Get parent folder of a shared folder

Get parent folder of a shared folder

mnmtm
New member | Level 2

I am using "list_folder" to get the details of a sub-folder. I want to find the ID of its parent folder. But  "parent_shared_folder_id" contains the ID of its grand-parent folder, not its immediate parent folder. Is there a way to get an item's immediate parent ID?

 

 

1 Reply 1

Greg-DB
Dropbox Staff
The parent_shared_folder_id field will contain the shared folder ID for the shared folder that contains the item, regardless of how many levels up that is.

If you want the immediate parent of an item, whether or not it is the shared folder itself, you can strip the last element off of the item's path_lower.

Using that path, you can call /files/get_metadata or /files/list_folder as necessary to get the metadata you want.
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?