Home > Blockchain >  How to get correct API endpoint for 3 levels nested files
How to get correct API endpoint for 3 levels nested files

Time:02-24

enter image description here

I would like to get some files id from current folder. I am sending request in postman and I am using google drive v3.

I can pass authentification and my url endpoint look like GET

https://www.googleapis.com/drive/v3/files?q='1Bda8VqVvkuuTqeSPw48NSl4kXijCboi6' in parents

it get all files for current folder but it is in my drive I would like to get files from shared drive.

I can get that drive with endpoint

https://www.googleapis.com/drive/v3/drives

but than I don't know how to continue

CodePudding user response:

You can try this way. What you're missing is de corpora parameter

https://www.googleapis.com/drive/v3/files?corpora=drive&includeItemsFromAllDrives=true&includeTeamDriveItems=true&supportsAllDrives=true&supportsTeamDrives=true&teamDriveId=1Bda8VqVvkuuTqeSPw48NSl4kXijCboi6&key=[YOUR_API_KEY] 

That parameters works to group files to which the query applies

  • Related