Reputation: 195
I am using drive api v3 to look for files I hare shared with others (anyone),to list them & potentially cancel sharing them. I know that in the search box you can do a 'to:' and it will retrieve these files, but I could not use such thing on the API. my current tri ;
query="'me' in owners and trashed=false and not mimeType = 'application/vnd.google-apps.folder' and visibility != 'limited'"
Thanks in advance
Upvotes: 0
Views: 3039
Reputation: 195
As tanaike said, a workaround that solves the problem is by looping through the files using files.list() function, and including id, owners, permissions in the fields. This is going to return a list of objects, and from there we can check if type
is anyone
.
From there, we can also check for attributes like shared:true
& ownedByMe:true
.
This is just a workaround, and surely not the best solution, since with Drive search, we can do all this by typing to:
, which lists all owr shared files. I hope we get an API for this.
Thanks again tanaike
Upvotes: 2