Google Drive allows you to add custom properties to files (https://developers.google.com/drive/v3/web/properties), but they aren't included in the searchable text.
From https://developers.google.com/drive/v3/web/search-parameters:
fullText string contains Full text of the file including name, description, content, and indexable text.
You can only search for exact property matches:
appProperties has { key='additionalID' and value='8e8aceg2af2ge72e78' }
Is there some other way to search the custom properties?
Example: if I have a file with custom property "tags" and value "active banking urgent", how can I get files.list
(https://developers.google.com/drive/v3/reference/files/list) to find this file when I search for "urgent"?
Using the search strategies below, you can find exactly what you need with just a few keystrokes. To open the Google Drive advanced search, click on the drop-down arrow at the end of the Google Drive search box, and you will find that you can search by file type, visibility, owner and much more!
Filter your Drive results On your computer, go to drive.google.com. At the top, type a word or phrase into the search box. Fill out any of the following sections: Type: File types such as documents, images, or PDFs.
How about theses methods? Unfortunately, it couldn't find the flexible search for appProperties
using q
. So in order to achieve what you want to do, I propose the following 2 patterns.
files/appProperties
as a query parameter.
GET https://www.googleapis.com/drive/v3/files?fields=files%2FappProperties
appProperties
from all files on Google Drive is retrieved.appProperties has { key='tags' and value='active banking urgent' }
for q
.In this pattern, the usage count of APIs are 2.
files(appProperties,id,name)
as a query parameter.
GET https://www.googleapis.com/drive/v3/files?fields=files(appProperties%2Cid%2Cname)
appProperties
, fileId
and filename
from all files on Google Drive are retrieved. These parameters are searched as or
.appProperties
, and retrieve files with the appProperties (key "tags", value "active banking urgent") what you need.In this pattern, the usage count of APIs are 1.
If this was not useful for you, I'm sorry.
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