My application is based on a tree-structure with a known root-folder (say 'theFolder') .
I'm able to retrieve all folders whose name is <theFolder>:
gapi.client.request(
{
'path': '/drive/v2/files',
'method': 'GET',
'params': {
q : "title='"+theFolder+"' and mimeType='application/vnd.google-apps.folder'",
fields: "items(description,id,modifiedDate,parents/id,title)"
},
callback: theCallback
});
But, as I want only the root folder (if any), I tried in vain to add some criteria:
and parents.isRoot
and parents.isRoot=true
and parents/isRoot=true
and (isRoot in parents)
I understand this is related to the Getting a list of files by folder on Drive SDK and more generally to: "how to set criteria on sub-fields?"