Google Drive Drives API
The drives API from Google Drive — 4 operation(s) for drives.
The drives API from Google Drive — 4 operation(s) for drives.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/google-drive:google-drive-drives-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Google Drive Drives API
description: The Google Drive API allows clients to access resources from Google Drive.
version: v3
contact:
name: Google
url: https://developers.google.com/workspace/drive/
termsOfService: https://developers.google.com/terms
x-generated-from: google-discovery
x-source: https://www.googleapis.com/discovery/v1/apis/drive/v3/rest
x-discovery-revision: '20261102'
x-generated: '2026-11-04'
servers:
- url: https://www.googleapis.com/drive/v3
description: Google Drive REST API v3
security:
- oauth2: []
tags:
- name: drives
paths:
/drives:
get:
operationId: listDrives
summary: Lists the user's shared drives
description: Lists the user's shared drives. 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.
tags:
- drives
x-discovery-id: drive.drives.list
parameters:
- name: useDomainAdminAccess
in: query
required: false
schema:
type: boolean
default: 'false'
description: 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.
- name: pageSize
in: query
required: false
schema:
type: integer
format: int32
default: '10'
description: The maximum number of shared drives to return. The service may return fewer than this value. If unspecified, at most 10 shared drives will be returned. The maximum value is 100; values above 100 will be coerced to 100.
- name: pageToken
in: query
required: false
schema:
type: string
description: Page token for shared drives.
- name: q
in: query
required: false
schema:
type: string
description: Query string for searching shared drives.
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/DriveList'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- oauth2:
- https://www.googleapis.com/auth/drive
- https://www.googleapis.com/auth/drive.readonly
post:
operationId: createDrive
summary: Creates a shared drive
description: Creates a shared drive. For more information, see Manage shared drives.
tags:
- drives
x-discovery-id: drive.drives.create
parameters:
- name: requestId
in: query
required: true
schema:
type: string
description: Required. An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a shared drive. A repeated request by the same user and with the same request ID will avoid creating duplicates by attempting to create the same shared drive. If the shared drive already exists a 409 error will be returned.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Drive'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/Drive'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- oauth2:
- https://www.googleapis.com/auth/drive
/drives/{driveId}:
get:
operationId: getDrive
summary: Gets a shared drive's metadata by ID
description: Gets a shared drive's metadata by ID. For more information, see Manage shared drives.
tags:
- drives
x-discovery-id: drive.drives.get
parameters:
- name: driveId
in: path
required: true
schema:
type: string
description: The ID of the shared drive.
- name: useDomainAdminAccess
in: query
required: false
schema:
type: boolean
default: 'false'
description: Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the shared drive belongs.
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/Drive'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- oauth2:
- https://www.googleapis.com/auth/drive
- https://www.googleapis.com/auth/drive.readonly
patch:
operationId: updateDrive
summary: Updates the metadata for a shared drive
description: Updates the metadata for a shared drive. For more information, see Manage shared drives.
tags:
- drives
x-discovery-id: drive.drives.update
parameters:
- name: driveId
in: path
required: true
schema:
type: string
description: The ID of the shared drive.
- name: useDomainAdminAccess
in: query
required: false
schema:
type: boolean
default: 'false'
description: Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the shared drive belongs.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Drive'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/Drive'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- oauth2:
- https://www.googleapis.com/auth/drive
delete:
operationId: deleteDrive
summary: Permanently deletes a shared drive for which the user is an `organizer`
description: Permanently deletes a shared drive for which the user is an `organizer`. The shared drive cannot contain any untrashed items. For more information, see Manage shared drives.
tags:
- drives
x-discovery-id: drive.drives.delete
parameters:
- name: driveId
in: path
required: true
schema:
type: string
description: The ID of the shared drive.
- name: useDomainAdminAccess
in: query
required: false
schema:
type: boolean
default: 'false'
description: Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the shared drive belongs.
- name: allowItemDeletion
in: query
required: false
schema:
type: boolean
default: 'false'
description: Whether any items inside the shared drive should also be deleted. This option is only supported when `useDomainAdminAccess` is also set to `true`.
responses:
'200':
description: Successful response
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- oauth2:
- https://www.googleapis.com/auth/drive
/drives/{driveId}/hide:
post:
operationId: hideDrives
summary: Hides a shared drive from the default view
description: Hides a shared drive from the default view. For more information, see Manage shared drives.
tags:
- drives
x-discovery-id: drive.drives.hide
parameters:
- name: driveId
in: path
required: true
schema:
type: string
description: The ID of the shared drive.
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/Drive'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- oauth2:
- https://www.googleapis.com/auth/drive
/drives/{driveId}/unhide:
post:
operationId: unhideDrives
summary: Restores a shared drive to the default view
description: Restores a shared drive to the default view. For more information, see Manage shared drives.
tags:
- drives
x-discovery-id: drive.drives.unhide
parameters:
- name: driveId
in: path
required: true
schema:
type: string
description: The ID of the shared drive.
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/Drive'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- oauth2:
- https://www.googleapis.com/auth/drive
components:
schemas:
DriveList:
type: object
description: A list of shared drives.
properties:
kind:
type: string
description: 'Identifies what kind of resource this is. Value: the fixed string `"drive#driveList"`.'
default: drive#driveList
drives:
type: array
description: The list of shared drives. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.
items:
$ref: '#/components/schemas/Drive'
nextPageToken:
type: string
description: 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. The page token is typically valid for several hours. However, if new items are added or removed, your expected results might differ.
ErrorResponse:
type: object
description: Google API error envelope (https://cloud.google.com/apis/design/errors)
properties:
error:
type: object
properties:
code:
type: integer
message:
type: string
errors:
type: array
items:
type: object
properties:
domain:
type: string
reason:
type: string
message:
type: string
location:
type: string
locationType:
type: string
Drive:
type: object
description: Representation of a shared drive. Some resource methods (such as `drives.update`) require a `driveId`. Use the `drives.list` method to retrieve the ID for a shared drive.
properties:
capabilities:
type: object
description: Output only. Capabilities the current user has on this shared drive.
properties:
canRenameDrive:
type: boolean
description: Output only. Whether the current user can rename this shared drive.
canDownload:
type: boolean
description: Output only. Whether the current user can download files in this shared drive.
canRename:
type: boolean
description: Output only. Whether the current user can rename files or folders in this shared drive.
canReadRevisions:
type: boolean
description: Output only. Whether the current user can read the revisions resource of files in this shared drive.
canEdit:
type: boolean
description: Output only. Whether the current user can edit files in this shared drive
canAddChildren:
type: boolean
description: Output only. Whether the current user can add children to folders in this shared drive.
canDeleteDrive:
type: boolean
description: Output only. Whether the current user can delete this shared drive. Attempting to delete the shared drive may still fail if there are untrashed items inside the shared drive.
canTrashChildren:
type: boolean
description: Output only. Whether the current user can trash children from folders in this shared drive.
canChangeDownloadRestriction:
type: boolean
description: Output only. Whether the current user can change organizer-applied download restrictions of this shared drive.
canListChildren:
type: boolean
description: Output only. Whether the current user can list the children of folders in this shared drive.
canChangeCopyRequiresWriterPermissionRestriction:
type: boolean
description: Output only. Whether the current user can change the `copyRequiresWriterPermission` restriction of this shared drive.
canShare:
type: boolean
description: Output only. Whether the current user can share files or folders in this shared drive.
canManageMembers:
type: boolean
description: Output only. Whether the current user can add members to this shared drive or remove them or change their role.
canComment:
type: boolean
description: Output only. Whether the current user can comment on files in this shared drive.
canChangeDomainUsersOnlyRestriction:
type: boolean
description: Output only. Whether the current user can change the `domainUsersOnly` restriction of this shared drive.
canChangeDriveBackground:
type: boolean
description: Output only. Whether the current user can change the background of this shared drive.
canChangeDriveMembersOnlyRestriction:
type: boolean
description: Output only. Whether the current user can change the `driveMembersOnly` restriction of this shared drive.
canDeleteChildren:
type: boolean
description: Output only. Whether the current user can delete children from folders in this shared drive.
canChangeSharingFoldersRequiresOrganizerPermissionRestriction:
type: boolean
description: Output only. Whether the current user can change the `sharingFoldersRequiresOrganizerPermission` restriction of this shared drive.
canResetDriveRestrictions:
type: boolean
description: Output only. Whether the current user can reset the shared drive restrictions to defaults.
canCopy:
type: boolean
description: Output only. Whether the current user can copy files in this shared drive.
restrictions:
type: object
description: A set of restrictions that apply to this shared drive or items inside this shared drive. Note that restrictions can't be set when creating a shared drive. To add a restriction, first create a shared drive and then use `drives.update` to add restrictions.
properties:
copyRequiresWriterPermission:
type: boolean
description: Whether the options to copy, print, or download files inside this shared drive, should be disabled for readers and commenters. When this restriction is set to `true`, it will override the similarly named field to `true` for any file inside this shared drive.
sharingFoldersRequiresOrganizerPermission:
type: boolean
description: If true, only users with the organizer role can share folders. If false, users with either the organizer role or the file organizer role can share folders.
driveMembersOnly:
type: boolean
description: Whether access to items inside this shared drive is restricted to its members.
domainUsersOnly:
type: boolean
description: Whether access to this shared drive and items inside this shared drive is restricted to users of the domain to which this shared drive belongs. This restriction may be overridden by other sharing policies controlled outside of this shared drive.
downloadRestriction:
$ref: '#/components/schemas/DownloadRestriction'
adminManagedRestrictions:
type: boolean
description: Whether administrative privileges on this shared drive are required to modify restrictions.
hidden:
type: boolean
description: Whether the shared drive is hidden from default view.
createdTime:
type: string
description: The time at which the shared drive was created (RFC 3339 date-time).
format: date-time
backgroundImageFile:
type: object
description: An image file and cropping parameters from which a background image for this shared drive is set. This is a write only field; it can only be set on `drive.drives.update` requests that don't set `themeId`. When specified, all fields of the `backgroundImageFile` must be set.
properties:
xCoordinate:
type: number
description: The X coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the horizontal distance from the left side of the entire image to the left side of the cropping area divided by the width of the entire image.
format: float
id:
type: string
description: The ID of an image file in Google Drive to use for the background image.
width:
type: number
description: The width of the cropped image in the closed range of 0 to 1. This value represents the width of the cropped image divided by the width of the entire image. The height is computed by applying a width to height aspect ratio of 80 to 9. The resulting image must be at least 1280 pixels wide and 144 pixels high.
format: float
yCoordinate:
type: number
description: The Y coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the vertical distance from the top side of the entire image to the top side of the cropping area divided by the height of the entire image.
format: float
name:
type: string
description: The name of this shared drive.
orgUnitId:
type: string
description: Output only. The organizational unit of this shared drive. This field is only populated on `drives.list` responses when the `useDomainAdminAccess` parameter is set to `true`.
id:
type: string
description: Output only. The ID of this shared drive which is also the ID of the top level folder of this shared drive.
backgroundImageLink:
type: string
description: Output only. A short-lived link to this shared drive's background image.
kind:
type: string
description: 'Output only. Identifies what kind of resource this is. Value: the fixed string `"drive#drive"`.'
default: drive#drive
colorRgb:
type: string
description: The color of this shared drive as an RGB hex string. It can only be set on a `drive.drives.update` request that does not set `themeId`.
themeId:
type: string
description: The ID of the theme from which the background image and color will be set. The set of possible `driveThemes` can be retrieved from a `drive.about.get` response. When not specified on a `drive.drives.create` request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set `colorRgb` or `backgroundImageFile`.
DownloadRestriction:
type: object
description: A restriction for copy and download of the file.
properties:
restrictedForReaders:
type: boolean
description: Whether download and copy is restricted for readers.
restrictedForWriters:
type: boolean
description: Whether download and copy is restricted for writers. If true, download is also restricted for readers.
securitySchemes:
oauth2:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://accounts.google.com/o/oauth2/auth
tokenUrl: https://oauth2.googleapis.com/token
scopes:
https://www.googleapis.com/auth/drive.scripts: Modify your Google Apps Script scripts' behavior
https://www.googleapis.com/auth/drive.meet.readonly: See and download your Google Drive files that were created or edited by Google Meet.
https://www.googleapis.com/auth/drive: See, edit, create, and delete all of your Google Drive files
https://www.googleapis.com/auth/drive.appdata: See, create, and delete its own configuration data in your Google Drive
https://www.googleapis.com/auth/drive.file: See, edit, create, and delete only the specific Google Drive files you use with this app
https://www.googleapis.com/auth/drive.apps.readonly: View your Google Drive apps
https://www.googleapis.com/auth/drive.photos.readonly: View the photos, videos and albums in your Google Photos
https://www.googleapis.com/auth/drive.readonly: See and download all your Google Drive files
https://www.googleapis.com/auth/drive.metadata: View and manage metadata of files in your Google Drive
https://www.googleapis.com/auth/drive.metadata.readonly: See information about your Google Drive files