To search for a specific set of shared drives, use the query string
drives.list to filter the drives to
A query string contains the following three parts:
query_term operator values
query_term is the query term or field to search upon. To identify which query terms can be used to filter shared drives, refer to Shared drive query terms.
operator specifies the condition for the query term. To identify which operators you can use with each query term, refer to Query operators.
values are the specific values you want to use to filter your search results.
The following table shows some example search queries for shared drives:
|Shared drives with no assigned organizer||
|Shared drives with the word 'confidential' in the title and 20 or more members||
|Shared drives created after June 1, 2017||
|Shared drives visible in the default view||
Query multiple terms with parentheses
You can use parentheses to group multiple query terms together. For example, to search for shared drives created after a specific date and that either have more than 5 organizers or more than 20 members, use this query:
createdDate > '2019-01-01T12:00:00' and (organizerCount > 5 or memberCount > 20)
This search returns all shared drives created after January 1st, 2019 and that have more than 5 organizers or more than 20 members.
Drive API evaluates
or operators from left to right, so the same
search without parentheses would return:
- only shared drives with more than 5 organizers that were created after January 1st, 2019.
- all shared drives with more than 20 members, even those created before January 1st, 2019.