I'm currently using the Google Drive API to get a list of folders (or subfolders). In order to do this I use the following URL:
https://www.googleapis.com/drive/v2/files/1234folderid1234/children?key=1234APIKEY1234&q=mimeType='application/vnd.google-apps.folder';
This returns back a list of the folders as expected, however, I also need either the name of the folder or the full folder path. This information is not returned with this call. Is there a way to get the list of folders with the associated folder name or path in one call?
Thanks
Getting this folder ID is easy, navigate to https://drive.google.com and make a folder. After you did this, open up the folder and check the URL: Grab this ID and enter it inside the 'Folder ID's' inside the modal to specify that the backup has to be put in that folder.
The file path is found at the top of the folder or webpage where you are viewing the file. For example: When viewing files in your web browser, the Google Drive file path is at the top of the Google Drive webpage.
You need to do two things:
Amend your query to add the parent id you want to search in.
mimeType = 'application/vnd.google-apps.folder' and 'folderId' in parents
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With