UNPKG

@itentialopensource/adapter-google_drive

Version:

This adapter integrates with system described as: google drive

1,701 lines 225 kB
{ "openapi": "3.0.0", "servers": [ { "url": "https://www.googleapis.com/drive/v3" } ], "info": { "contact": { "name": "Google", "url": "https://google.com", "x-twitter": "youtube" }, "description": "Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.", "license": { "name": "Creative Commons Attribution 3.0", "url": "http://creativecommons.org/licenses/by/3.0/" }, "termsOfService": "https://developers.google.com/terms/", "title": "Drive API", "version": "v3", "x-apiClientRegistration": { "url": "https://console.developers.google.com" }, "x-apisguru-categories": [ "analytics", "media" ], "x-logo": { "url": "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png" }, "x-origin": [ { "converter": { "url": "https://github.com/mermade/oas-kit", "version": "7.0.4" }, "format": "google", "url": "https://www.googleapis.com/discovery/v1/apis/drive/v3/rest", "version": "v1" } ], "x-preferred": true, "x-providerName": "googleapis.com", "x-serviceName": "drive" }, "externalDocs": { "url": "https://developers.google.com/drive/" }, "tags": [ { "name": "about" }, { "name": "changes" }, { "name": "channels" }, { "name": "comments" }, { "name": "drives" }, { "name": "files" }, { "name": "permissions" }, { "name": "replies" }, { "name": "revisions" }, { "name": "teamdrives" } ], "paths": { "/about": { "get": { "description": "Gets information about the user, the user's Drive, and system capabilities.", "operationId": "drive.about.get", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/About" } } }, "description": "Successful response" } }, "security": [ { "Oauth2": [ "https://www.googleapis.com/auth/drive" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.appdata" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.appdata" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.file" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.file" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.metadata" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.metadata" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.metadata.readonly" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.metadata.readonly" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.photos.readonly" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.photos.readonly" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.readonly" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.readonly" ] } ], "tags": [ "about" ] }, "parameters": [ { "$ref": "#/components/parameters/alt" }, { "$ref": "#/components/parameters/fields" }, { "$ref": "#/components/parameters/key" }, { "$ref": "#/components/parameters/oauth_token" }, { "$ref": "#/components/parameters/prettyPrint" }, { "$ref": "#/components/parameters/quotaUser" }, { "$ref": "#/components/parameters/userIp" } ] }, "/changes": { "get": { "description": "Lists the changes for a user or shared drive.", "operationId": "drive.changes.list", "parameters": [ { "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.", "in": "query", "name": "pageToken", "required": true, "schema": { "type": "string" } }, { "description": "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.", "in": "query", "name": "driveId", "schema": { "type": "string" } }, { "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.", "in": "query", "name": "includeCorpusRemovals", "schema": { "type": "boolean" } }, { "description": "Whether both My Drive and shared drive items should be included in results.", "in": "query", "name": "includeItemsFromAllDrives", "schema": { "type": "boolean" } }, { "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", "in": "query", "name": "includePermissionsForView", "schema": { "type": "string" } }, { "description": "Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.", "in": "query", "name": "includeRemoved", "schema": { "type": "boolean" } }, { "description": "Deprecated use includeItemsFromAllDrives instead.", "in": "query", "name": "includeTeamDriveItems", "schema": { "type": "boolean" } }, { "description": "The maximum number of changes to return per page.", "in": "query", "name": "pageSize", "schema": { "maximum": 1000, "minimum": 1, "type": "integer" } }, { "description": "Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive.", "in": "query", "name": "restrictToMyDrive", "schema": { "type": "boolean" } }, { "description": "A comma-separated list of spaces to query within the user corpus. Supported values are 'drive', 'appDataFolder' and 'photos'.", "in": "query", "name": "spaces", "schema": { "type": "string" } }, { "description": "Whether the requesting application supports both My Drives and shared drives.", "in": "query", "name": "supportsAllDrives", "schema": { "type": "boolean" } }, { "description": "Deprecated use supportsAllDrives instead.", "in": "query", "name": "supportsTeamDrives", "schema": { "type": "boolean" } }, { "description": "Deprecated use driveId instead.", "in": "query", "name": "teamDriveId", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangeList" } } }, "description": "Successful response" } }, "security": [ { "Oauth2": [ "https://www.googleapis.com/auth/drive" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.appdata" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.appdata" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.file" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.file" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.metadata" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.metadata" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.metadata.readonly" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.metadata.readonly" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.photos.readonly" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.photos.readonly" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.readonly" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.readonly" ] } ], "tags": [ "changes" ] }, "parameters": [ { "$ref": "#/components/parameters/alt" }, { "$ref": "#/components/parameters/fields" }, { "$ref": "#/components/parameters/key" }, { "$ref": "#/components/parameters/oauth_token" }, { "$ref": "#/components/parameters/prettyPrint" }, { "$ref": "#/components/parameters/quotaUser" }, { "$ref": "#/components/parameters/userIp" } ] }, "/changes/startPageToken": { "get": { "description": "Gets the starting pageToken for listing future changes.", "operationId": "drive.changes.getStartPageToken", "parameters": [ { "description": "The ID of the shared drive for which the starting pageToken for listing future changes from that shared drive is returned.", "in": "query", "name": "driveId", "schema": { "type": "string" } }, { "description": "Whether the requesting application supports both My Drives and shared drives.", "in": "query", "name": "supportsAllDrives", "schema": { "type": "boolean" } }, { "description": "Deprecated use supportsAllDrives instead.", "in": "query", "name": "supportsTeamDrives", "schema": { "type": "boolean" } }, { "description": "Deprecated use driveId instead.", "in": "query", "name": "teamDriveId", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StartPageToken" } } }, "description": "Successful response" } }, "security": [ { "Oauth2": [ "https://www.googleapis.com/auth/drive" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.appdata" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.appdata" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.file" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.file" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.metadata" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.metadata" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.metadata.readonly" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.metadata.readonly" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.photos.readonly" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.photos.readonly" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.readonly" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.readonly" ] } ], "tags": [ "changes" ] }, "parameters": [ { "$ref": "#/components/parameters/alt" }, { "$ref": "#/components/parameters/fields" }, { "$ref": "#/components/parameters/key" }, { "$ref": "#/components/parameters/oauth_token" }, { "$ref": "#/components/parameters/prettyPrint" }, { "$ref": "#/components/parameters/quotaUser" }, { "$ref": "#/components/parameters/userIp" } ] }, "/changes/watch": { "parameters": [ { "$ref": "#/components/parameters/alt" }, { "$ref": "#/components/parameters/fields" }, { "$ref": "#/components/parameters/key" }, { "$ref": "#/components/parameters/oauth_token" }, { "$ref": "#/components/parameters/prettyPrint" }, { "$ref": "#/components/parameters/quotaUser" }, { "$ref": "#/components/parameters/userIp" } ], "post": { "description": "Subscribes to changes for a user.", "operationId": "drive.changes.watch", "parameters": [ { "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.", "in": "query", "name": "pageToken", "required": true, "schema": { "type": "string" } }, { "description": "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.", "in": "query", "name": "driveId", "schema": { "type": "string" } }, { "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.", "in": "query", "name": "includeCorpusRemovals", "schema": { "type": "boolean" } }, { "description": "Whether both My Drive and shared drive items should be included in results.", "in": "query", "name": "includeItemsFromAllDrives", "schema": { "type": "boolean" } }, { "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", "in": "query", "name": "includePermissionsForView", "schema": { "type": "string" } }, { "description": "Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.", "in": "query", "name": "includeRemoved", "schema": { "type": "boolean" } }, { "description": "Deprecated use includeItemsFromAllDrives instead.", "in": "query", "name": "includeTeamDriveItems", "schema": { "type": "boolean" } }, { "description": "The maximum number of changes to return per page.", "in": "query", "name": "pageSize", "schema": { "maximum": 1000, "minimum": 1, "type": "integer" } }, { "description": "Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive.", "in": "query", "name": "restrictToMyDrive", "schema": { "type": "boolean" } }, { "description": "A comma-separated list of spaces to query within the user corpus. Supported values are 'drive', 'appDataFolder' and 'photos'.", "in": "query", "name": "spaces", "schema": { "type": "string" } }, { "description": "Whether the requesting application supports both My Drives and shared drives.", "in": "query", "name": "supportsAllDrives", "schema": { "type": "boolean" } }, { "description": "Deprecated use supportsAllDrives instead.", "in": "query", "name": "supportsTeamDrives", "schema": { "type": "boolean" } }, { "description": "Deprecated use driveId instead.", "in": "query", "name": "teamDriveId", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Channel" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Channel" } } }, "description": "Successful response" } }, "security": [ { "Oauth2": [ "https://www.googleapis.com/auth/drive" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.appdata" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.appdata" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.file" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.file" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.metadata" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.metadata" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.metadata.readonly" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.metadata.readonly" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.photos.readonly" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.photos.readonly" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.readonly" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.readonly" ] } ], "tags": [ "changes" ] } }, "/channels/stop": { "parameters": [ { "$ref": "#/components/parameters/alt" }, { "$ref": "#/components/parameters/fields" }, { "$ref": "#/components/parameters/key" }, { "$ref": "#/components/parameters/oauth_token" }, { "$ref": "#/components/parameters/prettyPrint" }, { "$ref": "#/components/parameters/quotaUser" }, { "$ref": "#/components/parameters/userIp" } ], "post": { "description": "Stop watching resources through this channel", "operationId": "drive.channels.stop", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Channel" } } } }, "responses": { "200": { "description": "Successful response" } }, "security": [ { "Oauth2": [ "https://www.googleapis.com/auth/drive" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.appdata" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.appdata" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.file" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.file" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.metadata" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.metadata" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.metadata.readonly" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.metadata.readonly" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.photos.readonly" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.photos.readonly" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.readonly" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.readonly" ] } ], "tags": [ "channels" ] } }, "/drives": { "get": { "description": "Lists the user's shared drives.", "operationId": "drive.drives.list", "parameters": [ { "description": "Maximum number of shared drives to return per page.", "in": "query", "name": "pageSize", "schema": { "maximum": 100, "minimum": 1, "type": "integer" } }, { "description": "Page token for shared drives.", "in": "query", "name": "pageToken", "schema": { "type": "string" } }, { "description": "Query string for searching shared drives.", "in": "query", "name": "q", "schema": { "type": "string" } }, { "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.", "in": "query", "name": "useDomainAdminAccess", "schema": { "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DriveList" } } }, "description": "Successful response" } }, "security": [ { "Oauth2": [ "https://www.googleapis.com/auth/drive" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.readonly" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.readonly" ] } ], "tags": [ "drives" ] }, "parameters": [ { "$ref": "#/components/parameters/alt" }, { "$ref": "#/components/parameters/fields" }, { "$ref": "#/components/parameters/key" }, { "$ref": "#/components/parameters/oauth_token" }, { "$ref": "#/components/parameters/prettyPrint" }, { "$ref": "#/components/parameters/quotaUser" }, { "$ref": "#/components/parameters/userIp" } ], "post": { "description": "Creates a new shared drive.", "operationId": "drive.drives.create", "parameters": [ { "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.", "in": "query", "name": "requestId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Drive" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Drive" } } }, "description": "Successful response" } }, "security": [ { "Oauth2": [ "https://www.googleapis.com/auth/drive" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive" ] } ], "tags": [ "drives" ] } }, "/drives/{driveId}": { "delete": { "description": "Permanently deletes a shared drive for which the user is an organizer. The shared drive cannot contain any untrashed items.", "operationId": "drive.drives.delete", "parameters": [ { "description": "The ID of the shared drive.", "in": "path", "name": "driveId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" } }, "security": [ { "Oauth2": [ "https://www.googleapis.com/auth/drive" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive" ] } ], "tags": [ "drives" ] }, "get": { "description": "Gets a shared drive's metadata by ID.", "operationId": "drive.drives.get", "parameters": [ { "description": "The ID of the shared drive.", "in": "path", "name": "driveId", "required": true, "schema": { "type": "string" } }, { "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.", "in": "query", "name": "useDomainAdminAccess", "schema": { "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Drive" } } }, "description": "Successful response" } }, "security": [ { "Oauth2": [ "https://www.googleapis.com/auth/drive" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.readonly" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.readonly" ] } ], "tags": [ "drives" ] }, "parameters": [ { "$ref": "#/components/parameters/alt" }, { "$ref": "#/components/parameters/fields" }, { "$ref": "#/components/parameters/key" }, { "$ref": "#/components/parameters/oauth_token" }, { "$ref": "#/components/parameters/prettyPrint" }, { "$ref": "#/components/parameters/quotaUser" }, { "$ref": "#/components/parameters/userIp" } ], "patch": { "description": "Updates the metadate for a shared drive.", "operationId": "drive.drives.update", "parameters": [ { "description": "The ID of the shared drive.", "in": "path", "name": "driveId", "required": true, "schema": { "type": "string" } }, { "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.", "in": "query", "name": "useDomainAdminAccess", "schema": { "type": "boolean" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Drive" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Drive" } } }, "description": "Successful response" } }, "security": [ { "Oauth2": [ "https://www.googleapis.com/auth/drive" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive" ] } ], "tags": [ "drives" ] } }, "/drives/{driveId}/hide": { "parameters": [ { "$ref": "#/components/parameters/alt" }, { "$ref": "#/components/parameters/fields" }, { "$ref": "#/components/parameters/key" }, { "$ref": "#/components/parameters/oauth_token" }, { "$ref": "#/components/parameters/prettyPrint" }, { "$ref": "#/components/parameters/quotaUser" }, { "$ref": "#/components/parameters/userIp" } ], "post": { "description": "Hides a shared drive from the default view.", "operationId": "drive.drives.hide", "parameters": [ { "description": "The ID of the shared drive.", "in": "path", "name": "driveId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Drive" } } }, "description": "Successful response" } }, "security": [ { "Oauth2": [ "https://www.googleapis.com/auth/drive" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive" ] } ], "tags": [ "drives" ] } }, "/drives/{driveId}/unhide": { "parameters": [ { "$ref": "#/components/parameters/alt" }, { "$ref": "#/components/parameters/fields" }, { "$ref": "#/components/parameters/key" }, { "$ref": "#/components/parameters/oauth_token" }, { "$ref": "#/components/parameters/prettyPrint" }, { "$ref": "#/components/parameters/quotaUser" }, { "$ref": "#/components/parameters/userIp" } ], "post": { "description": "Restores a shared drive to the default view.", "operationId": "drive.drives.unhide", "parameters": [ { "description": "The ID of the shared drive.", "in": "path", "name": "driveId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Drive" } } }, "description": "Successful response" } }, "security": [ { "Oauth2": [ "https://www.googleapis.com/auth/drive" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive" ] } ], "tags": [ "drives" ] } }, "/files": { "get": { "description": "Lists or searches files.", "operationId": "drive.files.list", "parameters": [ { "description": "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.", "in": "query", "name": "corpora", "schema": { "type": "string" } }, { "description": "The source of files to list. Deprecated: use 'corpora' instead.", "in": "query", "name": "corpus", "schema": { "enum": [ "domain", "user" ], "type": "string" } }, { "description": "ID of the shared drive to search.", "in": "query", "name": "driveId", "schema": { "type": "string" } }, { "description": "Whether both My Drive and shared drive items should be included in results.", "in": "query", "name": "includeItemsFromAllDrives", "schema": { "type": "boolean" } }, { "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", "in": "query", "name": "includePermissionsForView", "schema": { "type": "string" } }, { "description": "Deprecated use includeItemsFromAllDrives instead.", "in": "query", "name": "includeTeamDriveItems", "schema": { "type": "boolean" } }, { "description": "A comma-separated list of sort keys. Valid keys are 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime', 'name', 'name_natural', 'quotaBytesUsed', 'recency', 'sharedWithMeTime', 'starred', and 'viewedByMeTime'. Each key sorts ascending by default, but may be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedTime desc,name. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.", "in": "query", "name": "orderBy", "schema": { "type": "string" } }, { "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.", "in": "query", "name": "pageSize", "schema": { "maximum": 1000, "minimum": 1, "type": "integer" } }, { "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.", "in": "query", "name": "pageToken", "schema": { "type": "string" } }, { "description": "A query for filtering the file results. See the \"Search for Files\" guide for supported syntax.", "in": "query", "name": "q", "schema": { "type": "string" } }, { "description": "A comma-separated list of spaces to query within the corpus. Supported values are 'drive' and 'appDataFolder'.", "in": "query", "name": "spaces", "schema": { "type": "string" } }, { "description": "Whether the requesting application supports both My Drives and shared drives.", "in": "query", "name": "supportsAllDrives", "schema": { "type": "boolean" } }, { "description": "Deprecated use supportsAllDrives instead.", "in": "query", "name": "supportsTeamDrives", "schema": { "type": "boolean" } }, { "description": "Deprecated use driveId instead.", "in": "query", "name": "teamDriveId", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FileList" } } }, "description": "Successful response" } }, "security": [ { "Oauth2": [ "https://www.googleapis.com/auth/drive" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.appdata" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.appdata" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.file" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.file" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.metadata" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.metadata" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.metadata.readonly" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.metadata.readonly" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.photos.readonly" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.photos.readonly" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.readonly" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.readonly" ] } ], "tags": [ "files" ] }, "parameters": [ { "$ref": "#/components/parameters/alt" }, { "$ref": "#/components/parameters/fields" }, { "$ref": "#/components/parameters/key" }, { "$ref": "#/components/parameters/oauth_token" }, { "$ref": "#/components/parameters/prettyPrint" }, { "$ref": "#/components/parameters/quotaUser" }, { "$ref": "#/components/parameters/userIp" } ], "post": { "description": "Creates a new file.", "operationId": "drive.files.create", "parameters": [ { "description": "Deprecated. Creating files in multiple folders is no longer supported.", "in": "query", "name": "enforceSingleParent", "schema": { "type": "boolean" } }, { "description": "Whether to ignore the domain's default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders.", "in": "query", "name": "ignoreDefaultVisibility", "schema": { "type": "boolean" } }, { "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", "in": "query", "name": "includePermissionsForView", "schema": { "type": "string" } }, { "description": "Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions.", "in": "query", "name": "keepRevisionForever", "schema": { "type": "boolean" } }, { "description": "A language hint for OCR processing during image import (ISO 639-1 code).", "in": "query", "name": "ocrLanguage", "schema": { "type": "string" } }, { "description": "Whether the requesting application supports both My Drives and shared drives.", "in": "query", "name": "supportsAllDrives", "schema": { "type": "boolean" } }, { "description": "Deprecated use supportsAllDrives instead.", "in": "query", "name": "supportsTeamDrives", "schema": { "type": "boolean" } }, { "description": "Whether to use the uploaded content as indexable text.", "in": "query", "name": "useContentAsIndexableText", "schema": { "type": "boolean" } } ], "requestBody": { "content": { "application/octet-stream": { "schema": { "$ref": "#/components/schemas/File" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/File" } } }, "description": "Successful response" } }, "security": [ { "Oauth2": [ "https://www.googleapis.com/auth/drive" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.appdata" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.appdata" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/drive.file" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive.file" ] } ], "tags": [ "files" ] } }, "/files/generateIds": { "get": { "description": "Generates a set of file IDs which can be provided in create or copy requests.", "operationId": "drive.files.generateIds", "parameters": [ { "description": "The number of IDs to return.", "in": "query", "name": "count", "schema": { "maximum": 1000, "minimum": 1, "type": "integer" } }, { "description": "The space in which the IDs can be used to create new files. Supported values are 'drive' and 'appDataFolder'. (Default: 'drive')", "in": "query", "name": "space", "schema": { "type": "string" } }, { "description": "The type of items which the IDs can be used for. Supported values are 'files' and 'shortcuts'. Note that 'shortcuts' are only supported in the drive 'space'. (Default: 'files')", "in": "query", "name": "type", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneratedIds" } } }, "description": "Successful response" } }, "security": [ { "Oauth2": [ "https://www.googleapis.com/auth/drive" ], "Oauth2c": [ "https://www.googleapis.com/auth/drive" ] }, { "Oauth2": [ "https://www.googleapis.com/auth/