You can call
drives.list without any parameters, which returns shared drives where the user is a member. To search for a specific set of shared drives, write a query that includes query terms and operators. Use the query string
q, which allows you to specify different operators and terms that you want the query to return.
A basic query contains three parts: a term, an operator and a value for the returned query result. This example shows a basic query:
`title` `=` 'Group project drive'
titleis the query term.
=operator specifies the condition for the query term.
- "Group project drive" is the query term's value.
You can modify your searches using the query term operators, which provide conditions for the query terms. To see which operators you can use with each query term, see: Search query terms.
Query search examples
This table shows some basic queries.
|What you want to query||Example|
|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||
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 that either have more than 5 organizers, or more than 20 members, consider 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 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, but would return all shared drives with more than 20 members, even those created before January 1st, 2019.