0

My problem is I am not able to do folder level search in google drive through my third party application. When we search inside a folder, I want items from the current folder and subfolders. But when i am searching, I am getting results only from the current folder being searched, that is results from subfolders is not fetching. Given below is the api I am using,

https://www.googleapis.com/drive/v2/files/folderid

please reply as early as possible

Thanks in advance.

Abu Rahim
  • 3
  • 4

1 Answers1

0

Google Drive folders are not folders.

"Parent Folders" are actually simple properties of a file, eg. a file can have multiple parents.

If you want to descend into subfolders, you'll need to do it yourself, or have your app make all of its files children of a common folder (remembering that children can have multiple parents. If you do it yourself, resist the urge to recurse - it's slow, expensive and error prone.

See How do I search sub-folders and sub-sub-folders in Google Drive?

Community
  • 1
  • 1
pinoyyid
  • 21,499
  • 14
  • 64
  • 115
  • Is there any single API to search subfolders? Because, when we use this API, https://www.googleapis.com/drive/v2/files, I am getting the complete files/folders from the drve. – Abu Rahim Jan 19 '17 at 04:07
  • The search features have not changed between v2 and v3. – pinoyyid Jan 19 '17 at 11:18
  • See http://stackoverflow.com/questions/41741520/how-do-i-search-sub-folders-and-sub-sub-folders-in-google-drive/41741521#41741521 – pinoyyid Jan 19 '17 at 12:12
  • Many thanks @pinoyyid. I acheived it through recursive method, at metadata level, so performance also not a problem. – Abu Rahim Feb 28 '17 at 15:15