This API reference is organized by resource type. Each resource type has one or more data representations and one or more methods.
Resource types
About
For About Resource details, see the resource representation page.
Method | HTTP request | Description |
---|---|---|
URIs relative to https://www.googleapis.com/drive/v3, unless otherwise noted | ||
get |
GET /about
|
Gets information about the user, the user's Drive, and system capabilities.
Required query parameters:
fields |
Changes
For Changes Resource details, see the resource representation page.
Method | HTTP request | Description |
---|---|---|
URIs relative to https://www.googleapis.com/drive/v3, unless otherwise noted | ||
getStartPageToken |
GET /changes/startPageToken
|
Gets the starting pageToken for listing future changes. |
list |
GET /changes
|
Lists the changes for a user or shared drive.
Required query parameters:
pageToken |
watch |
POST /changes/watch
|
Subscribes to changes for a user. To use this method, you must include the pageToken query parameter.
|
Channels
For Channels Resource details, see the resource representation page.
Method | HTTP request | Description |
---|---|---|
URIs relative to https://www.googleapis.com/drive/v3, unless otherwise noted | ||
stop |
POST /channels/stop
|
Stop watching resources through this channel |
Comments
For Comments Resource details, see the resource representation page.
Method | HTTP request | Description |
---|---|---|
URIs relative to https://www.googleapis.com/drive/v3, unless otherwise noted | ||
create |
POST /files/fileId/comments
|
Creates a comment on a file.
Required query parameters:
fields |
delete |
DELETE /files/fileId/comments/commentId
|
Deletes a comment. |
get |
GET /files/fileId/comments/commentId
|
Gets a comment by ID.
Required query parameters:
fields |
list |
GET /files/fileId/comments
|
Lists a file's comments.
Required query parameters:
fields |
update |
PATCH /files/fileId/comments/commentId
|
Updates a comment with patch semantics.
Required query parameters:
fields |
Files
For Files Resource details, see the resource representation page.
Method | HTTP request | Description |
---|---|---|
URIs relative to https://www.googleapis.com/drive/v3, unless otherwise noted | ||
copy |
POST /files/fileId/copy
|
Creates a copy of a file and applies any requested updates with patch semantics. Folders cannot be copied. |
create |
POST
and POST /files
|
Creates a file. |
delete |
DELETE /files/fileId
|
Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted. |
emptyTrash |
DELETE /files/trash
|
Permanently deletes all of the user's trashed files. |
export |
GET /files/fileId/export
|
Exports a Google Workspace document to the requested MIME type and returns exported byte content. Note that the exported content is limited to 10MB.
Required query parameters:
mimeType |
generateIds |
GET /files/generateIds
|
Generates a set of file IDs which can be provided in create or copy requests. |
get |
GET /files/fileId
|
Gets a file's metadata or content by ID. |
list |
GET /files
|
Lists or searches files. |
update |
PATCH
and PATCH /files/fileId
|
Updates a file's metadata and/or content. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might change automatically, such as modifiedDate. This method supports patch semantics. |
watch |
POST /files/fileId/watch
|
Subscribes to changes to a file. While you can establish a channel for changes to a file on a shared drive, a change to a shared drive file won't create a notification. |
listLabels |
GET /files/fileId/listLabels
|
Lists the labels on a file. |
modifyLabels |
POST /files/fileId/modifyLabels
|
Modifies the set of labels on a file. |
Permissions
For Permissions Resource details, see the resource representation page.
Method | HTTP request | Description |
---|---|---|
URIs relative to https://www.googleapis.com/drive/v3, unless otherwise noted | ||
create |
POST /files/fileId/permissions
|
Creates a permission for a file or shared drive. For more information on creating permissions, see Share files, folders & drives. |
delete |
DELETE /files/fileId/permissions/permissionId
|
Deletes a permission. |
get |
GET /files/fileId/permissions/permissionId
|
Gets a permission by ID. |
list |
GET /files/fileId/permissions
|
Lists a file's or shared drive's permissions. |
update |
PATCH /files/fileId/permissions/permissionId
|
Updates a permission with patch semantics. |
Replies
For Replies Resource details, see the resource representation page.
Method | HTTP request | Description |
---|---|---|
URIs relative to https://www.googleapis.com/drive/v3, unless otherwise noted | ||
create |
POST /files/fileId/comments/commentId/replies
|
Creates a reply to a comment.
Required query parameters:
fields |
delete |
DELETE /files/fileId/comments/commentId/replies/replyId
|
Deletes a reply. |
get |
GET /files/fileId/comments/commentId/replies/replyId
|
Gets a reply by ID.
Required query parameters:
fields |
list |
GET /files/fileId/comments/commentId/replies
|
Lists a comment's replies.
Required query parameters:
fields |
update |
PATCH /files/fileId/comments/commentId/replies/replyId
|
Updates a reply with patch semantics.
Required query parameters:
fields |
Revisions
For Revisions Resource details, see the resource representation page.
Method | HTTP request | Description |
---|---|---|
URIs relative to https://www.googleapis.com/drive/v3, unless otherwise noted | ||
delete |
DELETE /files/fileId/revisions/revisionId
|
Permanently deletes a file version. You can only delete revisions for files with binary content in Google Drive, like images or videos. Revisions for other files, like Google Docs or Sheets, and the last remaining file version can't be deleted. |
get |
GET /files/fileId/revisions/revisionId
|
Gets a revision's metadata or content by ID. |
list |
GET /files/fileId/revisions
|
Lists a file's revisions. |
update |
PATCH /files/fileId/revisions/revisionId
|
Updates a revision with patch semantics. |
Drives
For Drives Resource details, see the resource representation page.
Method | HTTP request | Description |
---|---|---|
URIs relative to https://www.googleapis.com/drive/v3, unless otherwise noted | ||
create |
POST /drives
|
Creates a shared drive.
Required query parameters:
requestId |
delete |
DELETE /drives/driveId
|
Permanently deletes a shared drive for which the user is an organizer. The shared drive cannot contain any untrashed items. |
get |
GET /drives/driveId
|
Gets a shared drive's metadata by ID. |
hide |
POST /drives/driveId/hide
|
Hides a shared drive from the default view. |
list |
GET /drives
|
Lists the user's shared drives. |
unhide |
POST /drives/driveId/unhide
|
Restores a shared drive to the default view. |
update |
PATCH /drives/driveId
|
Updates the metadata for a shared drive. |