Drives: list

Lists the user's shared drives. Try it now.

This method accepts the q parameter, which is a search query combining one or more search terms. For more information, see the Search for shared drives guide.

Request

HTTP request

GET https://www.googleapis.com/drive/v2/drives

Parameters

Parameter name Value Description
Optional query parameters
maxResults integer Maximum number of shared drives to return. Acceptable values are 1 to 100, inclusive. (Default: 10)
pageToken string Page token for shared drives.
q string Query string for searching shared drives. See the "Search for shared drives" guide for supported syntax.
useDomainAdminAccess boolean Issue the request as a domain administrator; if set to true, then all shared drives of the domain in which the requester is an administrator are returned. (Default: false)

Authorization

This request requires authorization with at least one of the following scopes:

Scope
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.readonly

Some scopes are restricted and require a security assessment for your app to use them. For more information, see the authentication and authorization page.

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response body with the following structure:

{
  "kind": "drive#driveList",
  "nextPageToken": string,
  "items": [
    drives Resource
  ]
}
Property name Value Description Notes
kind string This is always drive#driveList
nextPageToken string The page token for the next page of shared drives. This will be absent if the end of the list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results.
items[] list The list of shared drives. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.

Try it!

Use the APIs Explorer below to call this method on live data and see the response.

Send feedback about...

Google Drive API
Google Drive API
Need help? Visit our support page.