Skip to main content
Question

Get all folders in a specific folder

  • May 21, 2025
  • 2 replies
  • 33 views

Forum|alt.badge.img

Is there any way to get all folders in a specific folder with API?

I'm using Ruby SDK (Boxr).

 

I have tried with search method like this.

require 'boxr'

client = Boxr::Client.new("token")
search_query = "\" t* \""
results = client.search(query=search_query, ancestor_folder_ids: ["ID"], type: "folder")
p results.inspect

Actually I need to go with

search_query = "\" * \""

to get all folders, but it didn't work.

 

I hope it is possible because I get all folders using the search window through UI.

Thank you.

2 replies

Forum|alt.badge.img

 

 One way to get this information would be to query the Get Folder's Items endpoint, and filter out files from the returned list of items. This would give you the list of folders in a specfic folder. 

 

 


Forum|alt.badge.img

Hi!
Has anybody found a better solution for this question? I need to get a list of folders (include folders in folders) for specific folder by iOS SDK, but iterating by items looking quite long and resource expensive on mobile.