Endpoint List files (Recursive)
Name
list_files
Description
List files / folders with search criteria
Related Tables
Parameters
| Parameter | Required | Options | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
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: Search Criteria Data filter (e.g. somecolumn -eq 'somevalue' ) , User can select multiple filter criteria using 'AND','OR' operator , Note*:- please refer the link for more filter criteria : https://zappysys.com/links?url=https://developers.google.com/drive/api/guides/search-files |
|
|||||||||||||||||||||||||||||||||||||||
|
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: PageSize |
||||||||||||||||||||||||||||||||||||||||
|
Name:
Label: Supports all drives (e.g. My and Shared) Whether the requesting application supports both My Drives and shared drives. |
|
|||||||||||||||||||||||||||||||||||||||
|
Name:
Label: Include items from all drives (e.g. My and Shared) |
|
|||||||||||||||||||||||||||||||||||||||
|
Name:
Label: Spaces to include in corpora (comma separed) |
||||||||||||||||||||||||||||||||||||||||
|
Name:
Label: Include Permissions For View |
|
|||||||||||||||||||||||||||||||||||||||
|
Name:
Label: Include Labels |
|
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 | |
| CreatedTime |
DT_DBTIMESTAMP
|
datetime
|
||
| ModifiedTime |
DT_DBTIMESTAMP
|
datetime
|
||
| Size |
DT_WSTR
|
nvarchar(200)
|
200 | |
| Version |
DT_WSTR
|
nvarchar(200)
|
200 | |
| Shared |
DT_BOOL
|
bit
|
||
| Starred |
DT_BOOL
|
bit
|
||
| Trashed |
DT_BOOL
|
bit
|
||
| FileExtension |
DT_WSTR
|
nvarchar(200)
|
200 | |
| DriveId |
DT_WSTR
|
nvarchar(500)
|
500 | |
| CopyRequiresWriterPermission |
DT_BOOL
|
bit
|
||
| Md5Checksum |
DT_WSTR
|
nvarchar(500)
|
500 | |
| WritersCanShare |
DT_BOOL
|
bit
|
||
| ViewedByMe |
DT_BOOL
|
bit
|
||
| Parents |
DT_WSTR
|
nvarchar(500)
|
500 | |
| ThumbnailLink |
DT_WSTR
|
nvarchar(4000)
|
4000 | |
| IconLink |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| LastModifyingUserDisplayName |
DT_WSTR
|
nvarchar(500)
|
500 | |
| LastModifyingUserKind |
DT_WSTR
|
nvarchar(100)
|
100 | |
| LastModifyingUserMe |
DT_BOOL
|
bit
|
||
| LastModifyingUserPermissionId |
DT_WSTR
|
nvarchar(500)
|
500 | |
| LastModifyingUserEmailAddress |
DT_WSTR
|
nvarchar(500)
|
500 | |
| LastModifyingUserPhotoLink |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| Owners |
DT_WSTR
|
nvarchar(4000)
|
4000 | |
| HeadRevisionId |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| WebViewLink |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| WebContentLink |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| ViewersCanCopyContent |
DT_BOOL
|
bit
|
||
| Permissions |
DT_WSTR
|
nvarchar(4000)
|
4000 | |
| HasThumbnail |
DT_BOOL
|
bit
|
||
| Spaces |
DT_WSTR
|
nvarchar(500)
|
500 | |
| ExplicitlyTrashed |
DT_BOOL
|
bit
|
||
| ModifiedByMeTime |
DT_DBTIMESTAMP
|
datetime
|
||
| ViewedByMeTime |
DT_DBTIMESTAMP
|
datetime
|
||
| QuotaBytesUsed |
DT_WSTR
|
nvarchar(50)
|
50 | |
| OriginalFilename |
DT_WSTR
|
nvarchar(500)
|
500 | |
| OwnedByMe |
DT_BOOL
|
bit
|
||
| FullFileExtension |
DT_WSTR
|
nvarchar(50)
|
50 | |
| IsAppAuthorized |
DT_BOOL
|
bit
|
||
| CanChangeViewersCanCopyContent |
DT_BOOL
|
bit
|
||
| CanEdit |
DT_BOOL
|
bit
|
||
| CanCopy |
DT_BOOL
|
bit
|
||
| CanComment |
DT_BOOL
|
bit
|
||
| CanAddChildren |
DT_BOOL
|
bit
|
||
| CanDelete |
DT_BOOL
|
bit
|
||
| CanDownload |
DT_BOOL
|
bit
|
||
| CanListChildren |
DT_BOOL
|
bit
|
||
| CanRemoveChildren |
DT_BOOL
|
bit
|
||
| CanRename |
DT_BOOL
|
bit
|
||
| CanTrash |
DT_BOOL
|
bit
|
||
| CanReadRevisions |
DT_BOOL
|
bit
|
||
| CanChangeCopyRequiresWriterPermission |
DT_BOOL
|
bit
|
||
| CanMoveItemIntoTeamDrive |
DT_BOOL
|
bit
|
||
| CanUntrash |
DT_BOOL
|
bit
|
||
| CanModifyContent |
DT_BOOL
|
bit
|
||
| CanMoveItemOutOfDrive |
DT_BOOL
|
bit
|
||
| CanAddMyDriveParent |
DT_BOOL
|
bit
|
||
| CanRemoveMyDriveParent |
DT_BOOL
|
bit
|
||
| CanMoveItemWithinDrive |
DT_BOOL
|
bit
|
||
| CanShare |
DT_BOOL
|
bit
|
||
| CanMoveChildrenWithinDrive |
DT_BOOL
|
bit
|
||
| CanModifyContentRestriction |
DT_BOOL
|
bit
|
||
| CanChangeSecurityUpdateEnabled |
DT_BOOL
|
bit
|
||
| CanAcceptOwnership |
DT_BOOL
|
bit
|
||
| CanReadLabels |
DT_BOOL
|
bit
|
||
| CanModifyLabels |
DT_BOOL
|
bit
|
||
| CanModifyEditorContentRestriction |
DT_BOOL
|
bit
|
||
| CanModifyOwnerContentRestriction |
DT_BOOL
|
bit
|
||
| CanRemoveContentRestriction |
DT_BOOL
|
bit
|
||
| CanMoveChildrenOutOfDrive |
DT_BOOL
|
bit
|
||
| CanReadDrive |
DT_BOOL
|
bit
|
||
| CanReadTeamDrive |
DT_BOOL
|
bit
|
||
| CanMoveTeamDriveItem |
DT_BOOL
|
bit
|
||
| CanMoveItemWithinTeamDrive |
DT_BOOL
|
bit
|
||
| CanMoveItemOutOfTeamDrive |
DT_BOOL
|
bit
|
||
| CanDeleteChildren |
DT_BOOL
|
bit
|
||
| CanMoveChildrenOutOfTeamDrive |
DT_BOOL
|
bit
|
||
| CanMoveChildrenWithinTeamDrive |
DT_BOOL
|
bit
|
||
| CanTrashChildren |
DT_BOOL
|
bit
|
||
| CanAddFolderFromAnotherDrive |
DT_BOOL
|
bit
|
||
| ThumbnailVersion |
DT_WSTR
|
nvarchar(50)
|
50 | |
| ModifiedByMe |
DT_BOOL
|
bit
|
||
| PermissionIds |
DT_WSTR
|
nvarchar(500)
|
500 | |
| ImageMediaMetadataWidth |
DT_I4
|
int
|
||
| ImageMediaMetadataHeight |
DT_I4
|
int
|
||
| ImageMediaMetadataRotation |
DT_I4
|
int
|
||
| LinkShareMetadataSecurityUpdateEligible |
DT_BOOL
|
bit
|
||
| LinkShareMetadataSecurityUpdateEnabled |
DT_BOOL
|
bit
|
||
| Sha1Checksum |
DT_WSTR
|
nvarchar(500)
|
500 | |
| Sha256Checksum |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| HasAugmentedPermissions |
DT_BOOL
|
bit
|
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
This Endpoint belongs to the Files table, therefore it is better to use it, instead of accessing the endpoint directly:
| Optional Parameters | |
|---|---|
| Search Criteria | mimeType!='application/vnd.google-apps.folder' AND trashed!=true |
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 list files:
| Optional Parameters | |
|---|---|
| Search Criteria | mimeType!='application/vnd.google-apps.folder' AND trashed!=true |
ODBC application
Use these SQL queries in your ODBC application data source:
List / search files from my drive
<p>Lists or searches files in the user's My Drive. Use the <code>Query</code> parameter to filter by name or other criteria (e.g. <code>name contains "ZappySys*.*"</code>).</p>
SELECT * FROM Files
WITH(
--Query='name contains "ZappySys*.*"',
)
List / search files from a single shared drive
<p>Lists or searches files in one shared drive. Supply <code>DriveId</code> and set <code>DriveType='drive'</code>, <code>SupportsAllDrives='true'</code>, and <code>IncludeItemsFromAllDrives='true'</code>. Optionally use <code>Query</code> to filter.</p>
SELECT * FROM Files
WITH(
--Query='name contains "ZappySys*.*"',
DriveId='0AFWIggplk2z6Uk9PVA',
DriveType='drive',
SupportsAllDrives='true',
IncludeItemsFromAllDrives='true'
)
List / search files from all shared drives
<p>Lists or searches files across all shared drives the user can access. Set <code>DriveType='allDrives'</code> with <code>SupportsAllDrives</code> and <code>IncludeItemsFromAllDrives</code>. Optionally use <code>Query</code> to filter.</p>
SELECT * FROM Files
WITH(
--Query='name contains "ZappySys*.*"',
DriveType='allDrives',
SupportsAllDrives='true',
IncludeItemsFromAllDrives='true'
)
List files
<p>Returns the list of files in the user's drive (or filtered by WITH options).</p>
SELECT * FROM Files
Get files list
<p>Returns the list of files (excluding folders) from the drive.</p>
SELECT * FROM FilesList
list_files endpoint belongs to
Files
, FilesList
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:
List / search files from my drive
<p>Lists or searches files in the user's My Drive. Use the <code>Query</code> parameter to filter by name or other criteria (e.g. <code>name contains "ZappySys*.*"</code>).</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Files
WITH(
--Query=''name contains "ZappySys*.*"'',
)';
EXEC (@MyQuery) AT [LS_TO_GOOGLE_DRIVE_IN_GATEWAY];
List / search files from a single shared drive
<p>Lists or searches files in one shared drive. Supply <code>DriveId</code> and set <code>DriveType='drive'</code>, <code>SupportsAllDrives='true'</code>, and <code>IncludeItemsFromAllDrives='true'</code>. Optionally use <code>Query</code> to filter.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Files
WITH(
--Query=''name contains "ZappySys*.*"'',
DriveId=''0AFWIggplk2z6Uk9PVA'',
DriveType=''drive'',
SupportsAllDrives=''true'',
IncludeItemsFromAllDrives=''true''
)';
EXEC (@MyQuery) AT [LS_TO_GOOGLE_DRIVE_IN_GATEWAY];
List / search files from all shared drives
<p>Lists or searches files across all shared drives the user can access. Set <code>DriveType='allDrives'</code> with <code>SupportsAllDrives</code> and <code>IncludeItemsFromAllDrives</code>. Optionally use <code>Query</code> to filter.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Files
WITH(
--Query=''name contains "ZappySys*.*"'',
DriveType=''allDrives'',
SupportsAllDrives=''true'',
IncludeItemsFromAllDrives=''true''
)';
EXEC (@MyQuery) AT [LS_TO_GOOGLE_DRIVE_IN_GATEWAY];
List files
<p>Returns the list of files in the user's drive (or filtered by WITH options).</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Files';
EXEC (@MyQuery) AT [LS_TO_GOOGLE_DRIVE_IN_GATEWAY];
Get files list
<p>Returns the list of files (excluding folders) from the drive.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM FilesList';
EXEC (@MyQuery) AT [LS_TO_GOOGLE_DRIVE_IN_GATEWAY];