Skip to main content
Question

Boxsdk search not working

  • January 24, 2025
  • 0 replies
  • 23 views

I am trying to search if a folder exists within a parent folder

 

My code returns all items in the parent folder

 

parentFolder=folder = user_client_archive.folder(folder_id=mainFolderID).get()
                               print("Parent Folder "+parentFolder.name)
                               items = user_client_archive.search().query(query='MyFolder_NoCollab',ancestor_folders=[parentFolder],content_types=['name',])
                               for item in items:
                                    print(f'The item ID is {item.id} and the item name is {item.name}')

 

0 replies

Be the first to reply!