Using the Google Drives API, how do I formulate Q when retrieving the file listing, to only get back files that are owned by me?
Using the Google Drives API, how do I formulate Q when retrieving the file listing, to only get back files that are owned by me?
I believe your goal as follows.
For this, how about this answer?
In this case, you can create the search query using owners in the fields.
'me' in owners
If you want to retrieve the files in the specific folder, you can use the following search query.
'###' in parents and 'me' in owners
curl \
'https://www.googleapis.com/drive/v3/files?q=%27me%27%20in%20owners&key=[YOUR_API_KEY]' \
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
--header 'Accept: application/json' \
--compressed
and
curl \
'https://www.googleapis.com/drive/v3/files?q=%27%23%23%23%27%20in%20parents%20and%20%27me%27%20in%20owners&key=[YOUR_API_KEY]' \
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
--header 'Accept: application/json' \
--compressed