Google Drive Files.list API query with "contains" keyword

Hi,

I am  trying to execute Files.list api from Google Drive APIs as mentioned here: https://developers.google.com/drive/api/v3/reference/files/list?apix_params=%7B%22q%22%3A%22name%20c...

My primary use case is to get all the files which have file name starting with a particular word. For example,  I want to list all the files which have name starting with "donut".

For this, I used q = name contains 'donut' for making the API call. What I observed is that, this API call  returns the following results.

  1. It returns all files details for which the name starts with 'donut'.
  2. It also returns all files details for which the name contains 'Donut' (D in uppercase) anywhere in the name.

For example, if I have three files, namely, '123Donut', 'donut123' and '123donutDonut123', then the expectation is as per the documentation that I should only get the details of file name with 'donut123'. But in reality, I get details of all the three files, since 'Donut' is present in the other two files.

Can someone help me in this issue?

0 0 981
0 REPLIES 0
Top Labels in this Space
Top Solution Authors