Endpoint Replace file data (keep same file id)
Name
update_file
Description
Update file with new content / metadata (keep same file Id) [API reference]
Related Tables
Parameters
Parameter | Required | Options | ||||||
---|---|---|---|---|---|---|---|---|
Name:
Label: File Id Id of a file you want to update |
YES | |||||||
Name:
Label: DiskFilePath A disk file path you want to update file contents with |
YES | |||||||
Name:
Label: Drive Type Default search context is User's drive. Bodies of items (files/documents) to which the query applies. Supported bodies are 'user', 'domain', 'drive', and 'allDrives'. Prefer 'user' or 'drive' to 'allDrives' for efficiency. By default, corpora is set to 'user'. However, this can change depending on the filter set through the 'Query' parameter. |
YES |
|
||||||
Name:
Label: KeepRevisionForever Defines whether uploaded file has revisions |
||||||||
Name:
Label: AddParents A comma-separated list of parent IDs to add |
||||||||
Name:
Label: OcrLanguage A language hint for OCR processing during image import (ISO 639-1 code). |
||||||||
Name:
Label: UseContentAsIndexableText Whether to use the uploaded content as indexable text. |
||||||||
Name:
Label: Shared DriveId By default file lists from MyDrive but if you like to search other Shared drive (formally known as Team drive) then set this parameter. |
||||||||
Name:
Label: Supports all drives (e.g. My and Shared) Whether the requesting application supports both My Drives and shared drives. |
|
Output Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
---|---|---|---|---|
Id |
DT_WSTR
|
nvarchar(440)
|
440 | |
Kind |
DT_WSTR
|
nvarchar(200)
|
200 | |
Name |
DT_WSTR
|
nvarchar(780)
|
780 | |
MimeType |
DT_WSTR
|
nvarchar(650)
|
650 | |
FileSize |
DT_I8
|
bigint
|
||
DriveId |
DT_WSTR
|
nvarchar(4000)
|
4000 |
Input Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime. |
Examples
SSIS
Use Google Drive Connector in API Source or in API Destination SSIS Data Flow components to read or write data.
API Source
Required Parameters | |
---|---|
File Id | Fill-in the parameter... |
DiskFilePath | Fill-in the parameter... |
Optional Parameters | |
RawOutputDataRowTemplate | {Status:'Updated'} |
EnableRawOutputModeSingleRow | True |
KeepRevisionForever | |
AddParents | |
OcrLanguage | |
UseContentAsIndexableText | False |

API Destination
This Endpoint belongs to the Files table, therefore it is better to use it, instead of accessing the endpoint directly. Use this table and table-operation pair to replace file data:
Required Parameters | |
---|---|
File Id | Fill-in the parameter... |
DiskFilePath | Fill-in the parameter... |
Optional Parameters | |
RawOutputDataRowTemplate | {Status:'Updated'} |
EnableRawOutputModeSingleRow | True |
KeepRevisionForever | |
AddParents | |
OcrLanguage | |
UseContentAsIndexableText | False |

ODBC application
Use these SQL queries in your ODBC application data source:
Update a file
Updates a file
UPDATE Files
WITH (Id='1EVzXFVBQIh3LcJvfcLhI1UWhW3qUxFkM'
,DiskFilePath='C:\MyFiles\myfile.ext')
--You can get file Id by selecting from 'list_files' endpoint
update_file
endpoint belongs to
Files
table(s), and can therefore be used via those table(s).
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Update a file
Updates a file
DECLARE @MyQuery NVARCHAR(MAX) = 'UPDATE Files
WITH (Id=''1EVzXFVBQIh3LcJvfcLhI1UWhW3qUxFkM''
,DiskFilePath=''C:\MyFiles\myfile.ext'')
--You can get file Id by selecting from ''list_files'' endpoint';
EXEC (@MyQuery) AT [LS_TO_GOOGLE_DRIVE_IN_GATEWAY];
update_file
endpoint belongs to
Files
table(s), and can therefore be used via those table(s).