cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done 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

Re: Get parent folder of a shared folder

Greg-DB
Dropboxer
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.
Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?