Client library for Drive API
npm install --save @datafire/google_drive
let google_drive = require('@datafire/google_drive').create({
access_token: "",
refresh_token: "",
client_id: "",
client_secret: "",
redirect_uri: ""
});
.then(data => {
console.log(data);
});
Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.
Exchange the code passed to your redirect URI for an access_token
google_drive.oauthCallback({
"code": ""
}, context)
object
string
object
string
string
string
string
string
Exchange a refresh_token for an access_token
google_drive.oauthRefresh(null, context)
This action has no parameters
object
string
string
string
string
string
Gets information about the user, the user's Drive, and system capabilities.
google_drive.drive.about.get({}, context)
object
string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Lists the changes for a user or shared drive.
google_drive.drive.changes.list({
"pageToken": ""
}, context)
object
string
: 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.string
: The shared drive from which changes are returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.boolean
: 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.boolean
: Whether both My Drive and shared drive items should be included in results.string
: Specifies which additional view's permissions to include in the response. Only 'published' is supported.boolean
: Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.boolean
: Deprecated use includeItemsFromAllDrives instead.integer
: The maximum number of changes to return per page.boolean
: 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.string
: A comma-separated list of spaces to query within the user corpus. Supported values are 'drive', 'appDataFolder' and 'photos'.boolean
: Whether the requesting application supports both My Drives and shared drives.boolean
: Deprecated use supportsAllDrives instead.string
: Deprecated use driveId instead.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Gets the starting pageToken for listing future changes.
google_drive.drive.changes.getStartPageToken({}, context)
object
string
: The ID of the shared drive for which the starting pageToken for listing future changes from that shared drive is returned.boolean
: Whether the requesting application supports both My Drives and shared drives.boolean
: Deprecated use supportsAllDrives instead.string
: Deprecated use driveId instead.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Subscribes to changes for a user.
google_drive.drive.changes.watch({
"pageToken": ""
}, context)
object
string
: 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.string
: The shared drive from which changes are returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.boolean
: 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.boolean
: Whether both My Drive and shared drive items should be included in results.string
: Specifies which additional view's permissions to include in the response. Only 'published' is supported.boolean
: Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.boolean
: Deprecated use includeItemsFromAllDrives instead.integer
: The maximum number of changes to return per page.boolean
: 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.string
: A comma-separated list of spaces to query within the user corpus. Supported values are 'drive', 'appDataFolder' and 'photos'.boolean
: Whether the requesting application supports both My Drives and shared drives.boolean
: Deprecated use supportsAllDrives instead.string
: Deprecated use driveId instead.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Stop watching resources through this channel
google_drive.drive.channels.stop({}, context)
object
string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Output schema unknown
Lists the user's shared drives.
google_drive.drive.drives.list({}, context)
object
integer
: Maximum number of shared drives to return.string
: Page token for shared drives.string
: Query string for searching shared drives.boolean
: Issue the request as a domain administrator; if set to true, then all shared drives of the domain in which the requester is an administrator are returned.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Creates a new shared drive.
google_drive.drive.drives.create({
"requestId": ""
}, context)
object
string
: 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.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Permanently deletes a shared drive for which the user is an organizer. The shared drive cannot contain any untrashed items.
google_drive.drive.drives.delete({
"driveId": ""
}, context)
object
string
: The ID of the shared drive.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Output schema unknown
Gets a shared drive's metadata by ID.
google_drive.drive.drives.get({
"driveId": ""
}, context)
object
string
: The ID of the shared drive.boolean
: 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.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Updates the metadate for a shared drive.
google_drive.drive.drives.update({
"driveId": ""
}, context)
object
string
: The ID of the shared drive.boolean
: 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.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Hides a shared drive from the default view.
google_drive.drive.drives.hide({
"driveId": ""
}, context)
object
string
: The ID of the shared drive.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Restores a shared drive to the default view.
google_drive.drive.drives.unhide({
"driveId": ""
}, context)
object
string
: The ID of the shared drive.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Lists or searches files.
google_drive.drive.files.list({}, context)
object
string
: Groupings of files to which the query applies. Supported groupings are: 'user' (files created by, opened by, or shared directly with the user), 'drive' (files in the specified shared drive as indicated by the 'driveId'), 'domain' (files shared to the user's domain), and 'allDrives' (A combination of 'user' and 'drive' for all drives where the user is a member). When able, use 'user' or 'drive', instead of 'allDrives', for efficiency.string
(values: domain, user): The source of files to list. Deprecated: use 'corpora' instead.string
: ID of the shared drive to search.boolean
: Whether both My Drive and shared drive items should be included in results.string
: Specifies which additional view's permissions to include in the response. Only 'published' is supported.boolean
: Deprecated use includeItemsFromAllDrives instead.string
: 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.integer
: 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.string
: 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.string
: A query for filtering the file results. See the "Search for Files" guide for supported syntax.string
: A comma-separated list of spaces to query within the corpus. Supported values are 'drive', 'appDataFolder' and 'photos'.boolean
: Whether the requesting application supports both My Drives and shared drives.boolean
: Deprecated use supportsAllDrives instead.string
: Deprecated use driveId instead.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Creates a new file.
google_drive.drive.files.create({}, context)
object
boolean
: Deprecated. Creating files in multiple folders is no longer supported.boolean
: 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.string
: Specifies which additional view's permissions to include in the response. Only 'published' is supported.boolean
: 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.string
: A language hint for OCR processing during image import (ISO 639-1 code).boolean
: Whether the requesting application supports both My Drives and shared drives.boolean
: Deprecated use supportsAllDrives instead.boolean
: Whether to use the uploaded content as indexable text.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Generates a set of file IDs which can be provided in create or copy requests.
google_drive.drive.files.generateIds({}, context)
object
integer
: The number of IDs to return.string
: The space in which the IDs can be used to create new files. Supported values are 'drive' and 'appDataFolder'.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Permanently deletes all of the user's trashed files.
google_drive.drive.files.emptyTrash({}, context)
object
boolean
: Deprecated. If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner's root.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Output schema unknown
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.
google_drive.drive.files.delete({
"fileId": ""
}, context)
object
string
: The ID of the file.boolean
: Deprecated. If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner's root.boolean
: Whether the requesting application supports both My Drives and shared drives.boolean
: Deprecated use supportsAllDrives instead.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Output schema unknown
Gets a file's metadata or content by ID.
google_drive.drive.files.get({
"fileId": ""
}, context)
object
string
: The ID of the file.boolean
: Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.string
: Specifies which additional view's permissions to include in the response. Only 'published' is supported.boolean
: Whether the requesting application supports both My Drives and shared drives.boolean
: Deprecated use supportsAllDrives instead.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Updates a file's metadata and/or content. This method supports patch semantics.
google_drive.drive.files.update({
"fileId": ""
}, context)
object
string
: The ID of the file.string
: A comma-separated list of parent IDs to add.boolean
: Deprecated. Adding files to multiple folders is no longer supported. Use shortcuts instead.string
: Specifies which additional view's permissions to include in the response. Only 'published' is supported.boolean
: 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.string
: A language hint for OCR processing during image import (ISO 639-1 code).string
: A comma-separated list of parent IDs to remove.boolean
: Whether the requesting application supports both My Drives and shared drives.boolean
: Deprecated use supportsAllDrives instead.boolean
: Whether to use the uploaded content as indexable text.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Lists a file's comments.
google_drive.drive.comments.list({
"fileId": ""
}, context)
object
string
: The ID of the file.boolean
: Whether to include deleted comments. Deleted comments will not include their original content.integer
: The maximum number of comments to return per page.string
: 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.string
: The minimum value of 'modifiedTime' for the result comments (RFC 3339 date-time).string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Creates a new comment on a file.
google_drive.drive.comments.create({
"fileId": ""
}, context)
object
string
: The ID of the file.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Deletes a comment.
google_drive.drive.comments.delete({
"fileId": "",
"commentId": ""
}, context)
object
string
: The ID of the file.string
: The ID of the comment.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Output schema unknown
Gets a comment by ID.
google_drive.drive.comments.get({
"fileId": "",
"commentId": ""
}, context)
object
string
: The ID of the file.string
: The ID of the comment.boolean
: Whether to return deleted comments. Deleted comments will not include their original content.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Updates a comment with patch semantics.
google_drive.drive.comments.update({
"fileId": "",
"commentId": ""
}, context)
object
string
: The ID of the file.string
: The ID of the comment.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Lists a comment's replies.
google_drive.drive.replies.list({
"fileId": "",
"commentId": ""
}, context)
object
string
: The ID of the file.string
: The ID of the comment.boolean
: Whether to include deleted replies. Deleted replies will not include their original content.integer
: The maximum number of replies to return per page.string
: 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.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Creates a new reply to a comment.
google_drive.drive.replies.create({
"fileId": "",
"commentId": ""
}, context)
object
string
: The ID of the file.string
: The ID of the comment.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Deletes a reply.
google_drive.drive.replies.delete({
"fileId": "",
"commentId": "",
"replyId": ""
}, context)
object
string
: The ID of the file.string
: The ID of the comment.string
: The ID of the reply.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Output schema unknown
Gets a reply by ID.
google_drive.drive.replies.get({
"fileId": "",
"commentId": "",
"replyId": ""
}, context)
object
string
: The ID of the file.string
: The ID of the comment.string
: The ID of the reply.boolean
: Whether to return deleted replies. Deleted replies will not include their original content.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Updates a reply with patch semantics.
google_drive.drive.replies.update({
"fileId": "",
"commentId": "",
"replyId": ""
}, context)
object
string
: The ID of the file.string
: The ID of the comment.string
: The ID of the reply.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Creates a copy of a file and applies any requested updates with patch semantics. Folders cannot be copied.
google_drive.drive.files.copy({
"fileId": ""
}, context)
object
string
: The ID of the file.boolean
: Deprecated. Copying files into multiple folders is no longer supported. Use shortcuts instead.boolean
: 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.string
: Specifies which additional view's permissions to include in the response. Only 'published' is supported.boolean
: 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.string
: A language hint for OCR processing during image import (ISO 639-1 code).boolean
: Whether the requesting application supports both My Drives and shared drives.boolean
: Deprecated use supportsAllDrives instead.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.
google_drive.drive.files.export({
"fileId": "",
"mimeType": ""
}, context)
object
string
: The ID of the file.string
: The MIME type of the format requested for this export.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Output schema unknown
Lists a file's or shared drive's permissions.
google_drive.drive.permissions.list({
"fileId": ""
}, context)
object
string
: The ID of the file or shared drive.string
: Specifies which additional view's permissions to include in the response. Only 'published' is supported.integer
: 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.string
: 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.boolean
: Whether the requesting application supports both My Drives and shared drives.boolean
: Deprecated use supportsAllDrives instead.boolean
: 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.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Creates a permission for a file or shared drive.
google_drive.drive.permissions.create({
"fileId": ""
}, context)
object
string
: The ID of the file or shared drive.string
: A plain text custom message to include in the notification email.boolean
: Deprecated. See moveToNewOwnersRoot for details.boolean
: This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. If set to true, the item will be moved to the new owner's My Drive root folder and all prior parents removed. If set to false, parents are not changed.boolean
: 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.boolean
: Whether the requesting application supports both My Drives and shared drives.boolean
: Deprecated use supportsAllDrives instead.boolean
: 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.boolean
: 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.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Deletes a permission.
google_drive.drive.permissions.delete({
"fileId": "",
"permissionId": ""
}, context)
object
string
: The ID of the file or shared drive.string
: The ID of the permission.boolean
: Whether the requesting application supports both My Drives and shared drives.boolean
: Deprecated use supportsAllDrives instead.boolean
: 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.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Output schema unknown
Gets a permission by ID.
google_drive.drive.permissions.get({
"fileId": "",
"permissionId": ""
}, context)
object
string
: The ID of the file.string
: The ID of the permission.boolean
: Whether the requesting application supports both My Drives and shared drives.boolean
: Deprecated use supportsAllDrives instead.boolean
: 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.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Updates a permission with patch semantics.
google_drive.drive.permissions.update({
"fileId": "",
"permissionId": ""
}, context)
object
string
: The ID of the file or shared drive.string
: The ID of the permission.boolean
: Whether to remove the expiration date.boolean
: Whether the requesting application supports both My Drives and shared drives.boolean
: Deprecated use supportsAllDrives instead.boolean
: 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.boolean
: 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.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Lists a file's revisions.
google_drive.drive.revisions.list({
"fileId": ""
}, context)
object
string
: The ID of the file.integer
: The maximum number of revisions to return per page.string
: 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.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.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.
google_drive.drive.revisions.delete({
"fileId": "",
"revisionId": ""
}, context)
object
string
: The ID of the file.string
: The ID of the revision.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Output schema unknown
Gets a revision's metadata or content by ID.
google_drive.drive.revisions.get({
"fileId": "",
"revisionId": ""
}, context)
object
string
: The ID of the file.string
: The ID of the revision.boolean
: Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Updates a revision with patch semantics.
google_drive.drive.revisions.update({
"fileId": "",
"revisionId": ""
}, context)
object
string
: The ID of the file.string
: The ID of the revision.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Subscribes to changes to a file
google_drive.drive.files.watch({
"fileId": ""
}, context)
object
string
: The ID of the file.boolean
: Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.string
: Specifies which additional view's permissions to include in the response. Only 'published' is supported.boolean
: Whether the requesting application supports both My Drives and shared drives.boolean
: Deprecated use supportsAllDrives instead.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Deprecated use drives.list instead.
google_drive.drive.teamdrives.list({}, context)
object
integer
: Maximum number of Team Drives to return.string
: Page token for Team Drives.string
: Query string for searching Team Drives.boolean
: 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.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Deprecated use drives.create instead.
google_drive.drive.teamdrives.create({
"requestId": ""
}, context)
object
string
: 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.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Deprecated use drives.delete instead.
google_drive.drive.teamdrives.delete({
"teamDriveId": ""
}, context)
object
string
: The ID of the Team Drivestring
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Output schema unknown
Deprecated use drives.get instead.
google_drive.drive.teamdrives.get({
"teamDriveId": ""
}, context)
object
string
: The ID of the Team Driveboolean
: 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.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.Deprecated use drives.update instead
google_drive.drive.teamdrives.update({
"teamDriveId": ""
}, context)
object
string
: The ID of the Team Driveboolean
: 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.string
(values: json): Data format for the response.string
: Selector specifying which fields to include in a partial response.string
: 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.string
: OAuth 2.0 token for the current user.boolean
: Returns response with indentations and line breaks.string
: An opaque string that represents a user for quota purposes. Must not exceed 40 characters.string
: Deprecated. Please use quotaUser instead.object
: Information about the user, the user's Drive, and system capabilities.boolean
: Whether the user has installed the requesting app.boolean
: Whether the user can create shared drives.boolean
: Deprecated - use canCreateDrives instead.array
: A list of themes that are supported for shared drives.object
string
: A link to this theme's background image.string
: The color of this theme as an RGB hex string.string
: The ID of the theme.object
: A map of source MIME type to possible targets for all supported exports.array
: The currently supported folder colors as RGB hex strings.string
object
: A map of source MIME type to possible targets for all supported imports.string
: Identifies what kind of resource this is. Value: the fixed string "drive#about".object
: A map of maximum import sizes by MIME type, in bytes.string
: The maximum upload size in bytes.Version | Tag | Published |
---|---|---|
6.0.0 | latest | 2yrs ago |