Delete an item
Name
delete_item
Description
Deletes an item [API reference]
Related Tables
Parameters
Output Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | Description |
---|---|---|---|---|---|
Status |
DT_WSTR
|
nvarchar(4000)
|
4000 | False |
Input Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | Description |
---|---|---|---|---|---|
Id |
DT_WSTR
|
nvarchar(4000)
|
4000 | False |
Examples
SSIS
Use Google Drive Connector in API Source component to read data or in API Destination component to read/write data:
Delete rows from Files table using API Destination
This Endpoint belongs to Files table, therefore you cannot work with it directly. Use this table and table-operation pair instead:

ODBC application
Use these SQL queries in your ODBC application data source:
Delete an item
SELECT * FROM delete_item
Delete a file
Deletes a file
DELETE FROM Files
WITH (Id='1gcu0hV34OTfgvcu9CFhr7Go4b35j5Mop')
--You can get file Id by selecting from 'list_files' endpoint
Delete a file by name from a shared drive
Delete a file by name from a shared drive
DELETE FROM Files where Name='dump.csv' and Trashed=0 WITH(DriveId='0AC00HWQH144cUk9PVA', DriveType='drive')
--You can get file Id by selecting from 'list_files' endpoint
Delete a folder
Deletes a folder
DELETE FROM Folders
WITH (Id='1yDO11prsLH9DUrBTCadV6GGMJrITjF9I')
--You can get folder Id by selecting from 'list_folders' endpoint
delete_item
endpoint belongs to
Files
, Folders
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:
Delete an item
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM delete_item';
EXEC (@MyQuery) AT [LS_TO_GOOGLE_DRIVE_IN_GATEWAY];
Delete a file
Deletes a file
DECLARE @MyQuery NVARCHAR(MAX) = 'DELETE FROM Files
WITH (Id=''1gcu0hV34OTfgvcu9CFhr7Go4b35j5Mop'')
--You can get file Id by selecting from ''list_files'' endpoint';
EXEC (@MyQuery) AT [LS_TO_GOOGLE_DRIVE_IN_GATEWAY];
Delete a file by name from a shared drive
Delete a file by name from a shared drive
DECLARE @MyQuery NVARCHAR(MAX) = 'DELETE FROM Files where Name=''dump.csv'' and Trashed=0 WITH(DriveId=''0AC00HWQH144cUk9PVA'', DriveType=''drive'')
--You can get file Id by selecting from ''list_files'' endpoint';
EXEC (@MyQuery) AT [LS_TO_GOOGLE_DRIVE_IN_GATEWAY];
Delete a folder
Deletes a folder
DECLARE @MyQuery NVARCHAR(MAX) = 'DELETE FROM Folders
WITH (Id=''1yDO11prsLH9DUrBTCadV6GGMJrITjF9I'')
--You can get folder Id by selecting from ''list_folders'' endpoint';
EXEC (@MyQuery) AT [LS_TO_GOOGLE_DRIVE_IN_GATEWAY];