blob: 22d8eba967023e12fa155fe1872eeb251c371ecb [file] [log] [blame]
{
"auth": {
"oauth2": {
"scopes": {
"https://www.googleapis.com/auth/drive": {
"description": "See, edit, create, and delete all of your Google Drive files"
},
"https://www.googleapis.com/auth/drive.appdata": {
"description": "View and manage its own configuration data in your Google Drive"
},
"https://www.googleapis.com/auth/drive.file": {
"description": "View and manage Google Drive files and folders that you have opened or created with this app"
},
"https://www.googleapis.com/auth/drive.metadata": {
"description": "View and manage metadata of files in your Google Drive"
},
"https://www.googleapis.com/auth/drive.metadata.readonly": {
"description": "View metadata for files in your Google Drive"
},
"https://www.googleapis.com/auth/drive.photos.readonly": {
"description": "View the photos, videos and albums in your Google Photos"
},
"https://www.googleapis.com/auth/drive.readonly": {
"description": "See and download all your Google Drive files"
},
"https://www.googleapis.com/auth/drive.scripts": {
"description": "Modify your Google Apps Script scripts' behavior"
}
}
}
},
"basePath": "/drive/v3/",
"baseUrl": "https://www.googleapis.com/drive/v3/",
"batchPath": "batch/drive/v3",
"description": "Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.",
"discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/drive/",
"etag": "\"LYADMvHWYH2ul9D6m9UT9gT77YM/ixkLftF7SIEiqkkwNYopCpZnQlw\"",
"icons": {
"x16": "https://ssl.gstatic.com/docs/doclist/images/drive_icon_16.png",
"x32": "https://ssl.gstatic.com/docs/doclist/images/drive_icon_32.png"
},
"id": "drive:v3",
"kind": "discovery#restDescription",
"name": "drive",
"ownerDomain": "google.com",
"ownerName": "Google",
"parameters": {
"alt": {
"default": "json",
"description": "Data format for the response.",
"enum": [
"json"
],
"enumDescriptions": [
"Responses with Content-Type of application/json"
],
"location": "query",
"type": "string"
},
"fields": {
"description": "Selector specifying which fields to include in a partial response.",
"location": "query",
"type": "string"
},
"key": {
"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
"location": "query",
"type": "string"
},
"oauth_token": {
"description": "OAuth 2.0 token for the current user.",
"location": "query",
"type": "string"
},
"prettyPrint": {
"default": "true",
"description": "Returns response with indentations and line breaks.",
"location": "query",
"type": "boolean"
},
"quotaUser": {
"description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.",
"location": "query",
"type": "string"
},
"userIp": {
"description": "Deprecated. Please use quotaUser instead.",
"location": "query",
"type": "string"
}
},
"protocol": "rest",
"resources": {
"about": {
"methods": {
"get": {
"description": "Gets information about the user, the user's Drive, and system capabilities.",
"httpMethod": "GET",
"id": "drive.about.get",
"path": "about",
"response": {
"$ref": "About"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.metadata",
"https://www.googleapis.com/auth/drive.metadata.readonly",
"https://www.googleapis.com/auth/drive.photos.readonly",
"https://www.googleapis.com/auth/drive.readonly"
]
}
}
},
"changes": {
"methods": {
"getStartPageToken": {
"description": "Gets the starting pageToken for listing future changes.",
"httpMethod": "GET",
"id": "drive.changes.getStartPageToken",
"parameters": {
"driveId": {
"description": "The ID of the shared drive for which the starting pageToken for listing future changes from that shared drive will be returned.",
"location": "query",
"type": "string"
},
"supportsAllDrives": {
"default": "false",
"description": "Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.",
"location": "query",
"type": "boolean"
},
"supportsTeamDrives": {
"default": "false",
"description": "Deprecated use supportsAllDrives instead.",
"location": "query",
"type": "boolean"
},
"teamDriveId": {
"description": "Deprecated use driveId instead.",
"location": "query",
"type": "string"
}
},
"path": "changes/startPageToken",
"response": {
"$ref": "StartPageToken"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.metadata",
"https://www.googleapis.com/auth/drive.metadata.readonly",
"https://www.googleapis.com/auth/drive.photos.readonly",
"https://www.googleapis.com/auth/drive.readonly"
]
},
"list": {
"description": "Lists the changes for a user or shared drive.",
"httpMethod": "GET",
"id": "drive.changes.list",
"parameterOrder": [
"pageToken"
],
"parameters": {
"driveId": {
"description": "The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.",
"location": "query",
"type": "string"
},
"includeCorpusRemovals": {
"default": "false",
"description": "Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.",
"location": "query",
"type": "boolean"
},
"includeItemsFromAllDrives": {
"default": "false",
"description": "Deprecated - Whether both My Drive and shared drive items should be included in results. This parameter will only be effective until June 1, 2020. Afterwards shared drive items will be included in the results.",
"location": "query",
"type": "boolean"
},
"includeRemoved": {
"default": "true",
"description": "Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.",
"location": "query",
"type": "boolean"
},
"includeTeamDriveItems": {
"default": "false",
"description": "Deprecated use includeItemsFromAllDrives instead.",
"location": "query",
"type": "boolean"
},
"pageSize": {
"default": "100",
"description": "The maximum number of changes to return per page.",
"format": "int32",
"location": "query",
"maximum": "1000",
"minimum": "1",
"type": "integer"
},
"pageToken": {
"description": "The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method.",
"location": "query",
"required": true,
"type": "string"
},
"restrictToMyDrive": {
"default": "false",
"description": "Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive.",
"location": "query",
"type": "boolean"
},
"spaces": {
"default": "drive",
"description": "A comma-separated list of spaces to query within the user corpus. Supported values are 'drive', 'appDataFolder' and 'photos'.",
"location": "query",
"type": "string"
},
"supportsAllDrives": {
"default": "false",
"description": "Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.",
"location": "query",
"type": "boolean"
},
"supportsTeamDrives": {
"default": "false",
"description": "Deprecated use supportsAllDrives instead.",
"location": "query",
"type": "boolean"
},
"teamDriveId": {
"description": "Deprecated use driveId instead.",
"location": "query",
"type": "string"
}
},
"path": "changes",
"response": {
"$ref": "ChangeList"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.metadata",
"https://www.googleapis.com/auth/drive.metadata.readonly",
"https://www.googleapis.com/auth/drive.photos.readonly",
"https://www.googleapis.com/auth/drive.readonly"
],
"supportsSubscription": true
},
"watch": {
"description": "Subscribes to changes for a user.",
"httpMethod": "POST",
"id": "drive.changes.watch",
"parameterOrder": [
"pageToken"
],
"parameters": {
"driveId": {
"description": "The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.",
"location": "query",
"type": "string"
},
"includeCorpusRemovals": {
"default": "false",
"description": "Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.",
"location": "query",
"type": "boolean"
},
"includeItemsFromAllDrives": {
"default": "false",
"description": "Deprecated - Whether both My Drive and shared drive items should be included in results. This parameter will only be effective until June 1, 2020. Afterwards shared drive items will be included in the results.",
"location": "query",
"type": "boolean"
},
"includeRemoved": {
"default": "true",
"description": "Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.",
"location": "query",
"type": "boolean"
},
"includeTeamDriveItems": {
"default": "false",
"description": "Deprecated use includeItemsFromAllDrives instead.",
"location": "query",
"type": "boolean"
},
"pageSize": {
"default": "100",
"description": "The maximum number of changes to return per page.",
"format": "int32",
"location": "query",
"maximum": "1000",
"minimum": "1",
"type": "integer"
},
"pageToken": {
"description": "The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method.",
"location": "query",
"required": true,
"type": "string"
},
"restrictToMyDrive": {
"default": "false",
"description": "Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive.",
"location": "query",
"type": "boolean"
},
"spaces": {
"default": "drive",
"description": "A comma-separated list of spaces to query within the user corpus. Supported values are 'drive', 'appDataFolder' and 'photos'.",
"location": "query",
"type": "string"
},
"supportsAllDrives": {
"default": "false",
"description": "Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.",
"location": "query",
"type": "boolean"
},
"supportsTeamDrives": {
"default": "false",
"description": "Deprecated use supportsAllDrives instead.",
"location": "query",
"type": "boolean"
},
"teamDriveId": {
"description": "Deprecated use driveId instead.",
"location": "query",
"type": "string"
}
},
"path": "changes/watch",
"request": {
"$ref": "Channel",
"parameterName": "resource"
},
"response": {
"$ref": "Channel"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.metadata",
"https://www.googleapis.com/auth/drive.metadata.readonly",
"https://www.googleapis.com/auth/drive.photos.readonly",
"https://www.googleapis.com/auth/drive.readonly"
],
"supportsSubscription": true
}
}
},
"channels": {
"methods": {
"stop": {
"description": "Stop watching resources through this channel",
"httpMethod": "POST",
"id": "drive.channels.stop",
"path": "channels/stop",
"request": {
"$ref": "Channel",
"parameterName": "resource"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.metadata",
"https://www.googleapis.com/auth/drive.metadata.readonly",
"https://www.googleapis.com/auth/drive.photos.readonly",
"https://www.googleapis.com/auth/drive.readonly"
]
}
}
},
"comments": {
"methods": {
"create": {
"description": "Creates a new comment on a file.",
"httpMethod": "POST",
"id": "drive.comments.create",
"parameterOrder": [
"fileId"
],
"parameters": {
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "files/{fileId}/comments",
"request": {
"$ref": "Comment"
},
"response": {
"$ref": "Comment"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file"
]
},
"delete": {
"description": "Deletes a comment.",
"httpMethod": "DELETE",
"id": "drive.comments.delete",
"parameterOrder": [
"fileId",
"commentId"
],
"parameters": {
"commentId": {
"description": "The ID of the comment.",
"location": "path",
"required": true,
"type": "string"
},
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "files/{fileId}/comments/{commentId}",
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file"
]
},
"get": {
"description": "Gets a comment by ID.",
"httpMethod": "GET",
"id": "drive.comments.get",
"parameterOrder": [
"fileId",
"commentId"
],
"parameters": {
"commentId": {
"description": "The ID of the comment.",
"location": "path",
"required": true,
"type": "string"
},
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
},
"includeDeleted": {
"default": "false",
"description": "Whether to return deleted comments. Deleted comments will not include their original content.",
"location": "query",
"type": "boolean"
}
},
"path": "files/{fileId}/comments/{commentId}",
"response": {
"$ref": "Comment"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.readonly"
]
},
"list": {
"description": "Lists a file's comments.",
"httpMethod": "GET",
"id": "drive.comments.list",
"parameterOrder": [
"fileId"
],
"parameters": {
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
},
"includeDeleted": {
"default": "false",
"description": "Whether to include deleted comments. Deleted comments will not include their original content.",
"location": "query",
"type": "boolean"
},
"pageSize": {
"default": "20",
"description": "The maximum number of comments to return per page.",
"format": "int32",
"location": "query",
"maximum": "100",
"minimum": "1",
"type": "integer"
},
"pageToken": {
"description": "The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.",
"location": "query",
"type": "string"
},
"startModifiedTime": {
"description": "The minimum value of 'modifiedTime' for the result comments (RFC 3339 date-time).",
"location": "query",
"type": "string"
}
},
"path": "files/{fileId}/comments",
"response": {
"$ref": "CommentList"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.readonly"
]
},
"update": {
"description": "Updates a comment with patch semantics.",
"httpMethod": "PATCH",
"id": "drive.comments.update",
"parameterOrder": [
"fileId",
"commentId"
],
"parameters": {
"commentId": {
"description": "The ID of the comment.",
"location": "path",
"required": true,
"type": "string"
},
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "files/{fileId}/comments/{commentId}",
"request": {
"$ref": "Comment"
},
"response": {
"$ref": "Comment"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file"
]
}
}
},
"drives": {
"methods": {
"create": {
"description": "Creates a new shared drive.",
"httpMethod": "POST",
"id": "drive.drives.create",
"parameterOrder": [
"requestId"
],
"parameters": {
"requestId": {
"description": "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.",
"location": "query",
"required": true,
"type": "string"
}
},
"path": "drives",
"request": {
"$ref": "Drive"
},
"response": {
"$ref": "Drive"
},
"scopes": [
"https://www.googleapis.com/auth/drive"
]
},
"delete": {
"description": "Permanently deletes a shared drive for which the user is an organizer. The shared drive cannot contain any untrashed items.",
"httpMethod": "DELETE",
"id": "drive.drives.delete",
"parameterOrder": [
"driveId"
],
"parameters": {
"driveId": {
"description": "The ID of the shared drive.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "drives/{driveId}",
"scopes": [
"https://www.googleapis.com/auth/drive"
]
},
"get": {
"description": "Gets a shared drive's metadata by ID.",
"httpMethod": "GET",
"id": "drive.drives.get",
"parameterOrder": [
"driveId"
],
"parameters": {
"driveId": {
"description": "The ID of the shared drive.",
"location": "path",
"required": true,
"type": "string"
},
"useDomainAdminAccess": {
"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.",
"location": "query",
"type": "boolean"
}
},
"path": "drives/{driveId}",
"response": {
"$ref": "Drive"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.readonly"
]
},
"hide": {
"description": "Hides a shared drive from the default view.",
"httpMethod": "POST",
"id": "drive.drives.hide",
"parameterOrder": [
"driveId"
],
"parameters": {
"driveId": {
"description": "The ID of the shared drive.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "drives/{driveId}/hide",
"response": {
"$ref": "Drive"
},
"scopes": [
"https://www.googleapis.com/auth/drive"
]
},
"list": {
"description": "Lists the user's shared drives.",
"httpMethod": "GET",
"id": "drive.drives.list",
"parameters": {
"pageSize": {
"default": "10",
"description": "Maximum number of shared drives to return.",
"format": "int32",
"location": "query",
"maximum": "100",
"minimum": "1",
"type": "integer"
},
"pageToken": {
"description": "Page token for shared drives.",
"location": "query",
"type": "string"
},
"q": {
"description": "Query string for searching shared drives.",
"location": "query",
"type": "string"
},
"useDomainAdminAccess": {
"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.",
"location": "query",
"type": "boolean"
}
},
"path": "drives",
"response": {
"$ref": "DriveList"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.readonly"
]
},
"unhide": {
"description": "Restores a shared drive to the default view.",
"httpMethod": "POST",
"id": "drive.drives.unhide",
"parameterOrder": [
"driveId"
],
"parameters": {
"driveId": {
"description": "The ID of the shared drive.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "drives/{driveId}/unhide",
"response": {
"$ref": "Drive"
},
"scopes": [
"https://www.googleapis.com/auth/drive"
]
},
"update": {
"description": "Updates the metadate for a shared drive.",
"httpMethod": "PATCH",
"id": "drive.drives.update",
"parameterOrder": [
"driveId"
],
"parameters": {
"driveId": {
"description": "The ID of the shared drive.",
"location": "path",
"required": true,
"type": "string"
},
"useDomainAdminAccess": {
"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.",
"location": "query",
"type": "boolean"
}
},
"path": "drives/{driveId}",
"request": {
"$ref": "Drive"
},
"response": {
"$ref": "Drive"
},
"scopes": [
"https://www.googleapis.com/auth/drive"
]
}
}
},
"files": {
"methods": {
"copy": {
"description": "Creates a copy of a file and applies any requested updates with patch semantics.",
"httpMethod": "POST",
"id": "drive.files.copy",
"parameterOrder": [
"fileId"
],
"parameters": {
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
},
"ignoreDefaultVisibility": {
"default": "false",
"description": "Whether to ignore the domain's default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders.",
"location": "query",
"type": "boolean"
},
"keepRevisionForever": {
"default": "false",
"description": "Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions.",
"location": "query",
"type": "boolean"
},
"ocrLanguage": {
"description": "A language hint for OCR processing during image import (ISO 639-1 code).",
"location": "query",
"type": "string"
},
"supportsAllDrives": {
"default": "false",
"description": "Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.",
"location": "query",
"type": "boolean"
},
"supportsTeamDrives": {
"default": "false",
"description": "Deprecated use supportsAllDrives instead.",
"location": "query",
"type": "boolean"
}
},
"path": "files/{fileId}/copy",
"request": {
"$ref": "File"
},
"response": {
"$ref": "File"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.photos.readonly"
]
},
"create": {
"description": "Creates a new file.",
"httpMethod": "POST",
"id": "drive.files.create",
"mediaUpload": {
"accept": [
"*/*"
],
"maxSize": "5120GB",
"protocols": {
"resumable": {
"multipart": true,
"path": "/resumable/upload/drive/v3/files"
},
"simple": {
"multipart": true,
"path": "/upload/drive/v3/files"
}
}
},
"parameters": {
"ignoreDefaultVisibility": {
"default": "false",
"description": "Whether to ignore the domain's default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders.",
"location": "query",
"type": "boolean"
},
"keepRevisionForever": {
"default": "false",
"description": "Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions.",
"location": "query",
"type": "boolean"
},
"ocrLanguage": {
"description": "A language hint for OCR processing during image import (ISO 639-1 code).",
"location": "query",
"type": "string"
},
"supportsAllDrives": {
"default": "false",
"description": "Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.",
"location": "query",
"type": "boolean"
},
"supportsTeamDrives": {
"default": "false",
"description": "Deprecated use supportsAllDrives instead.",
"location": "query",
"type": "boolean"
},
"useContentAsIndexableText": {
"default": "false",
"description": "Whether to use the uploaded content as indexable text.",
"location": "query",
"type": "boolean"
}
},
"path": "files",
"request": {
"$ref": "File"
},
"response": {
"$ref": "File"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.file"
],
"supportsMediaUpload": true,
"supportsSubscription": true
},
"delete": {
"description": "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.",
"httpMethod": "DELETE",
"id": "drive.files.delete",
"parameterOrder": [
"fileId"
],
"parameters": {
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
},
"supportsAllDrives": {
"default": "false",
"description": "Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.",
"location": "query",
"type": "boolean"
},
"supportsTeamDrives": {
"default": "false",
"description": "Deprecated use supportsAllDrives instead.",
"location": "query",
"type": "boolean"
}
},
"path": "files/{fileId}",
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.file"
]
},
"emptyTrash": {
"description": "Permanently deletes all of the user's trashed files.",
"httpMethod": "DELETE",
"id": "drive.files.emptyTrash",
"path": "files/trash",
"scopes": [
"https://www.googleapis.com/auth/drive"
]
},
"export": {
"description": "Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.",
"httpMethod": "GET",
"id": "drive.files.export",
"parameterOrder": [
"fileId",
"mimeType"
],
"parameters": {
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
},
"mimeType": {
"description": "The MIME type of the format requested for this export.",
"location": "query",
"required": true,
"type": "string"
}
},
"path": "files/{fileId}/export",
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.readonly"
],
"supportsMediaDownload": true
},
"generateIds": {
"description": "Generates a set of file IDs which can be provided in create or copy requests.",
"httpMethod": "GET",
"id": "drive.files.generateIds",
"parameters": {
"count": {
"default": "10",
"description": "The number of IDs to return.",
"format": "int32",
"location": "query",
"maximum": "1000",
"minimum": "1",
"type": "integer"
},
"space": {
"default": "drive",
"description": "The space in which the IDs can be used to create new files. Supported values are 'drive' and 'appDataFolder'.",
"location": "query",
"type": "string"
}
},
"path": "files/generateIds",
"response": {
"$ref": "GeneratedIds"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.file"
]
},
"get": {
"description": "Gets a file's metadata or content by ID.",
"httpMethod": "GET",
"id": "drive.files.get",
"parameterOrder": [
"fileId"
],
"parameters": {
"acknowledgeAbuse": {
"default": "false",
"description": "Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.",
"location": "query",
"type": "boolean"
},
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
},
"supportsAllDrives": {
"default": "false",
"description": "Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.",
"location": "query",
"type": "boolean"
},
"supportsTeamDrives": {
"default": "false",
"description": "Deprecated use supportsAllDrives instead.",
"location": "query",
"type": "boolean"
}
},
"path": "files/{fileId}",
"response": {
"$ref": "File"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.metadata",
"https://www.googleapis.com/auth/drive.metadata.readonly",
"https://www.googleapis.com/auth/drive.photos.readonly",
"https://www.googleapis.com/auth/drive.readonly"
],
"supportsMediaDownload": true,
"supportsSubscription": true,
"useMediaDownloadService": true
},
"list": {
"description": "Lists or searches files.",
"httpMethod": "GET",
"id": "drive.files.list",
"parameters": {
"corpora": {
"description": "Bodies of items (files/documents) to which the query applies. Supported bodies are 'user', 'domain', 'drive' and 'allDrives'. Prefer 'user' or 'drive' to 'allDrives' for efficiency.",
"location": "query",
"type": "string"
},
"corpus": {
"description": "The source of files to list. Deprecated: use 'corpora' instead.",
"enum": [
"domain",
"user"
],
"enumDescriptions": [
"Files shared to the user's domain.",
"Files owned by or shared to the user."
],
"location": "query",
"type": "string"
},
"driveId": {
"description": "ID of the shared drive to search.",
"location": "query",
"type": "string"
},
"includeItemsFromAllDrives": {
"default": "false",
"description": "Deprecated - Whether both My Drive and shared drive items should be included in results. This parameter will only be effective until June 1, 2020. Afterwards shared drive items will be included in the results.",
"location": "query",
"type": "boolean"
},
"includeTeamDriveItems": {
"default": "false",
"description": "Deprecated use includeItemsFromAllDrives instead.",
"location": "query",
"type": "boolean"
},
"orderBy": {
"description": "A comma-separated list of sort keys. Valid keys are 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime', 'name', 'name_natural', 'quotaBytesUsed', 'recency', 'sharedWithMeTime', 'starred', and 'viewedByMeTime'. Each key sorts ascending by default, but may be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedTime desc,name. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.",
"location": "query",
"type": "string"
},
"pageSize": {
"default": "100",
"description": "The maximum number of files to return per page. Partial or empty result pages are possible even before the end of the files list has been reached.",
"format": "int32",
"location": "query",
"maximum": "1000",
"minimum": "1",
"type": "integer"
},
"pageToken": {
"description": "The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.",
"location": "query",
"type": "string"
},
"q": {
"description": "A query for filtering the file results. See the \"Search for Files\" guide for supported syntax.",
"location": "query",
"type": "string"
},
"spaces": {
"default": "drive",
"description": "A comma-separated list of spaces to query within the corpus. Supported values are 'drive', 'appDataFolder' and 'photos'.",
"location": "query",
"type": "string"
},
"supportsAllDrives": {
"default": "false",
"description": "Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.",
"location": "query",
"type": "boolean"
},
"supportsTeamDrives": {
"default": "false",
"description": "Deprecated use supportsAllDrives instead.",
"location": "query",
"type": "boolean"
},
"teamDriveId": {
"description": "Deprecated use driveId instead.",
"location": "query",
"type": "string"
}
},
"path": "files",
"response": {
"$ref": "FileList"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.metadata",
"https://www.googleapis.com/auth/drive.metadata.readonly",
"https://www.googleapis.com/auth/drive.photos.readonly",
"https://www.googleapis.com/auth/drive.readonly"
]
},
"update": {
"description": "Updates a file's metadata and/or content with patch semantics.",
"httpMethod": "PATCH",
"id": "drive.files.update",
"mediaUpload": {
"accept": [
"*/*"
],
"maxSize": "5120GB",
"protocols": {
"resumable": {
"multipart": true,
"path": "/resumable/upload/drive/v3/files/{fileId}"
},
"simple": {
"multipart": true,
"path": "/upload/drive/v3/files/{fileId}"
}
}
},
"parameterOrder": [
"fileId"
],
"parameters": {
"addParents": {
"description": "A comma-separated list of parent IDs to add.",
"location": "query",
"type": "string"
},
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
},
"keepRevisionForever": {
"default": "false",
"description": "Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions.",
"location": "query",
"type": "boolean"
},
"ocrLanguage": {
"description": "A language hint for OCR processing during image import (ISO 639-1 code).",
"location": "query",
"type": "string"
},
"removeParents": {
"description": "A comma-separated list of parent IDs to remove.",
"location": "query",
"type": "string"
},
"supportsAllDrives": {
"default": "false",
"description": "Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.",
"location": "query",
"type": "boolean"
},
"supportsTeamDrives": {
"default": "false",
"description": "Deprecated use supportsAllDrives instead.",
"location": "query",
"type": "boolean"
},
"useContentAsIndexableText": {
"default": "false",
"description": "Whether to use the uploaded content as indexable text.",
"location": "query",
"type": "boolean"
}
},
"path": "files/{fileId}",
"request": {
"$ref": "File"
},
"response": {
"$ref": "File"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.metadata",
"https://www.googleapis.com/auth/drive.scripts"
],
"supportsMediaUpload": true
},
"watch": {
"description": "Subscribes to changes to a file",
"httpMethod": "POST",
"id": "drive.files.watch",
"parameterOrder": [
"fileId"
],
"parameters": {
"acknowledgeAbuse": {
"default": "false",
"description": "Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.",
"location": "query",
"type": "boolean"
},
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
},
"supportsAllDrives": {
"default": "false",
"description": "Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.",
"location": "query",
"type": "boolean"
},
"supportsTeamDrives": {
"default": "false",
"description": "Deprecated use supportsAllDrives instead.",
"location": "query",
"type": "boolean"
}
},
"path": "files/{fileId}/watch",
"request": {
"$ref": "Channel",
"parameterName": "resource"
},
"response": {
"$ref": "Channel"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.metadata",
"https://www.googleapis.com/auth/drive.metadata.readonly",
"https://www.googleapis.com/auth/drive.photos.readonly",
"https://www.googleapis.com/auth/drive.readonly"
],
"supportsMediaDownload": true,
"supportsSubscription": true,
"useMediaDownloadService": true
}
}
},
"permissions": {
"methods": {
"create": {
"description": "Creates a permission for a file or shared drive.",
"httpMethod": "POST",
"id": "drive.permissions.create",
"parameterOrder": [
"fileId"
],
"parameters": {
"emailMessage": {
"description": "A plain text custom message to include in the notification email.",
"location": "query",
"type": "string"
},
"fileId": {
"description": "The ID of the file or shared drive.",
"location": "path",
"required": true,
"type": "string"
},
"sendNotificationEmail": {
"description": "Whether to send a notification email when sharing to users or groups. This defaults to true for users and groups, and is not allowed for other requests. It must not be disabled for ownership transfers.",
"location": "query",
"type": "boolean"
},
"supportsAllDrives": {
"default": "false",
"description": "Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.",
"location": "query",
"type": "boolean"
},
"supportsTeamDrives": {
"default": "false",
"description": "Deprecated use supportsAllDrives instead.",
"location": "query",
"type": "boolean"
},
"transferOwnership": {
"default": "false",
"description": "Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect.",
"location": "query",
"type": "boolean"
},
"useDomainAdminAccess": {
"default": "false",
"description": "Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.",
"location": "query",
"type": "boolean"
}
},
"path": "files/{fileId}/permissions",
"request": {
"$ref": "Permission"
},
"response": {
"$ref": "Permission"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file"
]
},
"delete": {
"description": "Deletes a permission.",
"httpMethod": "DELETE",
"id": "drive.permissions.delete",
"parameterOrder": [
"fileId",
"permissionId"
],
"parameters": {
"fileId": {
"description": "The ID of the file or shared drive.",
"location": "path",
"required": true,
"type": "string"
},
"permissionId": {
"description": "The ID of the permission.",
"location": "path",
"required": true,
"type": "string"
},
"supportsAllDrives": {
"default": "false",
"description": "Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.",
"location": "query",
"type": "boolean"
},
"supportsTeamDrives": {
"default": "false",
"description": "Deprecated use supportsAllDrives instead.",
"location": "query",
"type": "boolean"
},
"useDomainAdminAccess": {
"default": "false",
"description": "Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.",
"location": "query",
"type": "boolean"
}
},
"path": "files/{fileId}/permissions/{permissionId}",
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file"
]
},
"get": {
"description": "Gets a permission by ID.",
"httpMethod": "GET",
"id": "drive.permissions.get",
"parameterOrder": [
"fileId",
"permissionId"
],
"parameters": {
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
},
"permissionId": {
"description": "The ID of the permission.",
"location": "path",
"required": true,
"type": "string"
},
"supportsAllDrives": {
"default": "false",
"description": "Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.",
"location": "query",
"type": "boolean"
},
"supportsTeamDrives": {
"default": "false",
"description": "Deprecated use supportsAllDrives instead.",
"location": "query",
"type": "boolean"
},
"useDomainAdminAccess": {
"default": "false",
"description": "Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.",
"location": "query",
"type": "boolean"
}
},
"path": "files/{fileId}/permissions/{permissionId}",
"response": {
"$ref": "Permission"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.metadata",
"https://www.googleapis.com/auth/drive.metadata.readonly",
"https://www.googleapis.com/auth/drive.photos.readonly",
"https://www.googleapis.com/auth/drive.readonly"
]
},
"list": {
"description": "Lists a file's or shared drive's permissions.",
"httpMethod": "GET",
"id": "drive.permissions.list",
"parameterOrder": [
"fileId"
],
"parameters": {
"fileId": {
"description": "The ID of the file or shared drive.",
"location": "path",
"required": true,
"type": "string"
},
"pageSize": {
"description": "The maximum number of permissions to return per page. When not set for files in a shared drive, at most 100 results will be returned. When not set for files that are not in a shared drive, the entire list will be returned.",
"format": "int32",
"location": "query",
"maximum": "100",
"minimum": "1",
"type": "integer"
},
"pageToken": {
"description": "The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.",
"location": "query",
"type": "string"
},
"supportsAllDrives": {
"default": "false",
"description": "Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.",
"location": "query",
"type": "boolean"
},
"supportsTeamDrives": {
"default": "false",
"description": "Deprecated use supportsAllDrives instead.",
"location": "query",
"type": "boolean"
},
"useDomainAdminAccess": {
"default": "false",
"description": "Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.",
"location": "query",
"type": "boolean"
}
},
"path": "files/{fileId}/permissions",
"response": {
"$ref": "PermissionList"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.metadata",
"https://www.googleapis.com/auth/drive.metadata.readonly",
"https://www.googleapis.com/auth/drive.photos.readonly",
"https://www.googleapis.com/auth/drive.readonly"
]
},
"update": {
"description": "Updates a permission with patch semantics.",
"httpMethod": "PATCH",
"id": "drive.permissions.update",
"parameterOrder": [
"fileId",
"permissionId"
],
"parameters": {
"fileId": {
"description": "The ID of the file or shared drive.",
"location": "path",
"required": true,
"type": "string"
},
"permissionId": {
"description": "The ID of the permission.",
"location": "path",
"required": true,
"type": "string"
},
"removeExpiration": {
"default": "false",
"description": "Whether to remove the expiration date.",
"location": "query",
"type": "boolean"
},
"supportsAllDrives": {
"default": "false",
"description": "Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.",
"location": "query",
"type": "boolean"
},
"supportsTeamDrives": {
"default": "false",
"description": "Deprecated use supportsAllDrives instead.",
"location": "query",
"type": "boolean"
},
"transferOwnership": {
"default": "false",
"description": "Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect.",
"location": "query",
"type": "boolean"
},
"useDomainAdminAccess": {
"default": "false",
"description": "Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.",
"location": "query",
"type": "boolean"
}
},
"path": "files/{fileId}/permissions/{permissionId}",
"request": {
"$ref": "Permission"
},
"response": {
"$ref": "Permission"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file"
]
}
}
},
"replies": {
"methods": {
"create": {
"description": "Creates a new reply to a comment.",
"httpMethod": "POST",
"id": "drive.replies.create",
"parameterOrder": [
"fileId",
"commentId"
],
"parameters": {
"commentId": {
"description": "The ID of the comment.",
"location": "path",
"required": true,
"type": "string"
},
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "files/{fileId}/comments/{commentId}/replies",
"request": {
"$ref": "Reply"
},
"response": {
"$ref": "Reply"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file"
]
},
"delete": {
"description": "Deletes a reply.",
"httpMethod": "DELETE",
"id": "drive.replies.delete",
"parameterOrder": [
"fileId",
"commentId",
"replyId"
],
"parameters": {
"commentId": {
"description": "The ID of the comment.",
"location": "path",
"required": true,
"type": "string"
},
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
},
"replyId": {
"description": "The ID of the reply.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "files/{fileId}/comments/{commentId}/replies/{replyId}",
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file"
]
},
"get": {
"description": "Gets a reply by ID.",
"httpMethod": "GET",
"id": "drive.replies.get",
"parameterOrder": [
"fileId",
"commentId",
"replyId"
],
"parameters": {
"commentId": {
"description": "The ID of the comment.",
"location": "path",
"required": true,
"type": "string"
},
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
},
"includeDeleted": {
"default": "false",
"description": "Whether to return deleted replies. Deleted replies will not include their original content.",
"location": "query",
"type": "boolean"
},
"replyId": {
"description": "The ID of the reply.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "files/{fileId}/comments/{commentId}/replies/{replyId}",
"response": {
"$ref": "Reply"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.readonly"
]
},
"list": {
"description": "Lists a comment's replies.",
"httpMethod": "GET",
"id": "drive.replies.list",
"parameterOrder": [
"fileId",
"commentId"
],
"parameters": {
"commentId": {
"description": "The ID of the comment.",
"location": "path",
"required": true,
"type": "string"
},
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
},
"includeDeleted": {
"default": "false",
"description": "Whether to include deleted replies. Deleted replies will not include their original content.",
"location": "query",
"type": "boolean"
},
"pageSize": {
"default": "20",
"description": "The maximum number of replies to return per page.",
"format": "int32",
"location": "query",
"maximum": "100",
"minimum": "1",
"type": "integer"
},
"pageToken": {
"description": "The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.",
"location": "query",
"type": "string"
}
},
"path": "files/{fileId}/comments/{commentId}/replies",
"response": {
"$ref": "ReplyList"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.readonly"
]
},
"update": {
"description": "Updates a reply with patch semantics.",
"httpMethod": "PATCH",
"id": "drive.replies.update",
"parameterOrder": [
"fileId",
"commentId",
"replyId"
],
"parameters": {
"commentId": {
"description": "The ID of the comment.",
"location": "path",
"required": true,
"type": "string"
},
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
},
"replyId": {
"description": "The ID of the reply.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "files/{fileId}/comments/{commentId}/replies/{replyId}",
"request": {
"$ref": "Reply"
},
"response": {
"$ref": "Reply"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file"
]
}
}
},
"revisions": {
"methods": {
"delete": {
"description": "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.",
"httpMethod": "DELETE",
"id": "drive.revisions.delete",
"parameterOrder": [
"fileId",
"revisionId"
],
"parameters": {
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
},
"revisionId": {
"description": "The ID of the revision.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "files/{fileId}/revisions/{revisionId}",
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.file"
]
},
"get": {
"description": "Gets a revision's metadata or content by ID.",
"httpMethod": "GET",
"id": "drive.revisions.get",
"parameterOrder": [
"fileId",
"revisionId"
],
"parameters": {
"acknowledgeAbuse": {
"default": "false",
"description": "Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.",
"location": "query",
"type": "boolean"
},
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
},
"revisionId": {
"description": "The ID of the revision.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "files/{fileId}/revisions/{revisionId}",
"response": {
"$ref": "Revision"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.metadata",
"https://www.googleapis.com/auth/drive.metadata.readonly",
"https://www.googleapis.com/auth/drive.photos.readonly",
"https://www.googleapis.com/auth/drive.readonly"
],
"supportsMediaDownload": true,
"useMediaDownloadService": true
},
"list": {
"description": "Lists a file's revisions.",
"httpMethod": "GET",
"id": "drive.revisions.list",
"parameterOrder": [
"fileId"
],
"parameters": {
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
},
"pageSize": {
"default": "200",
"description": "The maximum number of revisions to return per page.",
"format": "int32",
"location": "query",
"maximum": "1000",
"minimum": "1",
"type": "integer"
},
"pageToken": {
"description": "The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.",
"location": "query",
"type": "string"
}
},
"path": "files/{fileId}/revisions",
"response": {
"$ref": "RevisionList"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.metadata",
"https://www.googleapis.com/auth/drive.metadata.readonly",
"https://www.googleapis.com/auth/drive.photos.readonly",
"https://www.googleapis.com/auth/drive.readonly"
]
},
"update": {
"description": "Updates a revision with patch semantics.",
"httpMethod": "PATCH",
"id": "drive.revisions.update",
"parameterOrder": [
"fileId",
"revisionId"
],
"parameters": {
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
},
"revisionId": {
"description": "The ID of the revision.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "files/{fileId}/revisions/{revisionId}",
"request": {
"$ref": "Revision"
},
"response": {
"$ref": "Revision"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.file"
]
}
}
},
"teamdrives": {
"methods": {
"create": {
"description": "Deprecated use drives.create instead.",
"httpMethod": "POST",
"id": "drive.teamdrives.create",
"parameterOrder": [
"requestId"
],
"parameters": {
"requestId": {
"description": "An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a Team Drive. A repeated request by the same user and with the same request ID will avoid creating duplicates by attempting to create the same Team Drive. If the Team Drive already exists a 409 error will be returned.",
"location": "query",
"required": true,
"type": "string"
}
},
"path": "teamdrives",
"request": {
"$ref": "TeamDrive"
},
"response": {
"$ref": "TeamDrive"
},
"scopes": [
"https://www.googleapis.com/auth/drive"
]
},
"delete": {
"description": "Deprecated use drives.delete instead.",
"httpMethod": "DELETE",
"id": "drive.teamdrives.delete",
"parameterOrder": [
"teamDriveId"
],
"parameters": {
"teamDriveId": {
"description": "The ID of the Team Drive",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "teamdrives/{teamDriveId}",
"scopes": [
"https://www.googleapis.com/auth/drive"
]
},
"get": {
"description": "Deprecated use drives.get instead.",
"httpMethod": "GET",
"id": "drive.teamdrives.get",
"parameterOrder": [
"teamDriveId"
],
"parameters": {
"teamDriveId": {
"description": "The ID of the Team Drive",
"location": "path",
"required": true,
"type": "string"
},
"useDomainAdminAccess": {
"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 Team Drive belongs.",
"location": "query",
"type": "boolean"
}
},
"path": "teamdrives/{teamDriveId}",
"response": {
"$ref": "TeamDrive"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.readonly"
]
},
"list": {
"description": "Deprecated use drives.list instead.",
"httpMethod": "GET",
"id": "drive.teamdrives.list",
"parameters": {
"pageSize": {
"default": "10",
"description": "Maximum number of Team Drives to return.",
"format": "int32",
"location": "query",
"maximum": "100",
"minimum": "1",
"type": "integer"
},
"pageToken": {
"description": "Page token for Team Drives.",
"location": "query",
"type": "string"
},
"q": {
"description": "Query string for searching Team Drives.",
"location": "query",
"type": "string"
},
"useDomainAdminAccess": {
"default": "false",
"description": "Issue the request as a domain administrator; if set to true, then all Team Drives of the domain in which the requester is an administrator are returned.",
"location": "query",
"type": "boolean"
}
},
"path": "teamdrives",
"response": {
"$ref": "TeamDriveList"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.readonly"
]
},
"update": {
"description": "Deprecated use drives.update instead",
"httpMethod": "PATCH",
"id": "drive.teamdrives.update",
"parameterOrder": [
"teamDriveId"
],
"parameters": {
"teamDriveId": {
"description": "The ID of the Team Drive",
"location": "path",
"required": true,
"type": "string"
},
"useDomainAdminAccess": {
"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 Team Drive belongs.",
"location": "query",
"type": "boolean"
}
},
"path": "teamdrives/{teamDriveId}",
"request": {
"$ref": "TeamDrive"
},
"response": {
"$ref": "TeamDrive"
},
"scopes": [
"https://www.googleapis.com/auth/drive"
]
}
}
}
},
"revision": "20190926",
"rootUrl": "https://www.googleapis.com/",
"schemas": {
"About": {
"description": "Information about the user, the user's Drive, and system capabilities.",
"id": "About",
"properties": {
"appInstalled": {
"description": "Whether the user has installed the requesting app.",
"type": "boolean"
},
"canCreateDrives": {
"description": "Whether the user can create shared drives.",
"type": "boolean"
},
"canCreateTeamDrives": {
"description": "Deprecated - use canCreateDrives instead.",
"type": "boolean"
},
"driveThemes": {
"description": "A list of themes that are supported for shared drives.",
"items": {
"properties": {
"backgroundImageLink": {
"description": "A link to this theme's background image.",
"type": "string"
},
"colorRgb": {
"description": "The color of this theme as an RGB hex string.",
"type": "string"
},
"id": {
"description": "The ID of the theme.",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"exportFormats": {
"additionalProperties": {
"items": {
"type": "string"
},
"type": "array"
},
"description": "A map of source MIME type to possible targets for all supported exports.",
"type": "object"
},
"folderColorPalette": {
"description": "The currently supported folder colors as RGB hex strings.",
"items": {
"type": "string"
},
"type": "array"
},
"importFormats": {
"additionalProperties": {
"items": {
"type": "string"
},
"type": "array"
},
"description": "A map of source MIME type to possible targets for all supported imports.",
"type": "object"
},
"kind": {
"default": "drive#about",
"description": "Identifies what kind of resource this is. Value: the fixed string \"drive#about\".",
"type": "string"
},
"maxImportSizes": {
"additionalProperties": {
"format": "int64",
"type": "string"
},
"description": "A map of maximum import sizes by MIME type, in bytes.",
"type": "object"
},
"maxUploadSize": {
"description": "The maximum upload size in bytes.",
"format": "int64",
"type": "string"
},
"storageQuota": {
"description": "The user's storage quota limits and usage. All fields are measured in bytes.",
"properties": {
"limit": {
"description": "The usage limit, if applicable. This will not be present if the user has unlimited storage.",
"format": "int64",
"type": "string"
},
"usage": {
"description": "The total usage across all services.",
"format": "int64",
"type": "string"
},
"usageInDrive": {
"description": "The usage by all files in Google Drive.",
"format": "int64",
"type": "string"
},
"usageInDriveTrash": {
"description": "The usage by trashed files in Google Drive.",
"format": "int64",
"type": "string"
}
},
"type": "object"
},
"teamDriveThemes": {
"description": "Deprecated - use driveThemes instead.",
"items": {
"properties": {
"backgroundImageLink": {
"description": "Deprecated - use driveThemes/backgroundImageLink instead.",
"type": "string"
},
"colorRgb": {
"description": "Deprecated - use driveThemes/colorRgb instead.",
"type": "string"
},
"id": {
"description": "Deprecated - use driveThemes/id instead.",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"user": {
"$ref": "User",
"description": "The authenticated user."
}
},
"type": "object"
},
"Change": {
"description": "A change to a file or shared drive.",
"id": "Change",
"properties": {
"changeType": {
"description": "The type of the change. Possible values are file and drive.",
"type": "string"
},
"drive": {
"$ref": "Drive",
"description": "The updated state of the shared drive. Present if the changeType is drive, the user is still a member of the shared drive, and the shared drive has not been deleted."
},
"driveId": {
"description": "The ID of the shared drive associated with this change.",
"type": "string"
},
"file": {
"$ref": "File",
"description": "The updated state of the file. Present if the type is file and the file has not been removed from this list of changes."
},
"fileId": {
"description": "The ID of the file which has changed.",
"type": "string"
},
"kind": {
"default": "drive#change",
"description": "Identifies what kind of resource this is. Value: the fixed string \"drive#change\".",
"type": "string"
},
"removed": {
"description": "Whether the file or shared drive has been removed from this list of changes, for example by deletion or loss of access.",
"type": "boolean"
},
"teamDrive": {
"$ref": "TeamDrive",
"description": "Deprecated - use drive instead."
},
"teamDriveId": {
"description": "Deprecated - use driveId instead.",
"type": "string"
},
"time": {
"description": "The time of this change (RFC 3339 date-time).",
"format": "date-time",
"type": "string"
},
"type": {
"description": "Deprecated - use changeType instead.",
"type": "string"
}
},
"type": "object"
},
"ChangeList": {
"description": "A list of changes for a user.",
"id": "ChangeList",
"properties": {
"changes": {
"description": "The list of changes. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.",
"items": {
"$ref": "Change"
},
"type": "array"
},
"kind": {
"default": "drive#changeList",
"description": "Identifies what kind of resource this is. Value: the fixed string \"drive#changeList\".",
"type": "string"
},
"newStartPageToken": {
"description": "The starting page token for future changes. This will be present only if the end of the current changes list has been reached.",
"type": "string"
},
"nextPageToken": {
"description": "The page token for the next page of changes. This will be absent if the end of the changes 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.",
"type": "string"
}
},
"type": "object"
},
"Channel": {
"description": "An notification channel used to watch for resource changes.",
"id": "Channel",
"properties": {
"address": {
"description": "The address where notifications are delivered for this channel.",
"type": "string"
},
"expiration": {
"description": "Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.",
"format": "int64",
"type": "string"
},
"id": {
"description": "A UUID or similar unique string that identifies this channel.",
"type": "string"
},
"kind": {
"default": "api#channel",
"description": "Identifies this as a notification channel used to watch for changes to a resource, which is \"api#channel\".",
"type": "string"
},
"params": {
"additionalProperties": {
"description": "Declares a new parameter by name.",
"type": "string"
},
"description": "Additional parameters controlling delivery channel behavior. Optional.",
"type": "object"
},
"payload": {
"description": "A Boolean value to indicate whether payload is wanted. Optional.",
"type": "boolean"
},
"resourceId": {
"description": "An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.",
"type": "string"
},
"resourceUri": {
"description": "A version-specific identifier for the watched resource.",
"type": "string"
},
"token": {
"description": "An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.",
"type": "string"
},
"type": {
"description": "The type of delivery mechanism used for this channel.",
"type": "string"
}
},
"type": "object"
},
"Comment": {
"description": "A comment on a file.",
"id": "Comment",
"properties": {
"anchor": {
"description": "A region of the document represented as a JSON string. See anchor documentation for details on how to define and interpret anchor properties.",
"type": "string"
},
"author": {
"$ref": "User",
"description": "The user who created the comment."
},
"content": {
"annotations": {
"required": [
"drive.comments.create",
"drive.comments.update"
]
},
"description": "The plain text content of the comment. This field is used for setting the content, while htmlContent should be displayed.",
"type": "string"
},
"createdTime": {
"description": "The time at which the comment was created (RFC 3339 date-time).",
"format": "date-time",
"type": "string"
},
"deleted": {
"description": "Whether the comment has been deleted. A deleted comment has no content.",
"type": "boolean"
},
"htmlContent": {
"description": "The content of the comment with HTML formatting.",
"type": "string"
},
"id": {
"description": "The ID of the comment.",
"type": "string"
},
"kind": {
"default": "drive#comment",
"description": "Identifies what kind of resource this is. Value: the fixed string \"drive#comment\".",
"type": "string"
},
"modifiedTime": {
"description": "The last time the comment or any of its replies was modified (RFC 3339 date-time).",
"format": "date-time",
"type": "string"
},
"quotedFileContent": {
"description": "The file content to which the comment refers, typically within the anchor region. For a text file, for example, this would be the text at the location of the comment.",
"properties": {
"mimeType": {
"description": "The MIME type of the quoted content.",
"type": "string"
},
"value": {
"description": "The quoted content itself. This is interpreted as plain text if set through the API.",
"type": "string"
}
},
"type": "object"
},
"replies": {
"description": "The full list of replies to the comment in chronological order.",
"items": {
"$ref": "Reply"
},
"type": "array"
},
"resolved": {
"description": "Whether the comment has been resolved by one of its replies.",
"type": "boolean"
}
},
"type": "object"
},
"CommentList": {
"description": "A list of comments on a file.",
"id": "CommentList",
"properties": {
"comments": {
"description": "The list of comments. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.",
"items": {
"$ref": "Comment"
},
"type": "array"
},
"kind": {
"default": "drive#commentList",
"description": "Identifies what kind of resource this is. Value: the fixed string \"drive#commentList\".",
"type": "string"
},
"nextPageToken": {
"description": "The page token for the next page of comments. This will be absent if the end of the comments 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.",
"type": "string"
}
},
"type": "object"
},
"Drive": {
"description": "Representation of a shared drive.",
"id": "Drive",
"properties": {
"backgroundImageFile": {
"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": {
"id": {
"description": "The ID of an image file in Google Drive to use for the background image.",
"type": "string"
},
"width": {
"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",
"type": "number"
},
"xCoordinate": {
"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",
"type": "number"
},
"yCoordinate": {
"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",
"type": "number"
}
},
"type": "object"
},
"backgroundImageLink": {
"description": "A short-lived link to this shared drive's background image.",
"type": "string"
},
"capabilities": {
"description": "Capabilities the current user has on this shared drive.",
"properties": {
"canAddChildren": {
"description": "Whether the current user can add children to folders in this shared drive.",
"type": "boolean"
},
"canChangeCopyRequiresWriterPermissionRestriction": {
"description": "Whether the current user can change the copyRequiresWriterPermission restriction of this shared drive.",
"type": "boolean"
},
"canChangeDomainUsersOnlyRestriction": {
"description": "Whether the current user can change the domainUsersOnly restriction of this shared drive.",
"type": "boolean"
},
"canChangeDriveBackground": {
"description": "Whether the current user can change the background of this shared drive.",
"type": "boolean"
},
"canChangeDriveMembersOnlyRestriction": {
"description": "Whether the current user can change the driveMembersOnly restriction of this shared drive.",
"type": "boolean"
},
"canComment": {
"description": "Whether the current user can comment on files in this shared drive.",
"type": "boolean"
},
"canCopy": {
"description": "Whether the current user can copy files in this shared drive.",
"type": "boolean"
},
"canDeleteChildren": {
"description": "Whether the current user can delete children from folders in this shared drive.",
"type": "boolean"
},
"canDeleteDrive": {
"description": "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.",
"type": "boolean"
},
"canDownload": {
"description": "Whether the current user can download files in this shared drive.",
"type": "boolean"
},
"canEdit": {
"description": "Whether the current user can edit files in this shared drive",
"type": "boolean"
},
"canListChildren": {
"description": "Whether the current user can list the children of folders in this shared drive.",
"type": "boolean"
},
"canManageMembers": {
"description": "Whether the current user can add members to this shared drive or remove them or change their role.",
"type": "boolean"
},
"canReadRevisions": {
"description": "Whether the current user can read the revisions resource of files in this shared drive.",
"type": "boolean"
},
"canRename": {
"description": "Whether the current user can rename files or folders in this shared drive.",
"type": "boolean"
},
"canRenameDrive": {
"description": "Whether the current user can rename this shared drive.",
"type": "boolean"
},
"canShare": {
"description": "Whether the current user can share files or folders in this shared drive.",
"type": "boolean"
},
"canTrashChildren": {
"description": "Whether the current user can trash children from folders in this shared drive.",
"type": "boolean"
}
},
"type": "object"
},
"colorRgb": {
"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.",
"type": "string"
},
"createdTime": {
"description": "The time at which the shared drive was created (RFC 3339 date-time).",
"format": "date-time",
"type": "string"
},
"hidden": {
"description": "Whether the shared drive is hidden from default view.",
"type": "boolean"
},
"id": {
"description": "The ID of this shared drive which is also the ID of the top level folder of this shared drive.",
"type": "string"
},
"kind": {
"default": "drive#drive",
"description": "Identifies what kind of resource this is. Value: the fixed string \"drive#drive\".",
"type": "string"
},
"name": {
"description": "The name of this shared drive.",
"type": "string"
},
"restrictions": {
"description": "A set of restrictions that apply to this shared drive or items inside this shared drive.",
"properties": {
"adminManagedRestrictions": {
"description": "Whether administrative privileges on this shared drive are required to modify restrictions.",
"type": "boolean"
},
"copyRequiresWriterPermission": {
"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.",
"type": "boolean"
},
"domainUsersOnly": {
"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.",
"type": "boolean"
},
"driveMembersOnly": {
"description": "Whether access to items inside this shared drive is restricted to its members.",
"type": "boolean"
}
},
"type": "object"
},
"themeId": {
"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.",
"type": "string"
}
},
"type": "object"
},
"DriveList": {
"description": "A list of shared drives.",
"id": "DriveList",
"properties": {
"drives": {
"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": "Drive"
},
"type": "array"
},
"kind": {
"default": "drive#driveList",
"description": "Identifies what kind of resource this is. Value: the fixed string \"drive#driveList\".",
"type": "string"
},
"nextPageToken": {
"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.",
"type": "string"
}
},
"type": "object"
},
"File": {
"description": "The metadata for a file.",
"id": "File",
"properties": {
"appProperties": {
"additionalProperties": {
"type": "string"
},
"description": "A collection of arbitrary key-value pairs which are private to the requesting app.\nEntries with null values are cleared in update and copy requests.",
"type": "object"
},
"capabilities": {
"description": "Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.",
"properties": {
"canAddChildren": {
"description": "Whether the current user can add children to this folder. This is always false when the item is not a folder.",
"type": "boolean"
},
"canChangeCopyRequiresWriterPermission": {
"description": "Whether the current user can change the copyRequiresWriterPermission restriction of this file.",
"type": "boolean"
},
"canChangeViewersCanCopyContent": {
"description": "Deprecated",
"type": "boolean"
},
"canComment": {