blob: f9d21349a516941d7504e055d149e568ab8eb23e [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.apps.readonly": {
"description": "View your Google Drive apps"
},
"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/v2/",
"baseUrl": "https://www.googleapis.com/drive/v2/",
"batchPath": "batch/drive/v2",
"description": "Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.",
"discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/drive/",
"etag": "\"F5McR9eEaw0XRpaO3M9gbIugkbs/46Qjt4BhPnhiVVSUSh-Zxw9mvPw\"",
"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:v2",
"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 the information about the current user along with Drive API settings",
"httpMethod": "GET",
"id": "drive.about.get",
"parameters": {
"includeSubscribed": {
"default": "true",
"description": "Whether to count changes outside the My Drive hierarchy. When set to false, changes to files such as those in the Application Data folder or shared files which have not been added to My Drive will be omitted from the maxChangeIdCount.",
"location": "query",
"type": "boolean"
},
"maxChangeIdCount": {
"default": "1",
"description": "Maximum number of remaining change IDs to count",
"format": "int64",
"location": "query",
"type": "string"
},
"startChangeId": {
"description": "Change ID to start counting from when calculating number of remaining change IDs",
"format": "int64",
"location": "query",
"type": "string"
}
},
"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"
]
}
}
},
"apps": {
"methods": {
"get": {
"description": "Gets a specific app.",
"httpMethod": "GET",
"id": "drive.apps.get",
"parameterOrder": [
"appId"
],
"parameters": {
"appId": {
"description": "The ID of the app.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "apps/{appId}",
"response": {
"$ref": "App"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.apps.readonly",
"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.readonly"
]
},
"list": {
"description": "Lists a user's installed apps.",
"httpMethod": "GET",
"id": "drive.apps.list",
"parameters": {
"appFilterExtensions": {
"default": "",
"description": "A comma-separated list of file extensions for open with filtering. All apps within the given app query scope which can open any of the given file extensions will be included in the response. If appFilterMimeTypes are provided as well, the result is a union of the two resulting app lists.",
"location": "query",
"type": "string"
},
"appFilterMimeTypes": {
"default": "",
"description": "A comma-separated list of MIME types for open with filtering. All apps within the given app query scope which can open any of the given MIME types will be included in the response. If appFilterExtensions are provided as well, the result is a union of the two resulting app lists.",
"location": "query",
"type": "string"
},
"languageCode": {
"description": "A language or locale code, as defined by BCP 47, with some extensions from Unicode's LDML format (http://www.unicode.org/reports/tr35/).",
"location": "query",
"type": "string"
}
},
"path": "apps",
"response": {
"$ref": "AppList"
},
"scopes": [
"https://www.googleapis.com/auth/drive.apps.readonly"
]
}
}
},
"changes": {
"methods": {
"get": {
"description": "Deprecated - Use changes.getStartPageToken and changes.list to retrieve recent changes.",
"httpMethod": "GET",
"id": "drive.changes.get",
"parameterOrder": [
"changeId"
],
"parameters": {
"changeId": {
"description": "The ID of the change.",
"location": "path",
"required": true,
"type": "string"
},
"driveId": {
"description": "The shared drive from which the change 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/{changeId}",
"response": {
"$ref": "Change"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.apps.readonly",
"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"
]
},
"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.apps.readonly",
"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",
"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"
},
"includeDeleted": {
"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"
},
"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"
},
"includeSubscribed": {
"default": "true",
"description": "Whether to include changes outside the My Drive hierarchy in the result. When set to false, changes to files such as those in the Application Data folder or shared files which have not been added to My Drive will be omitted from the result.",
"location": "query",
"type": "boolean"
},
"includeTeamDriveItems": {
"default": "false",
"description": "Deprecated use includeItemsFromAllDrives instead.",
"location": "query",
"type": "boolean"
},
"maxResults": {
"default": "100",
"description": "Maximum number of changes to return.",
"format": "int32",
"location": "query",
"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",
"type": "string"
},
"spaces": {
"description": "A comma-separated list of spaces to query. Supported values are 'drive', 'appDataFolder' and 'photos'.",
"location": "query",
"type": "string"
},
"startChangeId": {
"description": "Deprecated - use pageToken instead.",
"format": "int64",
"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.apps.readonly",
"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": "Subscribe to changes for a user.",
"httpMethod": "POST",
"id": "drive.changes.watch",
"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"
},
"includeDeleted": {
"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"
},
"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"
},
"includeSubscribed": {
"default": "true",
"description": "Whether to include changes outside the My Drive hierarchy in the result. When set to false, changes to files such as those in the Application Data folder or shared files which have not been added to My Drive will be omitted from the result.",
"location": "query",
"type": "boolean"
},
"includeTeamDriveItems": {
"default": "false",
"description": "Deprecated use includeItemsFromAllDrives instead.",
"location": "query",
"type": "boolean"
},
"maxResults": {
"default": "100",
"description": "Maximum number of changes to return.",
"format": "int32",
"location": "query",
"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",
"type": "string"
},
"spaces": {
"description": "A comma-separated list of spaces to query. Supported values are 'drive', 'appDataFolder' and 'photos'.",
"location": "query",
"type": "string"
},
"startChangeId": {
"description": "Deprecated - use pageToken instead.",
"format": "int64",
"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.apps.readonly",
"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.apps.readonly",
"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"
]
}
}
},
"children": {
"methods": {
"delete": {
"description": "Removes a child from a folder.",
"httpMethod": "DELETE",
"id": "drive.children.delete",
"parameterOrder": [
"folderId",
"childId"
],
"parameters": {
"childId": {
"description": "The ID of the child.",
"location": "path",
"required": true,
"type": "string"
},
"folderId": {
"description": "The ID of the folder.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "files/{folderId}/children/{childId}",
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file"
]
},
"get": {
"description": "Gets a specific child reference.",
"httpMethod": "GET",
"id": "drive.children.get",
"parameterOrder": [
"folderId",
"childId"
],
"parameters": {
"childId": {
"description": "The ID of the child.",
"location": "path",
"required": true,
"type": "string"
},
"folderId": {
"description": "The ID of the folder.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "files/{folderId}/children/{childId}",
"response": {
"$ref": "ChildReference"
},
"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"
]
},
"insert": {
"description": "Inserts a file into a folder.",
"httpMethod": "POST",
"id": "drive.children.insert",
"parameterOrder": [
"folderId"
],
"parameters": {
"folderId": {
"description": "The ID of the folder.",
"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/{folderId}/children",
"request": {
"$ref": "ChildReference"
},
"response": {
"$ref": "ChildReference"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.file"
]
},
"list": {
"description": "Lists a folder's children.",
"httpMethod": "GET",
"id": "drive.children.list",
"parameterOrder": [
"folderId"
],
"parameters": {
"folderId": {
"description": "The ID of the folder.",
"location": "path",
"required": true,
"type": "string"
},
"maxResults": {
"default": "100",
"description": "Maximum number of children to return.",
"format": "int32",
"location": "query",
"minimum": "0",
"type": "integer"
},
"orderBy": {
"description": "A comma-separated list of sort keys. Valid keys are 'createdDate', 'folder', 'lastViewedByMeDate', 'modifiedByMeDate', 'modifiedDate', 'quotaBytesUsed', 'recency', 'sharedWithMeDate', 'starred', and 'title'. Each key sorts ascending by default, but may be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedDate desc,title. 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"
},
"pageToken": {
"description": "Page token for children.",
"location": "query",
"type": "string"
},
"q": {
"description": "Query string for searching children.",
"location": "query",
"type": "string"
}
},
"path": "files/{folderId}/children",
"response": {
"$ref": "ChildList"
},
"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": {
"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": "If set, this will succeed when retrieving a deleted comment, and will include any deleted replies.",
"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"
]
},
"insert": {
"description": "Creates a new comment on the given file.",
"httpMethod": "POST",
"id": "drive.comments.insert",
"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"
]
},
"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": "If set, all comments and replies, including deleted comments and replies (with content stripped) will be returned.",
"location": "query",
"type": "boolean"
},
"maxResults": {
"default": "20",
"description": "The maximum number of discussions to include in the response, used for paging.",
"format": "int32",
"location": "query",
"maximum": "100",
"minimum": "0",
"type": "integer"
},
"pageToken": {
"description": "The continuation token, used to page through large result sets. To get the next page of results, set this parameter to the value of \"nextPageToken\" from the previous response.",
"location": "query",
"type": "string"
},
"updatedMin": {
"description": "Only discussions that were updated after this timestamp will be returned. Formatted as an RFC 3339 timestamp.",
"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"
]
},
"patch": {
"description": "Updates an existing comment.",
"httpMethod": "PATCH",
"id": "drive.comments.patch",
"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"
]
},
"update": {
"description": "Updates an existing comment.",
"httpMethod": "PUT",
"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": {
"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"
]
},
"insert": {
"description": "Creates a new shared drive.",
"httpMethod": "POST",
"id": "drive.drives.insert",
"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"
]
},
"list": {
"description": "Lists the user's shared drives.",
"httpMethod": "GET",
"id": "drive.drives.list",
"parameters": {
"maxResults": {
"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 metadata for a shared drive.",
"httpMethod": "PUT",
"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 the specified file.",
"httpMethod": "POST",
"id": "drive.files.copy",
"parameterOrder": [
"fileId"
],
"parameters": {
"convert": {
"default": "false",
"description": "Whether to convert this file to the corresponding Google Docs format.",
"location": "query",
"type": "boolean"
},
"fileId": {
"description": "The ID of the file to copy.",
"location": "path",
"required": true,
"type": "string"
},
"ocr": {
"default": "false",
"description": "Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.",
"location": "query",
"type": "boolean"
},
"ocrLanguage": {
"description": "If ocr is true, hints at the language to use. Valid values are BCP 47 codes.",
"location": "query",
"type": "string"
},
"pinned": {
"default": "false",
"description": "Whether to pin the head revision of the new copy. A file can have a maximum of 200 pinned revisions.",
"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"
},
"timedTextLanguage": {
"description": "The language of the timed text.",
"location": "query",
"type": "string"
},
"timedTextTrackName": {
"description": "The timed text track name.",
"location": "query",
"type": "string"
},
"visibility": {
"default": "DEFAULT",
"description": "The visibility of the new file. This parameter is only relevant when the source is not a native Google Doc and convert=false.",
"enum": [
"DEFAULT",
"PRIVATE"
],
"enumDescriptions": [
"The visibility of the new file is determined by the user's default visibility/sharing policies.",
"The new file will be visible to only the owner."
],
"location": "query",
"type": "string"
}
},
"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.apps.readonly",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.photos.readonly"
]
},
"delete": {
"description": "Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file or be an organizer on the parent for shared drive files.",
"httpMethod": "DELETE",
"id": "drive.files.delete",
"parameterOrder": [
"fileId"
],
"parameters": {
"fileId": {
"description": "The ID of the file to delete.",
"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 insert or copy requests.",
"httpMethod": "GET",
"id": "drive.files.generateIds",
"parameters": {
"maxResults": {
"default": "10",
"description": "Maximum 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 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.",
"location": "query",
"type": "boolean"
},
"fileId": {
"description": "The ID for the file in question.",
"location": "path",
"required": true,
"type": "string"
},
"projection": {
"description": "This parameter is deprecated and has no function.",
"enum": [
"BASIC",
"FULL"
],
"enumDescriptions": [
"Deprecated",
"Deprecated"
],
"location": "query",
"type": "string"
},
"revisionId": {
"description": "Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.",
"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"
},
"updateViewedDate": {
"default": "false",
"description": "Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.",
"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
},
"insert": {
"description": "Insert a new file.",
"httpMethod": "POST",
"id": "drive.files.insert",
"mediaUpload": {
"accept": [
"*/*"
],
"maxSize": "5120GB",
"protocols": {
"resumable": {
"multipart": true,
"path": "/resumable/upload/drive/v2/files"
},
"simple": {
"multipart": true,
"path": "/upload/drive/v2/files"
}
}
},
"parameters": {
"convert": {
"default": "false",
"description": "Whether to convert this file to the corresponding Google Docs format.",
"location": "query",
"type": "boolean"
},
"ocr": {
"default": "false",
"description": "Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.",
"location": "query",
"type": "boolean"
},
"ocrLanguage": {
"description": "If ocr is true, hints at the language to use. Valid values are BCP 47 codes.",
"location": "query",
"type": "string"
},
"pinned": {
"default": "false",
"description": "Whether to pin the head revision of the uploaded file. A file can have a maximum of 200 pinned revisions.",
"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"
},
"timedTextLanguage": {
"description": "The language of the timed text.",
"location": "query",
"type": "string"
},
"timedTextTrackName": {
"description": "The timed text track name.",
"location": "query",
"type": "string"
},
"useContentAsIndexableText": {
"default": "false",
"description": "Whether to use the content as indexable text.",
"location": "query",
"type": "boolean"
},
"visibility": {
"default": "DEFAULT",
"description": "The visibility of the new file. This parameter is only relevant when convert=false.",
"enum": [
"DEFAULT",
"PRIVATE"
],
"enumDescriptions": [
"The visibility of the new file is determined by the user's default visibility/sharing policies.",
"The new file will be visible to only the owner."
],
"location": "query",
"type": "string"
}
},
"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.apps.readonly",
"https://www.googleapis.com/auth/drive.file"
],
"supportsMediaUpload": true,
"supportsSubscription": true
},
"list": {
"description": "Lists the user's files.",
"httpMethod": "GET",
"id": "drive.files.list",
"parameters": {
"corpora": {
"description": "Bodies of items (files/documents) to which the query applies. Supported bodies are 'default', 'domain', 'drive' and 'allDrives'. Prefer 'default' or 'drive' to 'allDrives' for efficiency.",
"location": "query",
"type": "string"
},
"corpus": {
"description": "The body of items (files/documents) to which the query applies. Deprecated: use 'corpora' instead.",
"enum": [
"DEFAULT",
"DOMAIN"
],
"enumDescriptions": [
"The items that the user has accessed.",
"Items shared to the user's domain."
],
"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"
},
"maxResults": {
"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",
"minimum": "0",
"type": "integer"
},
"orderBy": {
"description": "A comma-separated list of sort keys. Valid keys are 'createdDate', 'folder', 'lastViewedByMeDate', 'modifiedByMeDate', 'modifiedDate', 'quotaBytesUsed', 'recency', 'sharedWithMeDate', 'starred', 'title', and 'title_natural'. Each key sorts ascending by default, but may be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedDate desc,title. 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"
},
"pageToken": {
"description": "Page token for files.",
"location": "query",
"type": "string"
},
"projection": {
"description": "This parameter is deprecated and has no function.",
"enum": [
"BASIC",
"FULL"
],
"enumDescriptions": [
"Deprecated",
"Deprecated"
],
"location": "query",
"type": "string"
},
"q": {
"description": "Query string for searching files.",
"location": "query",
"type": "string"
},
"spaces": {
"description": "A comma-separated list of spaces to query. 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.apps.readonly",
"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"
]
},
"patch": {
"description": "Updates file metadata and/or content. This method supports patch semantics.",
"httpMethod": "PATCH",
"id": "drive.files.patch",
"parameterOrder": [
"fileId"
],
"parameters": {
"addParents": {
"description": "Comma-separated list of parent IDs to add.",
"location": "query",
"type": "string"
},
"convert": {
"default": "false",
"description": "This parameter is deprecated and has no function.",
"location": "query",
"type": "boolean"
},
"fileId": {
"description": "The ID of the file to update.",
"location": "path",
"required": true,
"type": "string"
},
"modifiedDateBehavior": {
"description": "Determines the behavior in which modifiedDate is updated. This overrides setModifiedDate.",
"enum": [
"fromBody",
"fromBodyIfNeeded",
"fromBodyOrNow",
"noChange",
"now",
"nowIfNeeded"
],
"enumDescriptions": [
"Set modifiedDate to the value provided in the body of the request. No change if no value was provided.",
"Set modifiedDate to the value provided in the body of the request depending on other contents of the update.",
"Set modifiedDate to the value provided in the body of the request, or to the current time if no value was provided.",
"Maintain the previous value of modifiedDate.",
"Set modifiedDate to the current time.",
"Set modifiedDate to the current time depending on contents of the update."
],
"location": "query",
"type": "string"
},
"newRevision": {
"default": "true",
"description": "Whether a blob upload should create a new revision. If false, the blob data in the current head revision is replaced. If true or not set, a new blob is created as head revision, and previous unpinned revisions are preserved for a short period of time. Pinned revisions are stored indefinitely, using additional storage quota, up to a maximum of 200 revisions. For details on how revisions are retained, see the Drive Help Center.",
"location": "query",
"type": "boolean"
},
"ocr": {
"default": "false",
"description": "Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.",
"location": "query",
"type": "boolean"
},
"ocrLanguage": {
"description": "If ocr is true, hints at the language to use. Valid values are BCP 47 codes.",
"location": "query",
"type": "string"
},
"pinned": {
"default": "false",
"description": "Whether to pin the new revision. A file can have a maximum of 200 pinned revisions.",
"location": "query",
"type": "boolean"
},
"removeParents": {
"description": "Comma-separated list of parent IDs to remove.",
"location": "query",
"type": "string"
},
"setModifiedDate": {
"default": "false",
"description": "Whether to set the modified date using the value supplied in the request body. Setting this field to true is equivalent to modifiedDateBehavior=fromBodyOrNow, and false is equivalent to modifiedDateBehavior=now. To prevent any changes to the modified date set modifiedDateBehavior=noChange.",
"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"
},
"timedTextLanguage": {
"description": "The language of the timed text.",
"location": "query",
"type": "string"
},
"timedTextTrackName": {
"description": "The timed text track name.",
"location": "query",
"type": "string"
},
"updateViewedDate": {
"default": "true",
"description": "Whether to update the view date after successfully updating the file.",
"location": "query",
"type": "boolean"
},
"useContentAsIndexableText": {
"default": "false",
"description": "Whether to use the 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.apps.readonly",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.metadata",
"https://www.googleapis.com/auth/drive.scripts"
]
},
"touch": {
"description": "Set the file's updated time to the current server time.",
"httpMethod": "POST",
"id": "drive.files.touch",
"parameterOrder": [
"fileId"
],
"parameters": {
"fileId": {
"description": "The ID of the file to update.",
"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}/touch",
"response": {
"$ref": "File"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.apps.readonly",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.metadata"
]
},
"trash": {
"description": "Moves a file to the trash. The currently authenticated user must own the file or be at least a fileOrganizer on the parent for shared drive files.",
"httpMethod": "POST",
"id": "drive.files.trash",
"parameterOrder": [
"fileId"
],
"parameters": {
"fileId": {
"description": "The ID of the file to trash.",
"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}/trash",
"response": {
"$ref": "File"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.apps.readonly",
"https://www.googleapis.com/auth/drive.file"
]
},
"untrash": {
"description": "Restores a file from the trash.",
"httpMethod": "POST",
"id": "drive.files.untrash",
"parameterOrder": [
"fileId"
],
"parameters": {
"fileId": {
"description": "The ID of the file to untrash.",
"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}/untrash",
"response": {
"$ref": "File"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.apps.readonly",
"https://www.googleapis.com/auth/drive.file"
]
},
"update": {
"description": "Updates file metadata and/or content.",
"httpMethod": "PUT",
"id": "drive.files.update",
"mediaUpload": {
"accept": [
"*/*"
],
"maxSize": "5120GB",
"protocols": {
"resumable": {
"multipart": true,
"path": "/resumable/upload/drive/v2/files/{fileId}"
},
"simple": {
"multipart": true,
"path": "/upload/drive/v2/files/{fileId}"
}
}
},
"parameterOrder": [
"fileId"
],
"parameters": {
"addParents": {
"description": "Comma-separated list of parent IDs to add.",
"location": "query",
"type": "string"
},
"convert": {
"default": "false",
"description": "This parameter is deprecated and has no function.",
"location": "query",
"type": "boolean"
},
"fileId": {
"description": "The ID of the file to update.",
"location": "path",
"required": true,
"type": "string"
},
"modifiedDateBehavior": {
"description": "Determines the behavior in which modifiedDate is updated. This overrides setModifiedDate.",
"enum": [
"fromBody",
"fromBodyIfNeeded",
"fromBodyOrNow",
"noChange",
"now",
"nowIfNeeded"
],
"enumDescriptions": [
"Set modifiedDate to the value provided in the body of the request. No change if no value was provided.",
"Set modifiedDate to the value provided in the body of the request depending on other contents of the update.",
"Set modifiedDate to the value provided in the body of the request, or to the current time if no value was provided.",
"Maintain the previous value of modifiedDate.",
"Set modifiedDate to the current time.",
"Set modifiedDate to the current time depending on contents of the update."
],
"location": "query",
"type": "string"
},
"newRevision": {
"default": "true",
"description": "Whether a blob upload should create a new revision. If false, the blob data in the current head revision is replaced. If true or not set, a new blob is created as head revision, and previous unpinned revisions are preserved for a short period of time. Pinned revisions are stored indefinitely, using additional storage quota, up to a maximum of 200 revisions. For details on how revisions are retained, see the Drive Help Center.",
"location": "query",
"type": "boolean"
},
"ocr": {
"default": "false",
"description": "Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.",
"location": "query",
"type": "boolean"
},
"ocrLanguage": {
"description": "If ocr is true, hints at the language to use. Valid values are BCP 47 codes.",
"location": "query",
"type": "string"
},
"pinned": {
"default": "false",
"description": "Whether to pin the new revision. A file can have a maximum of 200 pinned revisions.",
"location": "query",
"type": "boolean"
},
"removeParents": {
"description": "Comma-separated list of parent IDs to remove.",
"location": "query",
"type": "string"
},
"setModifiedDate": {
"default": "false",
"description": "Whether to set the modified date using the value supplied in the request body. Setting this field to true is equivalent to modifiedDateBehavior=fromBodyOrNow, and false is equivalent to modifiedDateBehavior=now. To prevent any changes to the modified date set modifiedDateBehavior=noChange.",
"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"
},
"timedTextLanguage": {
"description": "The language of the timed text.",
"location": "query",
"type": "string"
},
"timedTextTrackName": {
"description": "The timed text track name.",
"location": "query",
"type": "string"
},
"updateViewedDate": {
"default": "true",
"description": "Whether to update the view date after successfully updating the file.",
"location": "query",
"type": "boolean"
},
"useContentAsIndexableText": {
"default": "false",
"description": "Whether to use the 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.apps.readonly",
"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": "Subscribe to changes on 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.",
"location": "query",
"type": "boolean"
},
"fileId": {
"description": "The ID for the file in question.",
"location": "path",
"required": true,
"type": "string"
},
"projection": {
"description": "This parameter is deprecated and has no function.",
"enum": [
"BASIC",
"FULL"
],
"enumDescriptions": [
"Deprecated",
"Deprecated"
],
"location": "query",
"type": "string"
},
"revisionId": {
"description": "Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.",
"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"
},
"updateViewedDate": {
"default": "false",
"description": "Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.",
"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
}
}
},
"parents": {
"methods": {
"delete": {
"description": "Removes a parent from a file.",
"httpMethod": "DELETE",
"id": "drive.parents.delete",
"parameterOrder": [
"fileId",
"parentId"
],
"parameters": {
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
},
"parentId": {
"description": "The ID of the parent.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "files/{fileId}/parents/{parentId}",
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file"
]
},
"get": {
"description": "Gets a specific parent reference.",
"httpMethod": "GET",
"id": "drive.parents.get",
"parameterOrder": [
"fileId",
"parentId"
],
"parameters": {
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
},
"parentId": {
"description": "The ID of the parent.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "files/{fileId}/parents/{parentId}",
"response": {
"$ref": "ParentReference"
},
"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"
]
},
"insert": {
"description": "Adds a parent folder for a file.",
"httpMethod": "POST",
"id": "drive.parents.insert",
"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}/parents",
"request": {
"$ref": "ParentReference"
},
"response": {
"$ref": "ParentReference"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.file"
]
},
"list": {
"description": "Lists a file's parents.",
"httpMethod": "GET",
"id": "drive.parents.list",
"parameterOrder": [
"fileId"
],
"parameters": {
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "files/{fileId}/parents",
"response": {
"$ref": "ParentList"
},
"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"
]
}
}
},
"permissions": {
"methods": {
"delete": {
"description": "Deletes a permission from a file or shared drive.",
"httpMethod": "DELETE",
"id": "drive.permissions.delete",
"parameterOrder": [
"fileId",
"permissionId"
],
"parameters": {
"fileId": {
"description": "The ID for the file or shared drive.",
"location": "path",
"required": true,
"type": "string"
},
"permissionId": {
"description": "The ID for 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 for the file or shared drive.",
"location": "path",
"required": true,
"type": "string"
},
"permissionId": {
"description": "The ID for 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"
]
},
"getIdForEmail": {
"description": "Returns the permission ID for an email address.",
"httpMethod": "GET",
"id": "drive.permissions.getIdForEmail",
"parameterOrder": [
"email"
],
"parameters": {
"email": {
"description": "The email address for which to return a permission ID",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "permissionIds/{email}",
"response": {
"$ref": "PermissionId"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.apps.readonly",
"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"
]
},
"insert": {
"description": "Inserts a permission for a file or shared drive.",
"httpMethod": "POST",
"id": "drive.permissions.insert",
"parameterOrder": [
"fileId"
],
"parameters": {
"emailMessage": {
"description": "A plain text custom message to include in notification emails.",
"location": "query",
"type": "string"
},
"fileId": {
"description": "The ID for the file or shared drive.",
"location": "path",
"required": true,
"type": "string"
},
"sendNotificationEmails": {
"default": "true",
"description": "Whether to send notification emails when sharing to users or groups. This parameter is ignored and an email is sent if the role is owner.",
"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"
},
"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"
]
},
"list": {
"description": "Lists a file's or shared drive's permissions.",
"httpMethod": "GET",
"id": "drive.permissions.list",
"parameterOrder": [
"fileId"
],
"parameters": {
"fileId": {
"description": "The ID for the file or shared drive.",
"location": "path",
"required": true,
"type": "string"
},
"maxResults": {
"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"
]
},
"patch": {
"description": "Updates a permission using patch semantics.",
"httpMethod": "PATCH",
"id": "drive.permissions.patch",
"parameterOrder": [
"fileId",
"permissionId"
],
"parameters": {
"fileId": {
"description": "The ID for the file or shared drive.",
"location": "path",
"required": true,
"type": "string"
},
"permissionId": {
"description": "The ID for 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 changing a role to 'owner' downgrades the current owners to writers. Does nothing if the specified role is not 'owner'.",
"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"
]
},
"update": {
"description": "Updates a permission.",
"httpMethod": "PUT",
"id": "drive.permissions.update",
"parameterOrder": [
"fileId",
"permissionId"
],
"parameters": {
"fileId": {
"description": "The ID for the file or shared drive.",
"location": "path",
"required": true,
"type": "string"
},
"permissionId": {
"description": "The ID for 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 changing a role to 'owner' downgrades the current owners to writers. Does nothing if the specified role is not 'owner'.",
"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"
]
}
}
},
"properties": {
"methods": {
"delete": {
"description": "Deletes a property.",
"httpMethod": "DELETE",
"id": "drive.properties.delete",
"parameterOrder": [
"fileId",
"propertyKey"
],
"parameters": {
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
},
"propertyKey": {
"description": "The key of the property.",
"location": "path",
"required": true,
"type": "string"
},
"visibility": {
"default": "private",
"description": "The visibility of the property.",
"location": "query",
"type": "string"
}
},
"path": "files/{fileId}/properties/{propertyKey}",
"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"
]
},
"get": {
"description": "Gets a property by its key.",
"httpMethod": "GET",
"id": "drive.properties.get",
"parameterOrder": [
"fileId",
"propertyKey"
],
"parameters": {
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
},
"propertyKey": {
"description": "The key of the property.",
"location": "path",
"required": true,
"type": "string"
},
"visibility": {
"default": "private",
"description": "The visibility of the property.",
"location": "query",
"type": "string"
}
},
"path": "files/{fileId}/properties/{propertyKey}",
"response": {
"$ref": "Property"
},
"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"
]
},
"insert": {
"description": "Adds a property to a file, or updates it if it already exists.",
"httpMethod": "POST",
"id": "drive.properties.insert",
"parameterOrder": [
"fileId"
],
"parameters": {
"fileId": {
"description": "The ID of the file.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "files/{fileId}/properties",
"request": {
"$ref": "Property"
},
"response": {
"$ref": "Property"
},
"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"
]
},
"list": {
"description": "Lists a file's properties.",
"httpMethod": "GET",
"id": "drive.properties.list",
"parameterOrder": [
"fileId"
],
"parameters": {
"fileId": {
"description": "The ID of the file.",
"location": "path",