Endpoint List files / folders from a parent folder (Recursive)
Name
list_parent_items
Description
List files or folders under a specified parent folder
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: Extra Query (must start with ' and ' --OR-- ' or ') 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: Search under Folder Id (Keep Blank for all folders) Folder Id for which you like to list all files |
||||||||||||||||||||||||||
Name:
Label: Include files from trash |
|
|||||||||||||||||||||||||
Name:
Label: Search Item type (i.e. files or folders) |
|
|||||||||||||||||||||||||
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
Optional Parameters | |
---|---|
Extra Query (must start with ' and ' --OR-- ' or ') | |
Search under Folder Id (Keep Blank for all folders) | |
Include files from trash | false |
Search Item type (i.e. files or folders) | all |

API Destination
Optional Parameters | |
---|---|
Extra Query (must start with ' and ' --OR-- ' or ') | |
Search under Folder Id (Keep Blank for all folders) | |
Include files from trash | false |
Search Item type (i.e. files or folders) | all |

ODBC application
Use these SQL queries in your ODBC application data source:
List / search items (files/folders) from a parent folder in recursive or non-recursive mode
This example shows how to list files from a parent folder, optionally you can specifiy item types to list (e.g. files, folders, sheets, documents). If you do not specify FolderId then recursive list is returned.
SELECT * FROM list_parent_items
WITH(
--Parent folder id (Keep it blank to scan all files in all folders - recursive
FolderId='1VK5NBhuOTaLEy1pBMsQtG672vrJNgxai'
--List only from Trash (deleted files)
, IncludeFromTrash='false'
--Extra search criteria
--, Query='or (name contains ''blog'') or (name contains ''test'') ' --extra query
--Item type to return (default is all)
--, ItemType='files' -- (default=all) all, files, folders, sheets, documents, files_native, files_exclude_native
--, ItemType='folders'
--, ItemType='sheets'
--, ItemType='files_native'
)
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
List / search items (files/folders) from a parent folder in recursive or non-recursive mode
This example shows how to list files from a parent folder, optionally you can specifiy item types to list (e.g. files, folders, sheets, documents). If you do not specify FolderId then recursive list is returned.
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM list_parent_items
WITH(
--Parent folder id (Keep it blank to scan all files in all folders - recursive
FolderId=''1VK5NBhuOTaLEy1pBMsQtG672vrJNgxai''
--List only from Trash (deleted files)
, IncludeFromTrash=''false''
--Extra search criteria
--, Query=''or (name contains ''''blog'''') or (name contains ''''test'''') '' --extra query
--Item type to return (default is all)
--, ItemType=''files'' -- (default=all) all, files, folders, sheets, documents, files_native, files_exclude_native
--, ItemType=''folders''
--, ItemType=''sheets''
--, ItemType=''files_native''
)';
EXEC (@MyQuery) AT [LS_TO_GOOGLE_DRIVE_IN_GATEWAY];